xref: /llvm-project/clang/test/AST/ByteCode/extern.cpp (revision 8e2dbab24276a8521d241463b4161c78bc4d39d2)
1 // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=both,expected %s
2 // RUN: %clang_cc1 -verify=both,ref %s
3 
4 
5 // both-no-diagnostics
6 
7 extern const int E;
8 constexpr int getE() {
9   return E;
10 }
11 const int E = 10;
12 static_assert(getE() == 10);
13 
14