Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Clang indexing doesn't detect C++20 ConceptDecls #48876

Open Quuxplusone opened 3 years ago

Quuxplusone commented 3 years ago
Bugzilla Link PR49907
Status NEW
Importance P normal
Reported by Emil Ekmečić (ekmecicspam@gmail.com)
Reported on 2021-04-09 09:13:06 -0700
Last modified on 2021-04-09 09:20:00 -0700
Version 11.0
Hardware PC All
CC ekmecicspam@gmail.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments bug.cpp (1977 bytes, text/x-csrc)
Blocks
Blocked by
See also
Created attachment 24738
Example code for this bug

I'm having trouble getting Clang's IndexingAction to detect
clang::ConceptDecls.
I have a minimum working example (reproduced in bug.cpp) that initializes
an IndexingAction and runs it over some test code that contains two
ConceptDecls. I've verified that the frontend "sees" these decls by
dumping the AST.

However, the IndexingAction is set up to print a simple message
when it encounters any kind of decl, and no such message is
printed when running over the aforementioned code. Ergo, it
seems like ConceptDecls are invisible to the IndexingAction,
whereas other decls are detected properly (clang::CXXRecordDecl,
clang::FunctionDecl, etc).

I've reproduced this problem in LLVM/Clang 11 and 12.
Quuxplusone commented 3 years ago

Attached bug.cpp (1977 bytes, text/x-csrc): Example code for this bug