diff options
author | Anders Carlsson <andersca@mac.com> | 2009-06-26 03:02:18 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-06-26 03:02:18 +0000 |
commit | 87471f5b64783c52e01e7accc1b123560b52bf35 (patch) | |
tree | 04f070d083a53eadced8eff9521f0bef75084e59 /lib/Sema/SemaTemplateInstantiate.cpp | |
parent | 58d29a41271d96509f464716f79b0ab2e815b6b1 (diff) |
Fix PR4448.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74257 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiate.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index 5e4fde7af9..0c78c71206 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -560,6 +560,11 @@ TemplateTypeInstantiator::InstantiateTypeOfType(const TypeOfType *T, QualType TemplateTypeInstantiator::InstantiateDecltypeType(const DecltypeType *T, unsigned Quals) const { + // C++0x [dcl.type.simple]p4: + // The operand of the decltype specifier is an unevaluated operand. + EnterExpressionEvaluationContext Unevaluated(SemaRef, + Action::Unevaluated); + Sema::OwningExprResult E = SemaRef.InstantiateExpr(T->getUnderlyingExpr(), TemplateArgs); |