24 lines · cpp
1// RUN: %clang_cc1 -pedantic-errors -std=c++98 -emit-pch %s -o %t2// RUN: %clang_cc1 -pedantic-errors -std=c++98 -include-pch %t -verify %s3 4// RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t-cxx115// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t-cxx11 -verify %s6 7// RUN: %clang_cc1 -pedantic-errors -std=c++98 -emit-pch %s -o %t -fmodules8// RUN: %clang_cc1 -pedantic-errors -std=c++98 -include-pch %t -verify %s -fmodules9 10#ifndef HEADER_INCLUDED11 12#define HEADER_INCLUDED13extern const int a;14const int b = a;15 16#else17 18const int a = 5;19typedef int T[b]; // expected-error 2{{variable length array}} expected-note {{initializer of 'b'}}20// expected-note@14 {{here}}21typedef int T[5];22 23#endif24