simon_tatham added inline comments.

================
Comment at: 
clang/include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h:81
+  union {
+    SourceRange SingleRange;
+    unsigned NumRanges;
----------------
simon_tatham wrote:
> This surely relies on `SourceRange` having no destructor (or rather, a 
> trivial one). If that ever changes, then destruction of this class will risk 
> either a spurious call to the destructor or a missing one.
> 
> Is there any way to somehow arrange that a build failure will occur if the 
> definition of `SourceRange` changes in that way?
... aha, found one. Such as a static assertion that 
`std::is_trivially_destructible<clang::SourceLocation>::value` is 1.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94599/new/

https://reviews.llvm.org/D94599

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to