Files
llvm/lldb/scripts/clang.instantiate-complete-type.diff
Sean Callanan a5230ce303 Picked up a new revision of Clang to pull in Objective-C
enhancements.  With these enhancements, the return values
of Objective-C methods with unknown return types can be
implicitly cast to id for the purpose of making method
calls.

So what would have required this:

(int)[(id)[ClassWithNoDebugInfo methodReturningObject] methodReturningInt]

can now be written as:

(int)[[ClassWithNoDebugInfo methodReturningObject] methodReturningInt]

llvm-svn: 145567
2011-12-01 04:31:46 +00:00

16 lines
634 B
Diff

Index: lib/Sema/SemaTemplateInstantiate.cpp
===================================================================
--- lib/Sema/SemaTemplateInstantiate.cpp (revision 145552)
+++ lib/Sema/SemaTemplateInstantiate.cpp (working copy)
@@ -1683,6 +1683,10 @@
TemplateSpecializationKind TSK,
bool Complain) {
bool Invalid = false;
+
+ RequireCompleteType(Pattern->getLocation(),
+ QualType(Pattern->getTypeForDecl(), 0),
+ diag::err_incomplete_type);
CXXRecordDecl *PatternDef
= cast_or_null<CXXRecordDecl>(Pattern->getDefinition());