summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH/cxx-constexpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix 41 of the 61 tests which fail with modules enabled: we were computing andRichard Smith2013-04-041-0/+3
| | | | | | | | | caching the linkage for a declaration before we set up its redeclaration chain, when determining whether a declaration could be a redeclaration of something from an unimported submodule. We actually want to look at the declaration as if it were not a redeclaration here, so compute the linkage but don't cache it. llvm-svn: 178733
* constexpr handling improvements. Produce detailed diagnostics when a 'constexpr'Richard Smith2011-12-191-0/+19
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
OpenPOWER on IntegriCloud