Skip to content

Commit 70d50aa

Browse files
committed
Use #if defined(...) instead of #if ...
1 parent 77b02b8 commit 70d50aa

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ struct C {
1010
};
1111

1212
int ATTRIBUTE_NOINLINE
13-
#if __clang__ || !defined(_MSC_VER)
13+
#if defined(__clang__) || !defined(_MSC_VER)
1414
__attribute__((optnone))
1515
#endif
1616
hide(int x) { return x; }

compiler-rt/test/asan/TestCases/Windows/issue64990.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// UNSUPPORTED: target={{.*-windows-gnu}}
66

7-
#if _MSC_VER && !defined(__clang__)
7+
#if defined(_MSC_VER) && !defined(__clang__)
88
#include <string.h>
99
#endif
1010

@@ -16,7 +16,7 @@ int main(int argc, char **argv) {
1616
throw 1;
1717
} catch (...) {
1818
// Make asan generate call to __asan_memcpy inside the EH pad.
19-
#if _MSC_VER && !defined(__clang__)
19+
#if defined(_MSC_VER) && !defined(__clang__)
2020
memcpy(buff1, buff2 + 3, 6);
2121
#else
2222
__builtin_memcpy(buff1, buff2 + 3, 6);

compiler-rt/test/asan/TestCases/alloca_constant_size.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <stdio.h>
88
#include <string.h>
99
#include <stdlib.h>
10-
#if _MSC_VER
10+
#ifdef _MSC_VER
1111
#include <malloc.h>
1212
#endif
1313

compiler-rt/test/asan/TestCases/ill.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <windows.h>
99
#endif
1010

11-
#if _MSC_VER && !defined(__clang__)
11+
#if defined(_MSC_VER) && !defined(__clang__)
1212
#define __builtin_trap() __asm ud2;
1313
#endif
1414

compiler-rt/test/asan/TestCases/interception_failure_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// it works with the dynamic runtime.
1919
// XFAIL: target={{.*netbsd.*}} && !asan-dynamic-runtime
2020

21-
#if _MSC_VER && !defined(__clang__)
21+
#if defined(_MSC_VER) && !defined(__clang__)
2222
#pragma warning(disable : 4273)
2323
#endif
2424

compiler-rt/test/asan/TestCases/zero_page_pc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Check that ASan correctly detects SEGV on the zero page.
22
// RUN: %clangxx_asan %s -o %t && not %run %t 2>&1 | FileCheck %s
33

4-
#if _MSC_VER && !defined(__CLANG__)
4+
#if defined(_MSC_VER) && !defined(__CLANG__)
55
#define __has_feature(x) 0
66
#endif
77

0 commit comments

Comments
 (0)