Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7fd0823

Browse files
committed
CPP: Optimize AV Rule 35's usesMacro.
1 parent 4075f57 commit 7fd0823

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cpp/ql/src/jsf/4.07 Header Files/AV Rule 35.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ string extraDetail(HeaderFile hf, SomePreprocessorDirective detail1, SomePreproc
8888
* Header file `hf` uses a macro called `macroName`.
8989
*/
9090
predicate usesMacro(HeaderFile hf, string macroName) {
91+
not hf instanceof IncludeGuardedHeader and // restrict to cases the query looks at
9192
exists(MacroAccess ma |
9293
ma.getFile() = hf and
9394
ma.getMacro().getName() = macroName

0 commit comments

Comments
 (0)