File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
cpp/ql/src/semmle/code/cpp Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -272,20 +272,16 @@ class File extends Container, @file {
272
272
* are compiled by a Microsoft compiler are detected by this predicate.
273
273
*/
274
274
predicate compiledAsMicrosoft ( ) {
275
- exists ( Compilation c |
276
- c .getAFileCompiled ( ) = this and
275
+ exists ( File f , Compilation c |
276
+ c .getAFileCompiled ( ) = f and
277
277
(
278
278
c .getAnArgument ( ) = "--microsoft" or
279
279
c .getAnArgument ( )
280
280
.toLowerCase ( )
281
281
.replaceAll ( "\\" , "/" )
282
282
.matches ( [ "%/cl.exe" , "%/clang-cl.exe" ] )
283
- )
284
- )
285
- or
286
- exists ( File parent |
287
- parent .compiledAsMicrosoft ( ) and
288
- parent .getAnIncludedFile ( ) = this
283
+ ) and
284
+ f .getAnIncludedFile * ( ) = this
289
285
)
290
286
}
291
287
@@ -361,7 +357,7 @@ class File extends Container, @file {
361
357
/**
362
358
* Holds if any file was compiled by a Microsoft compiler.
363
359
*/
364
- cached predicate anyFileCompiledAsMicrosoft ( ) { any ( File f ) .compiledAsMicrosoft ( ) }
360
+ predicate anyFileCompiledAsMicrosoft ( ) { any ( File f ) .compiledAsMicrosoft ( ) }
365
361
366
362
/**
367
363
* A C/C++ header file, as determined (mainly) by file extension.
You can’t perform that action at this time.
0 commit comments