[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 22 06:17:38 PST 2024
================
@@ -29,6 +29,7 @@
#include "clang/AST/TypeLoc.h"
#include "clang/AST/UnresolvedSet.h"
#include "clang/Basic/Diagnostic.h"
+#include "clang/Basic/DiagnosticSema.h"
----------------
AaronBallman wrote:
Our library layering is such that Sema sits on top of AST, they're not siblings. So it's a code smell for anything in AST to include anything that says "Sema" and we already split our diagnostics based on what library layer they're emitted from. So yes, I think this belongs in `DiagnosticASTKinds.td` instead; there are possibly others that should move as well which aren't related to your changes.
https://github.com/llvm/llvm-project/pull/102040
More information about the cfe-commits
mailing list