aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-02-22 02:04:18 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-02-22 02:04:18 +0000
commit76f3f69db1416425070177243e9f390122c553e0 (patch)
tree83a6884ce19969ff3a6e5479905e37c824a26271 /lib/Sema/Sema.cpp
parente43fe993a079795ac3d2ba7c9ec5e2a0c8069918 (diff)
Implement C++11 [expr.call]p11: If the operand to a decltype-specifier is a
function call (or a comma expression with a function call on its right-hand side), possibly parenthesized, then the return type is not required to be complete and a temporary is not bound. Other subexpressions inside a decltype expression do not get this treatment. This is implemented by deferring the relevant checks for all calls immediately within a decltype expression, then, when the expression is fully-parsed, checking the relevant constraints and stripping off any top-level temporary binding. Deferring the completion of the return type exposed a bug in overload resolution where completion of the argument types was not attempted, which is also fixed by this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151117 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index 6a83518bc0..cfb4e4c91b 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -111,7 +111,8 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer,
&Context);
ExprEvalContexts.push_back(
- ExpressionEvaluationContextRecord(PotentiallyEvaluated, 0, false, 0));
+ ExpressionEvaluationContextRecord(PotentiallyEvaluated, 0,
+ false, 0, false));
FunctionScopes.push_back(new FunctionScopeInfo(Diags));
}