File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,6 +170,13 @@ class Callback : public clang::ast_matchers::MatchFinder::MatchCallback {
170170 add (Mapper::ToString (decl));
171171 return ;
172172 }
173+ if (const auto *lit =
174+ R.Nodes .getNodeAs <clang::IntegerLiteral>(" macro_int" )) {
175+ if (lit->getBeginLoc ().isMacroID ()) {
176+ add (Mapper::ToString (lit));
177+ }
178+ return ;
179+ }
173180 }
174181 }
175182
@@ -668,7 +675,8 @@ class ActionFactory : public clang::tooling::FrontendActionFactory {
668675 declRefExpr (to (decl (unless (parmVarDecl ()))))))
669676 .bind (" udeclref" ),
670677 cxxDependentScopeMemberExpr ().bind (" dsme" ),
671- cxxUnresolvedConstructExpr ().bind (" uctor" ))))),
678+ cxxUnresolvedConstructExpr ().bind (" uctor" ),
679+ integerLiteral ().bind (" macro_int" ))))),
672680 hasAncestor (functionDecl (isDefinition (),
673681 matchesName (" (^|::)f[0-9]+$" ),
674682 isExpansionInMainFile ())
You can’t perform that action at this time.
0 commit comments