mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-30 09:56:07 +00:00
14 lines
254 B
C++
14 lines
254 B
C++
![]() |
// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=both,expected %s
|
||
|
// RUN: %clang_cc1 -verify=both,ref %s
|
||
|
|
||
|
|
||
|
// both-no-diagnostics
|
||
|
|
||
|
extern const int E;
|
||
|
constexpr int getE() {
|
||
|
return E;
|
||
|
}
|
||
|
const int E = 10;
|
||
|
static_assert(getE() == 10);
|
||
|
|