mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #18335 from jketema/test-cleanup
C++: Simplify some semmle-extractor-options in tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// semmle-extractor-options: --clang --edg --clang_version --edg 190000
|
||||
// semmle-extractor-options: --clang --clang_version 190000
|
||||
|
||||
struct S {
|
||||
void f() {}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// semmle-extractor-options: --edg --c99
|
||||
// semmle-extractor-options: -std=c99
|
||||
void f(_Complex double x) {
|
||||
x = ~x;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// semmle-extractor-options: --edg --c++20
|
||||
// semmle-extractor-options: -std=c++20
|
||||
|
||||
void test(void) {
|
||||
int x;
|
||||
|
||||
@@ -6,4 +6,4 @@ void ComplexNumbers() {
|
||||
c = i;
|
||||
c = r;
|
||||
}
|
||||
// semmle-extractor-options: --microsoft --edg --c99
|
||||
// semmle-extractor-options: --microsoft -std=c99
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// semmle-extractor-options: --edg --c++17
|
||||
// semmle-extractor-options: -std=c++17
|
||||
|
||||
template<typename ...Args>
|
||||
int sum(Args&&... args) {
|
||||
|
||||
@@ -144,4 +144,4 @@ void complex_conversions(void) {
|
||||
ld = jld;
|
||||
}
|
||||
|
||||
// semmle-extractor-options: --microsoft --edg --c99
|
||||
// semmle-extractor-options: --microsoft -std=c99
|
||||
|
||||
@@ -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
|
||||
@@ -12,4 +12,4 @@ void Imaginary(void) {
|
||||
// _Imaginary __float128 jf128;
|
||||
}
|
||||
|
||||
// semmle-extractor-options: --microsoft --edg --c99
|
||||
// semmle-extractor-options: --microsoft -std=c99
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// semmle-extractor-options: --clang --edg --c++20
|
||||
// semmle-extractor-options: --clang -std=c++20
|
||||
|
||||
namespace cpp20 {
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// semmle-extractor-options: --c++11
|
||||
// semmle-extractor-options: -std=c++11
|
||||
|
||||
namespace range_based_for_11 {
|
||||
void array() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// semmle-extractor-options: --c++17
|
||||
// semmle-extractor-options: -std=c++17
|
||||
|
||||
namespace std { typedef unsigned long size_t; }
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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(...);
|
||||
|
||||
Reference in New Issue
Block a user