| 1 |
// RUN: %clang_cc1 -pedantic-errors -std=c++98 -emit-pch %s -o %t |
| 2 |
// RUN: %clang_cc1 -pedantic-errors -std=c++98 -include-pch %t -verify %s |
| 3 |
|
| 4 |
// RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t-cxx11 |
| 5 |
// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t-cxx11 -verify %s |
| 6 |
|
| 7 |
// RUN: %clang_cc1 -pedantic-errors -std=c++98 -emit-pch %s -o %t -fmodules |
| 8 |
// RUN: %clang_cc1 -pedantic-errors -std=c++98 -include-pch %t -verify %s -fmodules |
| 9 |
|
| 10 |
#ifndef HEADER_INCLUDED |
| 11 |
|
| 12 |
#define HEADER_INCLUDED |
| 13 |
extern const int a; |
| 14 |
const int b = a; |
| 15 |
|
| 16 |
#else |
| 17 |
|
| 18 |
const int a = 5; |
| 19 |
typedef int T[b]; // expected-error 2{{variable length array}} expected-note {{initializer of 'b'}} |
| 20 |
// expected-note@14 {{here}} |
| 21 |
typedef int T[5]; |
| 22 |
|
| 23 |
#endif |