File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,6 +172,13 @@ class Callback : public clang::ast_matchers::MatchFinder::MatchCallback {
172172 add (Mapper::ToString (decl));
173173 return ;
174174 }
175+ if (const auto *lit =
176+ R.Nodes .getNodeAs <clang::IntegerLiteral>(" macro_int" )) {
177+ if (lit->getBeginLoc ().isMacroID ()) {
178+ add (Mapper::ToString (lit));
179+ }
180+ return ;
181+ }
175182 }
176183 }
177184
@@ -670,7 +677,8 @@ class ActionFactory : public clang::tooling::FrontendActionFactory {
670677 declRefExpr (to (decl (unless (parmVarDecl ()))))))
671678 .bind (" udeclref" ),
672679 cxxDependentScopeMemberExpr ().bind (" dsme" ),
673- cxxUnresolvedConstructExpr ().bind (" uctor" ))))),
680+ cxxUnresolvedConstructExpr ().bind (" uctor" ),
681+ integerLiteral ().bind (" macro_int" ))))),
674682 hasAncestor (functionDecl (isDefinition (),
675683 matchesName (" (^|::)f[0-9]+$" ),
676684 isExpansionInMainFile ())
You can’t perform that action at this time.
0 commit comments