[Reland][Runtimes] Merge 'compile_commands.json' files from runtimes build (#116303)
[llvm-project.git] / clang / test / Preprocessor / static_assert.c
blob7fa9975e1d46849456974ff5ff89311d6c0bfb80
1 // RUN: %clang_cc1 -E -dM %s | FileCheck --strict-whitespace --check-prefix=NOMS %s
2 // RUN: %clang_cc1 -fms-compatibility -E -dM %s | FileCheck --strict-whitespace --check-prefix=MS %s
4 // If the assert macro is defined in MS compatibility mode in C, we
5 // automatically inject a macro definition for static_assert. Test that the
6 // macro is properly added to the preprocessed output. This allows us to
7 // diagonse use of the static_assert keyword when <assert.h> has not been
8 // included while still being able to compile preprocessed code.
9 #define assert
11 MS: #define static_assert _Static_assert
12 NOMS-NOT: #define static_assert _Static_assert