Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Preprocessor / extension-warning.c
blob5fe905c8435dfdfdd43f4c0ce7b42c3f5342c5d9
1 // RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
3 // The preprocessor shouldn't warn about extensions within macro bodies that
4 // aren't expanded.
5 #define TY typeof
6 #define TY1 typeof(1)
8 // But we should warn here
9 TY1 x; // expected-warning {{extension}}
10 TY(1) x; // FIXME: And we should warn here
12 // Note: this warning intentionally doesn't trigger on keywords like
13 // __attribute; the standard allows implementation-defined extensions
14 // prefixed with "__".
15 // Current list of keywords this can trigger on:
16 // inline, restrict, asm, typeof, _asm
18 void whatever(void) {}