diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-12-21 02:55:12 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-12-21 02:55:12 +0000 |
commit | 1d238ea926bbdd04356ce475934fcd4cac654c4b (patch) | |
tree | 06e68608a02ef5c6e4bf42648bd8323e50bd8b5e /lib/Sema/SemaDecl.cpp | |
parent | 14b94366a829d2ed1b1b6d5cec1bb83aad9aeca2 (diff) |
C++11 half of r147023: In C++11, additionally eagerly instantiate:
- constexpr function template instantiations
- variables of reference type
- constexpr variables
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147031 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index ebcdcf58d0..9ae39f1af3 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -6544,8 +6544,7 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl *var) { for (unsigned I = 0, N = Notes.size(); I != N; ++I) Diag(Notes[I].first, Notes[I].second); } - } else if (getLangOptions().CPlusPlus && !Type.isVolatileQualified() && - Type.isConstQualified() && Type->isIntegralOrEnumerationType()) { + } else if (var->isUsableInConstantExpressions()) { // Check whether the initializer of a const variable of integral or // enumeration type is an ICE now, since we can't tell whether it was // initialized by a constant expression if we check later. |