summaryrefslogtreecommitdiffstats
path: root/llvm/test/TableGen/prep-diag2.td
blob: 741026b9c8a2d6415ac0cf6a28fa6c8db25824c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: not llvm-tblgen -DDIAG1 -I %p %s 2>&1 | FileCheck --check-prefixes=DIAG1 %s
// RUN: not llvm-tblgen -I %p %s 2>&1 | FileCheck --check-prefixes=DIAG2 %s

#ifdef DIAG1
// DIAG1: error: Only comments are supported after #else

// Invalid #else below should be detected even if DIAG1 is not defined.
// DIAG2: error: Only comments are supported after #else
#ifdef DIAG2//DIAG2
#else/*
*/class C;
#endif
#endif // DIAG1

OpenPOWER on IntegriCloud