Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I think we're not *that* far away from landing the AST change, and changing RecursiveASTVisitor now is probably confusing and not worth the churn.
So I'd prefer to wait for now...
clang-tools-extra/include-cleaner/lib/WalkAST.cpp | ||
---|---|---|
249 | after D155858 this can be VisitConceptReference | |
clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp | ||
217 | to complete the set I think you want void foo(Bar auto x) (abbreviated template param) and Bar auto x = 1 (deduced type). Though these may not pass yet |
Rebased over AST changes.
clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp | ||
---|---|---|
217 | For some reason, Bar auto x = 1 is still failing; investigating. |
clang-tools-extra/include-cleaner/lib/WalkAST.cpp | ||
---|---|---|
244 | I don't know why we're doing this, decls in general are not considered references to themselves. Function/Var/Enum are in some cases, because their definition should be typechecked against a forward-declaration in the header. But that doesn't apply here: you can't forward-declare a concept. | |
clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp | ||
201 | AFAICT these are just normal AST nodes, so should be tested in WalkASTTest which is narrower and lighter-weight. The tests in this file run a bit more code, and none of it seems specifically relevant to concepts. |
LGTM
Unclear to me whether the FIXME will be addressed by an AST bug or a local change, either way continuing to look into it SG but this is fine to land as-is.
I don't know why we're doing this, decls in general are not considered references to themselves.
Function/Var/Enum are in some cases, because their definition should be typechecked against a forward-declaration in the header. But that doesn't apply here: you can't forward-declare a concept.