Skip to content

Commit 1f730a1

Browse files
committed
Ignore CXX methods when searching for function declarations (FuncDecl)
1 parent f2ea0cc commit 1f730a1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: main.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ class INOPreprocessorMatcherCallback : public MatchFinder::MatchCallback {
9797
outs() << " to " << end.getSpellingLineNumber() << ":" << end.getSpellingColumnNumber() << ")\n";
9898
}
9999

100+
if (dyn_cast<CXXMethodDecl>(f)) {
101+
if (debugOutput) {
102+
outs() << " Ignored CXX method declaration.\n";
103+
}
104+
}
105+
100106
if (f->getParentFunctionOrMethod()) {
101107
if (debugOutput) {
102108
outs() << " Function is not top level, ignoring.\n";

0 commit comments

Comments
 (0)