From 6200a1d5b98dcc45a3958ea16a4d4b6deb4bdedc Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Mon, 16 Dec 2024 17:32:00 +0100 Subject: [PATCH] C++: Simplify some semmle-extractor-options in tests --- cpp/ql/test/library-tests/builtins/type_traits/clang.cpp | 2 +- cpp/ql/test/library-tests/clang_builtin_macros/extended.cpp | 2 +- cpp/ql/test/library-tests/complex_numbers/conjugation.c | 2 +- cpp/ql/test/library-tests/complex_numbers/test.c | 2 +- cpp/ql/test/library-tests/constants/addresses/addresses.cpp | 2 +- cpp/ql/test/library-tests/constexpr_if/test.cpp | 2 +- cpp/ql/test/library-tests/conversions/complex.c | 2 +- cpp/ql/test/library-tests/fold/fold.cpp | 2 +- cpp/ql/test/library-tests/ir/ir/complex.c | 2 +- cpp/ql/test/library-tests/ir/ir/coroutines.cpp | 2 +- cpp/ql/test/library-tests/ir/types/complex.c | 2 +- cpp/ql/test/library-tests/specifiers2/cpp20.cpp | 2 +- cpp/ql/test/library-tests/structs/compatible_c/b1.c | 2 +- cpp/ql/test/library-tests/structs/compatible_c/b2.c | 2 +- cpp/ql/test/library-tests/structs/compatible_c/c1_gnu.c | 2 +- cpp/ql/test/library-tests/structs/compatible_c/c2_gnu.c | 2 +- cpp/ql/test/library-tests/syntax-zoo/builtin.c | 2 +- cpp/ql/test/library-tests/syntax-zoo/cpp11.cpp | 2 +- cpp/ql/test/library-tests/syntax-zoo/cpp17.cpp | 2 +- cpp/ql/test/library-tests/types/datasizeof/datasizeof.cpp | 2 +- cpp/ql/test/library-tests/vector_types/vector_types.cpp | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/cpp/ql/test/library-tests/builtins/type_traits/clang.cpp b/cpp/ql/test/library-tests/builtins/type_traits/clang.cpp index 732444543725..86008af19f7d 100644 --- a/cpp/ql/test/library-tests/builtins/type_traits/clang.cpp +++ b/cpp/ql/test/library-tests/builtins/type_traits/clang.cpp @@ -1,4 +1,4 @@ -// semmle-extractor-options: --clang --edg --clang_version --edg 190000 +// semmle-extractor-options: --clang --clang_version 190000 struct S { void f() {} diff --git a/cpp/ql/test/library-tests/clang_builtin_macros/extended.cpp b/cpp/ql/test/library-tests/clang_builtin_macros/extended.cpp index 0cb48fcd4d1d..27105319a15c 100644 --- a/cpp/ql/test/library-tests/clang_builtin_macros/extended.cpp +++ b/cpp/ql/test/library-tests/clang_builtin_macros/extended.cpp @@ -1,4 +1,4 @@ -// semmle-extractor-options: --clang --edg --c++11 --edg --nullptr +// semmle-extractor-options: --clang -std=c++11 --edg --nullptr static int has_nullptr_f = __has_feature(cxx_nullptr); static int has_nullptr_e = __has_extension(cxx_nullptr); diff --git a/cpp/ql/test/library-tests/complex_numbers/conjugation.c b/cpp/ql/test/library-tests/complex_numbers/conjugation.c index ee379baf1ccb..2e7269bdc8cc 100644 --- a/cpp/ql/test/library-tests/complex_numbers/conjugation.c +++ b/cpp/ql/test/library-tests/complex_numbers/conjugation.c @@ -1,4 +1,4 @@ -// semmle-extractor-options: --edg --c99 +// semmle-extractor-options: -std=c99 void f(_Complex double x) { x = ~x; } diff --git a/cpp/ql/test/library-tests/complex_numbers/test.c b/cpp/ql/test/library-tests/complex_numbers/test.c index b9913899d7c4..2637da130d5b 100644 --- a/cpp/ql/test/library-tests/complex_numbers/test.c +++ b/cpp/ql/test/library-tests/complex_numbers/test.c @@ -1,4 +1,4 @@ -// semmle-extractor-options: --microsoft --edg --c99 +// semmle-extractor-options: --microsoft -std=c99 void f(_Imaginary double x, _Imaginary double y) { double z; _Complex double w; diff --git a/cpp/ql/test/library-tests/constants/addresses/addresses.cpp b/cpp/ql/test/library-tests/constants/addresses/addresses.cpp index a80e9b38a2e3..b15a6324878e 100644 --- a/cpp/ql/test/library-tests/constants/addresses/addresses.cpp +++ b/cpp/ql/test/library-tests/constants/addresses/addresses.cpp @@ -1,4 +1,4 @@ -// semmle-extractor-options: --c++14 +// semmle-extractor-options: -std=c++14 const int int_const = 1; extern const int extern_int_const = 1; diff --git a/cpp/ql/test/library-tests/constexpr_if/test.cpp b/cpp/ql/test/library-tests/constexpr_if/test.cpp index 3b71ebbcefed..c19661a3f55d 100644 --- a/cpp/ql/test/library-tests/constexpr_if/test.cpp +++ b/cpp/ql/test/library-tests/constexpr_if/test.cpp @@ -1,4 +1,4 @@ -// semmle-extractor-options: --edg --c++20 +// semmle-extractor-options: -std=c++20 void test(void) { int x; diff --git a/cpp/ql/test/library-tests/conversions/complex.c b/cpp/ql/test/library-tests/conversions/complex.c index 066eb1211eed..8e1f9376b74a 100644 --- a/cpp/ql/test/library-tests/conversions/complex.c +++ b/cpp/ql/test/library-tests/conversions/complex.c @@ -6,4 +6,4 @@ void ComplexNumbers() { c = i; c = r; } -// semmle-extractor-options: --microsoft --edg --c99 +// semmle-extractor-options: --microsoft -std=c99 diff --git a/cpp/ql/test/library-tests/fold/fold.cpp b/cpp/ql/test/library-tests/fold/fold.cpp index 2a5e8f256b0e..658fca0a8425 100644 --- a/cpp/ql/test/library-tests/fold/fold.cpp +++ b/cpp/ql/test/library-tests/fold/fold.cpp @@ -1,4 +1,4 @@ -// semmle-extractor-options: --edg --c++17 +// semmle-extractor-options: -std=c++17 template int sum(Args&&... args) { diff --git a/cpp/ql/test/library-tests/ir/ir/complex.c b/cpp/ql/test/library-tests/ir/ir/complex.c index d2009778ae5f..b6717ef653b3 100644 --- a/cpp/ql/test/library-tests/ir/ir/complex.c +++ b/cpp/ql/test/library-tests/ir/ir/complex.c @@ -144,4 +144,4 @@ void complex_conversions(void) { ld = jld; } -// semmle-extractor-options: --microsoft --edg --c99 +// semmle-extractor-options: --microsoft -std=c99 diff --git a/cpp/ql/test/library-tests/ir/ir/coroutines.cpp b/cpp/ql/test/library-tests/ir/ir/coroutines.cpp index 49aebee83a3f..84f5e9a2f82d 100644 --- a/cpp/ql/test/library-tests/ir/ir/coroutines.cpp +++ b/cpp/ql/test/library-tests/ir/ir/coroutines.cpp @@ -112,4 +112,4 @@ co_returnable_value co_yield_and_return_value(int i) { -// semmle-extractor-options: --edg --c++20 \ No newline at end of file +// semmle-extractor-options: -std=c++20 \ No newline at end of file diff --git a/cpp/ql/test/library-tests/ir/types/complex.c b/cpp/ql/test/library-tests/ir/types/complex.c index 450f5de9e651..d8b187462811 100644 --- a/cpp/ql/test/library-tests/ir/types/complex.c +++ b/cpp/ql/test/library-tests/ir/types/complex.c @@ -12,4 +12,4 @@ void Imaginary(void) { // _Imaginary __float128 jf128; } -// semmle-extractor-options: --microsoft --edg --c99 +// semmle-extractor-options: --microsoft -std=c99 diff --git a/cpp/ql/test/library-tests/specifiers2/cpp20.cpp b/cpp/ql/test/library-tests/specifiers2/cpp20.cpp index b27d5037a63a..8f0b4435d716 100644 --- a/cpp/ql/test/library-tests/specifiers2/cpp20.cpp +++ b/cpp/ql/test/library-tests/specifiers2/cpp20.cpp @@ -1,4 +1,4 @@ -// semmle-extractor-options: --clang --edg --c++20 +// semmle-extractor-options: --clang -std=c++20 namespace cpp20 { diff --git a/cpp/ql/test/library-tests/structs/compatible_c/b1.c b/cpp/ql/test/library-tests/structs/compatible_c/b1.c index b154ff7eb9f0..24d7593cdeb1 100644 --- a/cpp/ql/test/library-tests/structs/compatible_c/b1.c +++ b/cpp/ql/test/library-tests/structs/compatible_c/b1.c @@ -1,4 +1,4 @@ -// semmle-extractor-options: --microsoft --edg --c99 +// semmle-extractor-options: --microsoft -std=c99 struct AppleCompatible { // Definitions of Apple are exactly the same in b1.c and b2.c int apple_x; }; diff --git a/cpp/ql/test/library-tests/structs/compatible_c/b2.c b/cpp/ql/test/library-tests/structs/compatible_c/b2.c index 51664a250d87..ac227baafd79 100644 --- a/cpp/ql/test/library-tests/structs/compatible_c/b2.c +++ b/cpp/ql/test/library-tests/structs/compatible_c/b2.c @@ -1,4 +1,4 @@ -// semmle-extractor-options: --microsoft --edg --c99 +// semmle-extractor-options: --microsoft -std=c99 struct AppleCompatible { // Definitions of Apple are exactly the same in b1.c and b2.c int apple_x; }; diff --git a/cpp/ql/test/library-tests/structs/compatible_c/c1_gnu.c b/cpp/ql/test/library-tests/structs/compatible_c/c1_gnu.c index 97e4d2519bb5..4589aeaac421 100644 --- a/cpp/ql/test/library-tests/structs/compatible_c/c1_gnu.c +++ b/cpp/ql/test/library-tests/structs/compatible_c/c1_gnu.c @@ -7,4 +7,4 @@ struct Kiwi { struct Lemon { unsigned int __attribute__ ((vector_size (16))) lemon_x; }; -// semmle-extractor-options: --edg --c99 --clang --edg --clang_vector_types --gnu_version 40700 +// semmle-extractor-options: -std=c99 --clang --edg --clang_vector_types --gnu_version 40700 diff --git a/cpp/ql/test/library-tests/structs/compatible_c/c2_gnu.c b/cpp/ql/test/library-tests/structs/compatible_c/c2_gnu.c index 0dba41d16606..927533ab9a86 100644 --- a/cpp/ql/test/library-tests/structs/compatible_c/c2_gnu.c +++ b/cpp/ql/test/library-tests/structs/compatible_c/c2_gnu.c @@ -7,4 +7,4 @@ struct Kiwi { struct Lemon { signed int __attribute__ ((vector_size (16))) lemon_x; }; -// semmle-extractor-options: --edg --c99 --clang --edg --clang_vector_types --gnu_version 40700 +// semmle-extractor-options: -std=c99 --clang --edg --clang_vector_types --gnu_version 40700 diff --git a/cpp/ql/test/library-tests/syntax-zoo/builtin.c b/cpp/ql/test/library-tests/syntax-zoo/builtin.c index 3677ac541f3d..48efa6e38c44 100644 --- a/cpp/ql/test/library-tests/syntax-zoo/builtin.c +++ b/cpp/ql/test/library-tests/syntax-zoo/builtin.c @@ -1,4 +1,4 @@ -// semmle-extractor-options: --clang --edg --clang_version --edg 30500 +// semmle-extractor-options: --clang --clang_version 30500 #define vector(elcount, type) __attribute__((vector_size((elcount)*sizeof(type)))) type diff --git a/cpp/ql/test/library-tests/syntax-zoo/cpp11.cpp b/cpp/ql/test/library-tests/syntax-zoo/cpp11.cpp index 469f9c2a4529..f627e2e0a840 100644 --- a/cpp/ql/test/library-tests/syntax-zoo/cpp11.cpp +++ b/cpp/ql/test/library-tests/syntax-zoo/cpp11.cpp @@ -1,4 +1,4 @@ -// semmle-extractor-options: --c++11 +// semmle-extractor-options: -std=c++11 namespace range_based_for_11 { void array() { diff --git a/cpp/ql/test/library-tests/syntax-zoo/cpp17.cpp b/cpp/ql/test/library-tests/syntax-zoo/cpp17.cpp index 8d154a6abd9c..74e06f3081f2 100644 --- a/cpp/ql/test/library-tests/syntax-zoo/cpp17.cpp +++ b/cpp/ql/test/library-tests/syntax-zoo/cpp17.cpp @@ -1,4 +1,4 @@ -// semmle-extractor-options: --c++17 +// semmle-extractor-options: -std=c++17 namespace std { typedef unsigned long size_t; } diff --git a/cpp/ql/test/library-tests/types/datasizeof/datasizeof.cpp b/cpp/ql/test/library-tests/types/datasizeof/datasizeof.cpp index b6e65889a682..f7555394ae01 100644 --- a/cpp/ql/test/library-tests/types/datasizeof/datasizeof.cpp +++ b/cpp/ql/test/library-tests/types/datasizeof/datasizeof.cpp @@ -1,4 +1,4 @@ -// semmle-extractor-options: --clang --edg --clang_version --edg 190000 +// semmle-extractor-options: --clang --clang_version 190000 typedef unsigned int size_t; diff --git a/cpp/ql/test/library-tests/vector_types/vector_types.cpp b/cpp/ql/test/library-tests/vector_types/vector_types.cpp index dd35743cb3c1..778b88ed5f89 100644 --- a/cpp/ql/test/library-tests/vector_types/vector_types.cpp +++ b/cpp/ql/test/library-tests/vector_types/vector_types.cpp @@ -1,4 +1,4 @@ -// semmle-extractor-options: --clang --edg --clang_version --edg 30801 +// semmle-extractor-options: --clang --clang_version 30801 // Compilable with: clang --std=c++0x -msse4.1 vector_types.cpp // (some bits also compilable with gcc) int printf(...);