[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

Nathan Sidwell via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 6 05:08:00 PST 2023


================
@@ -128,6 +128,10 @@ class DiagnosticOptions : public RefCountedBase<DiagnosticOptions>{
   /// whether -Wsystem-headers is enabled on a per-module basis.
   std::vector<std::string> SystemHeaderWarningsModules;
 
+  /// Level of scrutiny reinterpret_casts get for type-unsafe aliasing
+  /// checks. Requires an ASTConsumer that provides TBAA information.
+  unsigned StrictAliasing;
----------------
urnathan wrote:

I was misled by the -Wundef-prefix pattern that I followed.  Should have looked closer and found the DiagnosticOptions.def file.

https://github.com/llvm/llvm-project/pull/74155


More information about the cfe-commits mailing list