Make test more lenient for custom clang version strings
[llvm-project.git] / clang / test / C / drs / dr483.c
blob2d4b7bc08723ea18a3dc270e7d2254d4c0e7f45b
1 /* RUN: %clang_cc1 -std=c89 -verify -pedantic -Wno-c11-extensions %s
2 RUN: %clang_cc1 -std=c99 -verify -pedantic -Wno-c11-extensions %s
3 RUN: %clang_cc1 -std=c11 -verify -pedantic %s
4 RUN: %clang_cc1 -std=c17 -verify -pedantic %s
5 RUN: %clang_cc1 -std=c2x -verify -pedantic %s
6 */
8 /* expected-no-diagnostics */
10 /* WG14 DR483: yes
11 * __LINE__ and __FILE__ in macro replacement list
13 * The crux of this DR is to ensure that __LINE__ (and __FILE__) use in a macro
14 * replacement list report the line and file of the expansion of that macro,
15 * not the line and file of the macro definition itself.
17 #line 500
18 #define MAC() __LINE__
20 #line 1000
21 _Static_assert(MAC() == 1000, "");