minix/external/bsd/llvm/dist/clang/test/PCH/cxx-constexpr.cpp
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

22 lines
712 B
C++

// RUN: %clang_cc1 -pedantic-errors -std=c++98 -emit-pch %s -o %t
// RUN: %clang_cc1 -pedantic-errors -std=c++98 -include-pch %t -verify %s
// RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t-cxx11
// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t-cxx11 -verify %s
// RUN: %clang_cc1 -pedantic-errors -std=c++98 -emit-pch %s -o %t -fmodules
// RUN: %clang_cc1 -pedantic-errors -std=c++98 -include-pch %t -verify %s -fmodules
#ifndef HEADER_INCLUDED
#define HEADER_INCLUDED
extern const int a;
const int b = a;
#else
const int a = 5;
typedef int T[b]; // expected-error {{variable length array}} expected-error {{must be an integer constant expression}}
typedef int T[5];
#endif