File tree 36 files changed +64
-53
lines changed
36 files changed +64
-53
lines changed Original file line number Diff line number Diff line change
1
+ #include "a.h"
2
+ #define FOUR 4
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ int main () {
2
+ return ONE + FOUR ;
3
+ }
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ #import "d.h"
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ int main () {
2
+ return SEVENTEEN ;
3
+ }
Original file line number Diff line number Diff line change
1
+ #if 1
2
+ #pragma hdrstop
3
+ extern int x ;
4
+ #define SEEN_F
5
+ #endif
Original file line number Diff line number Diff line change
1
+ #ifdef SEEN_F
2
+ static int g () {
3
+ return 20 ;
4
+ }
5
+ #endif
Original file line number Diff line number Diff line change
1
+ #include "h1.h"
2
+ #pragma hdrstop
3
+ #include "h2.h"
4
+ #define SEEN_H
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -13,4 +13,3 @@ static int h2() {
13
13
return 32 ;
14
14
}
15
15
#endif
16
- // semmle-extractor-options: --clang -include-pch ${testdir}/clang-pch.testproj/h.pch
Original file line number Diff line number Diff line change
1
+ import os
2
+
3
+
4
+ def test (codeql , cpp ):
5
+ os .mkdir ("pch" )
6
+ extractor = cpp .get_tool ("extractor" )
7
+ codeql .database .create (command = [
8
+ f'"{ extractor } " --mimic-clang -emit-pch -o pch/a.pch a.c' ,
9
+ f'"{ extractor } " --mimic-clang -include-pch pch/a.pch -Iextra_dummy_path b.c' ,
10
+ f'"{ extractor } " --mimic-clang -include pch/a -Iextra_dummy_path c.c' ,
11
+ f'"{ extractor } " --mimic-clang -emit-pch -o pch/d.pch d.c' ,
12
+ f'"{ extractor } " --mimic-clang -include-pch pch/d.pch e.c' ,
13
+ f'"{ extractor } " --mimic-clang -emit-pch -o pch/f.pch f.c' ,
14
+ f'"{ extractor } " --mimic-clang -include-pch pch/f.pch g.c' ,
15
+ f'"{ extractor } " --mimic-clang -emit-pch -o pch/h.pch h.c' ,
16
+ f'"{ extractor } " --mimic-clang -include-pch pch/h.pch i.c' ,
17
+ ])
Original file line number Diff line number Diff line change
1
+ #include "a.h"
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ #pragma hdrstop
2
+ #include "b.h"
3
+
4
+ int b () {
5
+ return A ;
6
+ }
Original file line number Diff line number Diff line change
1
+ #include "d.h"
2
+ #include "c.h"
3
+
4
+ int c () {
5
+ return A ;
6
+ }
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ import os
2
+
3
+
4
+ def test (codeql , cpp ):
5
+ os .mkdir ("pch" )
6
+ extractor = cpp .get_tool ("extractor" )
7
+ codeql .database .create (command = [
8
+ f'"{ extractor } " --mimic-cl /Yca.h /Fppch/a.pch a.c' ,
9
+ f'"{ extractor } " --mimic-cl /Yub.h /Fppch/a.pch b.c' ,
10
+ f'"{ extractor } " --mimic-cl /Yuc.h /Fppch/a.pch c.c' ,
11
+ ])
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments