[flang][cuda] Adapt ExternalNameConversion to work in gpu module (#117039)
[llvm-project.git] / clang / test / AST / ByteCode / cxx11-pedantic.cpp
blob8779a2826c50dbf3a93bbb3fd89704cdb2dde058
1 // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=both,expected -std=c++11 -triple x86_64-linux -pedantic %s
2 // RUN: %clang_cc1 -verify=both,ref -std=c++11 -triple x86_64-linux -pedantic %s
4 struct T { int n; };
5 const T t = { 42 }; // both-note 2{{declared here}}
6 struct S {
7 int m : t.n; // both-warning {{width of bit-field 'm' (42 bits)}} \
8 // both-warning {{expression is not an integral constant expression}} \
9 // both-note {{read of non-constexpr variable 't' is not allowed}}
12 static_assert(t.n == 42, ""); // both-error {{expression is not an integral constant expression}} \
13 // both-note {{read of non-constexpr variable 't' is not allowed}}