diff options
author | Matt Beaumont-Gay <matthewbg@google.com> | 2011-08-25 23:22:24 +0000 |
---|---|---|
committer | Matt Beaumont-Gay <matthewbg@google.com> | 2011-08-25 23:22:24 +0000 |
commit | 3a51d418b267c2b302f1f6a10273049c6ce95e2b (patch) | |
tree | 22d1f1848ab828041cd38530c636e4cc1a38e450 /lib/Sema/SemaTemplate.cpp | |
parent | 410ffb2bc5f072d58a73c14560345bcf77dec1cc (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138601 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index a7d74ce7e8..c3d155cc84 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/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>()) { |