We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4dd868f + b8d7292 commit 36a1ac5Copy full SHA for 36a1ac5
cpp/ql/src/semmle/code/cpp/headers/MultipleInclusion.qll
@@ -114,8 +114,11 @@ pragma[noopt] predicate correctIncludeGuard(HeaderFile hf, PreprocessorDirective
114
*/
115
predicate startsWithIfndef(HeaderFile hf, PreprocessorDirective ifndef, string macroName) {
116
ifndefDirective(ifndef, macroName) and
117
- ifndef.getFile() = hf and
118
- ifndef.getLocation().getStartLine() = min(int l | includeGuardRelevantLine(hf, l))
+ exists(Location loc |
+ loc = ifndef.getLocation() and
119
+ loc.getFile() = hf and
120
+ loc.getStartLine() = min(int l | includeGuardRelevantLine(hf, l))
121
+ )
122
}
123
124
private predicate endifLocation(PreprocessorEndif endif, File f, int line) {
0 commit comments