Home | History | Annotate | Download | only in PCH
      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 {{variable length array}} expected-error {{must be an integer constant expression}}
     20 typedef int T[5];
     21 
     22 #endif
     23