[clang] [Clang] suggest headers on undeclared errors (PR #140247)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue May 20 06:56:10 PDT 2025
================
@@ -14,6 +14,8 @@
#include "clang/Basic/DiagnosticParse.h"
#include "clang/Parse/Parser.h"
#include "clang/Sema/ParsedTemplate.h"
+#include "clang/Tooling/Inclusions/StandardLibrary.h"
----------------
AaronBallman wrote:
This seems like a layering violation, though not a circular dependency. Parser currently does not link against tooling. In your patch, you link tooling into Sema which Parser then picks up transitively. Tooling does not currently link in Parser or Sema, hence no circular dependency.
I kind of think the standard library stuff needs to be lifted into AST. It does seem to rely on `Decl.h` internally, so it can't be lifted into Basic.
CC @erichkeane for other opinions
https://github.com/llvm/llvm-project/pull/140247
More information about the cfe-commits
mailing list