Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| clang/include/clang/ASTMatchers/ASTMatchers.h | ||
|---|---|---|
| 2838 | Missing full stop at the end of the comment. | |
| 2859 | This will allow users to match on members that don't have identifiers -- is that intentional? If not, my recommendation is to use something like: if (const IdentifierInfo *II = Node.getMember().getAsIdentifierInfo()) return II->isStr(N); return false; Either way, we should document and test what the expected behavior is for things like constructors/destructors, overloaded operators, and the likes. (But we don't have to test every kind of odd declaration name.) | |
| 2898 | Similar concerns here about matching members without identifiers. | |
| 2902 | I assume this is a const auto & and not a value type? If so, please update the type. | |
| 2903 | const auto * | |
| 2904 | !isa<FieldDecl, CXXMethodDecl, VarDecl>(ND) | |
| 2906–2908 | return ND->getName() != MemberName; | |
Update
| clang/include/clang/ASTMatchers/ASTMatchers.h | ||
|---|---|---|
| 2859 | I was not able to demonstrate the problem with a test: https://godbolt.org/z/3Grd1b Can you be more specific? | |
| clang/include/clang/ASTMatchers/ASTMatchers.h | ||
|---|---|---|
| 2859 | I was thinking of something along these lines: https://godbolt.org/z/K8serj | |
| clang/include/clang/ASTMatchers/ASTMatchers.h | ||
|---|---|---|
| 2859 | Added a test for that. | |
Missing full stop at the end of the comment.