summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-12-19 06:19:21 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-12-19 06:19:21 +0000
commitd0b4dd656d11d60855bf5b78c7059a3a6c5724d4 (patch)
tree35d257022b6b7e00a6cf5e0cc038a8a1c7b588ac /clang/lib/CodeGen/CodeGenModule.cpp
parentdec792ebb5de0a6b9ff7b9f5ae25682c7031e529 (diff)
downloadbcm5719-llvm-d0b4dd656d11d60855bf5b78c7059a3a6c5724d4.tar.gz
bcm5719-llvm-d0b4dd656d11d60855bf5b78c7059a3a6c5724d4.zip
constexpr handling improvements. Produce detailed diagnostics when a 'constexpr'
variable is initialized by a non-constant expression, and pass in the variable being declared so that earlier-initialized fields' values can be used. Rearrange VarDecl init evaluation to make this possible, and in so doing fix a long-standing issue in our C++ constant expression handling, where we would mishandle cases like: extern const int a; const int n = a; const int a = 5; int arr[n]; Here, n is not initialized by a constant expression, so can't be used in an ICE, even though the initialization expression would be an ICE if it appeared later in the TU. This requires computing whether the initializer is an ICE eagerly, and saving that information in PCH files. llvm-svn: 146856
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud