summaryrefslogtreecommitdiff
path: root/clang/test/AST/ByteCode/extern.cpp
blob: c3215931d41f87131252bb4b76d6462a49b84318 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=both,expected %s
// RUN: %clang_cc1                                         -verify=both,ref      %s

// both-no-diagnostics

extern const double Num;
extern const double Num = 12;

extern const int E;
constexpr int getE() {
  return E;
}
const int E = 10;
static_assert(getE() == 10);