Skip to content

Commit e1bd4ea

Browse files
committed
Exclude CXXConstructorDecl when searching for function prototypes
1 parent bbbb2dc commit e1bd4ea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

main.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ class INOPreprocessorMatcherCallback : public MatchFinder::MatchCallback {
104104
return;
105105
}
106106

107+
if (dyn_cast<CXXConstructorDecl>(f)) {
108+
if (debugOutput) {
109+
outs() << " Ignored CXX constructor declaration.\n";
110+
}
111+
return;
112+
}
113+
107114
if (f->getParentFunctionOrMethod()) {
108115
if (debugOutput) {
109116
outs() << " Function is not top level, ignoring.\n";

0 commit comments

Comments
 (0)