Skip to content

C++: Simplify some semmle-extractor-options in tests #18335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/builtins/type_traits/clang.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// semmle-extractor-options: --clang --edg --clang_version --edg 190000
// semmle-extractor-options: --clang --clang_version 190000

struct S {
void f() {}
Expand Down
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/complex_numbers/conjugation.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// semmle-extractor-options: --edg --c99
// semmle-extractor-options: -std=c99
void f(_Complex double x) {
x = ~x;
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/complex_numbers/test.c
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/constexpr_if/test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// semmle-extractor-options: --edg --c++20
// semmle-extractor-options: -std=c++20

void test(void) {
int x;
Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/conversions/complex.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ void ComplexNumbers() {
c = i;
c = r;
}
// semmle-extractor-options: --microsoft --edg --c99
// semmle-extractor-options: --microsoft -std=c99
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/fold/fold.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// semmle-extractor-options: --edg --c++17
// semmle-extractor-options: -std=c++17

template<typename ...Args>
int sum(Args&&... args) {
Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/ir/ir/complex.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ void complex_conversions(void) {
ld = jld;
}

// semmle-extractor-options: --microsoft --edg --c99
// semmle-extractor-options: --microsoft -std=c99
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/ir/ir/coroutines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ co_returnable_value co_yield_and_return_value(int i) {



// semmle-extractor-options: --edg --c++20
// semmle-extractor-options: -std=c++20
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/ir/types/complex.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ void Imaginary(void) {
// _Imaginary __float128 jf128;
}

// semmle-extractor-options: --microsoft --edg --c99
// semmle-extractor-options: --microsoft -std=c99
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/specifiers2/cpp20.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// semmle-extractor-options: --clang --edg --c++20
// semmle-extractor-options: --clang -std=c++20

namespace cpp20 {

Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/structs/compatible_c/b1.c
Original file line number Diff line number Diff line change
@@ -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;
};
Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/structs/compatible_c/b2.c
Original file line number Diff line number Diff line change
@@ -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;
};
Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/structs/compatible_c/c1_gnu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/structs/compatible_c/c2_gnu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/syntax-zoo/builtin.c
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/syntax-zoo/cpp11.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// semmle-extractor-options: --c++11
// semmle-extractor-options: -std=c++11

namespace range_based_for_11 {
void array() {
Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/syntax-zoo/cpp17.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// semmle-extractor-options: --c++17
// semmle-extractor-options: -std=c++17

namespace std { typedef unsigned long size_t; }

Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/vector_types/vector_types.cpp
Original file line number Diff line number Diff line change
@@ -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(...);
Expand Down
Loading