summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorMatt Beaumont-Gay <matthewbg@google.com>2011-08-25 23:22:24 +0000
committerMatt Beaumont-Gay <matthewbg@google.com>2011-08-25 23:22:24 +0000
commit045bde420bc1fda33aee8610bcc4c0f4608cb2d7 (patch)
treed230158f0194fa05d7183d7443b9010eb6ea9115 /clang/lib/Sema/SemaTemplate.cpp
parent16746d1f97f7ca6fcc6c15cbef5705b8f6ff3418 (diff)
downloadbcm5719-llvm-045bde420bc1fda33aee8610bcc4c0f4608cb2d7.tar.gz
bcm5719-llvm-045bde420bc1fda33aee8610bcc4c0f4608cb2d7.zip
Fix a crash-on-invalid.
Much to everyone's surprise, the default constructor for TypeResult produces an instance with Invalid == false. This seems like a decision we may want to revisit. llvm-svn: 138601
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index a7d74ce7e84..c3d155cc84f 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -2131,7 +2131,7 @@ TypeResult Sema::ActOnTagTemplateIdType(TagUseKind TUK,
QualType Result = CheckTemplateIdType(Template, TemplateLoc, TemplateArgs);
if (Result.isNull())
- return TypeResult();
+ return TypeResult(true);
// Check the tag kind
if (const RecordType *RT = Result->getAs<RecordType>()) {
OpenPOWER on IntegriCloud