[PATCH] D158842: [include-cleaner] Handle decls/refs to concepts.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 31 03:21:39 PDT 2023
sammccall added inline comments.
================
Comment at: clang-tools-extra/include-cleaner/lib/WalkAST.cpp:244
+ bool VisitConceptDecl(ConceptDecl *CD) {
+ report(CD->getLocation(), CD);
----------------
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.
================
Comment at: clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp:201
+TEST_F(WalkUsedTest, Concepts) {
+ llvm::Annotations ConceptHdr(guard(R"cpp(
----------------
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158842/new/
https://reviews.llvm.org/D158842
More information about the cfe-commits
mailing list