File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,13 @@ class INOPreprocessorMatcherCallback : public MatchFinder::MatchCallback {
142
142
143
143
const VarDecl *v = match.Nodes .getNodeAs <VarDecl>(" var_decl" );
144
144
if (v) {
145
+ if (v->getParentFunctionOrMethod ()) {
146
+ // if (debugOutput) {
147
+ // outs() << " Variable is not top level, ignoring.\n";
148
+ // }
149
+ return ;
150
+ }
151
+
145
152
FullSourceLoc loc = ctx->getFullLoc (v->getLocStart ());
146
153
SourceRange r = v->getSourceRange ();
147
154
FullSourceLoc begin = ctx->getFullLoc (r.getBegin ());
@@ -153,12 +160,6 @@ class INOPreprocessorMatcherCallback : public MatchFinder::MatchCallback {
153
160
outs () << " (range " << begin.getSpellingLineNumber () << " :" << begin.getSpellingColumnNumber ();
154
161
outs () << " to " << end.getSpellingLineNumber () << " :" << end.getSpellingColumnNumber () << " )\n " ;
155
162
}
156
- if (v->getParentFunctionOrMethod ()) {
157
- if (debugOutput) {
158
- outs () << " Variable is not top level, ignoring.\n " ;
159
- }
160
- return ;
161
- }
162
163
163
164
detectInsertionPoint (sm, begin, end);
164
165
}
You can’t perform that action at this time.
0 commit comments