[cfe-commits] r144573 - in /cfe/trunk: include/clang/Basic/ lib/Sema/ test/Analysis/ test/SemaObjC/
Douglas Gregor
dgregor at apple.com
Mon Nov 14 14:10:01 PST 2011
Author: dgregor
Date: Mon Nov 14 16:10:01 2011
New Revision: 144573
URL: http://llvm.org/viewvc/llvm-project?rev=144573&view=rev
Log:
Use Sema::RequireCompleteType to check for the completeness of
Objective-C classes. This has two purposes: to consistently provide
"forward declaration here" notes when we hit an incomplete type, and
to give LLDB a chance to complete the type.
RequireCompleteType bits from Sean Callanan!
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
cfe/trunk/lib/Sema/SemaExprObjC.cpp
cfe/trunk/lib/Sema/SemaStmt.cpp
cfe/trunk/lib/Sema/SemaType.cpp
cfe/trunk/test/Analysis/rdar-6540084.m
cfe/trunk/test/SemaObjC/arc.m
cfe/trunk/test/SemaObjC/category-1.m
cfe/trunk/test/SemaObjC/class-impl-1.m
cfe/trunk/test/SemaObjC/class-proto-1.m
cfe/trunk/test/SemaObjC/exprs.m
cfe/trunk/test/SemaObjC/forward-class-1.m
cfe/trunk/test/SemaObjC/forward-class-receiver.m
cfe/trunk/test/SemaObjC/property-9.m
cfe/trunk/test/SemaObjC/property-missing.m
cfe/trunk/test/SemaObjC/sizeof-interface.m
cfe/trunk/test/SemaObjC/special-dep-unavail-warning.m
cfe/trunk/test/SemaObjC/undef-superclass-1.m
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Nov 14 16:10:01 2011
@@ -373,6 +373,8 @@
def warn_property_types_are_incompatible : Warning<
"property type %0 is incompatible with type %1 inherited from %2">;
def err_undef_interface : Error<"cannot find interface declaration for %0">;
+def err_category_forward_interface : Error<
+ "cannot define %select{category|class extension}0 for undefined class %1">;
def err_class_extension_after_impl : Error<
"cannot declare class extension for %0 after class implementation">;
def note_implementation_declared : Note<
@@ -3617,7 +3619,7 @@
"property %0 refers to an incomplete Objective-C class %1 "
"(with no @interface available)">;
def note_forward_class : Note<
- "forward class is declared here">;
+ "forward declaration of class here">;
def err_duplicate_property : Error<
"property has a previous declaration">;
def ext_gnu_void_ptr : Extension<
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Mon Nov 14 16:10:01 2011
@@ -463,11 +463,12 @@
if (!SuperClassDecl)
Diag(SuperLoc, diag::err_undef_superclass)
<< SuperName << ClassName << SourceRange(AtInterfaceLoc, ClassLoc);
- else if (SuperClassDecl->isForwardDecl()) {
- Diag(SuperLoc, diag::err_forward_superclass)
- << SuperClassDecl->getDeclName() << ClassName
- << SourceRange(AtInterfaceLoc, ClassLoc);
- Diag(SuperClassDecl->getLocation(), diag::note_forward_class);
+ else if (RequireCompleteType(SuperLoc,
+ Context.getObjCInterfaceType(SuperClassDecl),
+ PDiag(diag::err_forward_superclass)
+ << SuperClassDecl->getDeclName()
+ << ClassName
+ << SourceRange(AtInterfaceLoc, ClassLoc))) {
SuperClassDecl = 0;
}
}
@@ -746,14 +747,20 @@
ObjCInterfaceDecl *IDecl = getObjCInterfaceDecl(ClassName, ClassLoc, true);
/// Check that class of this category is already completely declared.
- if (!IDecl || IDecl->isForwardDecl()) {
+
+ if (!IDecl
+ || RequireCompleteType(ClassLoc, Context.getObjCInterfaceType(IDecl),
+ PDiag(diag::err_category_forward_interface)
+ << (CategoryName == 0))) {
// Create an invalid ObjCCategoryDecl to serve as context for
// the enclosing method declarations. We mark the decl invalid
// to make it clear that this isn't a valid AST.
CDecl = ObjCCategoryDecl::Create(Context, CurContext, AtInterfaceLoc,
ClassLoc, CategoryLoc, CategoryName,IDecl);
CDecl->setInvalidDecl();
- Diag(ClassLoc, diag::err_undef_interface) << ClassName;
+
+ if (!IDecl)
+ Diag(ClassLoc, diag::err_undef_interface) << ClassName;
return ActOnObjCContainerStartDefinition(CDecl);
}
@@ -820,9 +827,12 @@
ObjCCategoryImplDecl::Create(Context, CurContext, CatName, IDecl,
ClassLoc, AtCatImplLoc);
/// Check that class of this category is already completely declared.
- if (!IDecl || IDecl->isForwardDecl()) {
+ if (!IDecl) {
Diag(ClassLoc, diag::err_undef_interface) << ClassName;
CDecl->setInvalidDecl();
+ } else if (RequireCompleteType(ClassLoc, Context.getObjCInterfaceType(IDecl),
+ diag::err_undef_interface)) {
+ CDecl->setInvalidDecl();
}
// FIXME: PushOnScopeChains?
@@ -867,11 +877,9 @@
Diag(ClassLoc, diag::err_redefinition_different_kind) << ClassName;
Diag(PrevDecl->getLocation(), diag::note_previous_definition);
} else if ((IDecl = dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl))) {
- // If this is a forward declaration of an interface, warn.
- if (IDecl->isForwardDecl()) {
- Diag(ClassLoc, diag::warn_undef_interface) << ClassName;
+ if (RequireCompleteType(ClassLoc, Context.getObjCInterfaceType(IDecl),
+ diag::warn_undef_interface))
IDecl = 0;
- }
} else {
// We did not find anything with the name ClassName; try to correct for
// typos in the class name.
Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Mon Nov 14 16:10:01 2011
@@ -591,13 +591,13 @@
}
IdentifierInfo *Member = MemberName.getAsIdentifierInfo();
-
- if (IFace->isForwardDecl()) {
- Diag(MemberLoc, diag::err_property_not_found_forward_class)
- << MemberName << QualType(OPT, 0);
- Diag(IFace->getLocation(), diag::note_forward_class);
+ SourceRange BaseRange = Super? SourceRange(SuperLoc)
+ : BaseExpr->getSourceRange();
+ if (RequireCompleteType(MemberLoc, OPT->getPointeeType(),
+ PDiag(diag::err_property_not_found_forward_class)
+ << MemberName << BaseRange))
return ExprError();
- }
+
// Search for a declared property first.
if (ObjCPropertyDecl *PD = IFace->FindPropertyDeclaration(Member)) {
// Check whether we can reference this property.
@@ -722,14 +722,10 @@
QualType T = Ivar->getType();
if (const ObjCObjectPointerType * OBJPT =
T->getAsObjCInterfacePointerType()) {
- const ObjCInterfaceType *IFaceT = OBJPT->getInterfaceType();
- if (ObjCInterfaceDecl *IFace = IFaceT->getDecl())
- if (IFace->isForwardDecl()) {
- Diag(MemberLoc, diag::err_property_not_as_forward_class)
- << MemberName << IFace;
- Diag(IFace->getLocation(), diag::note_forward_class);
- return ExprError();
- }
+ if (RequireCompleteType(MemberLoc, OBJPT->getPointeeType(),
+ PDiag(diag::err_property_not_as_forward_class)
+ << MemberName << BaseExpr->getSourceRange()))
+ return ExprError();
}
Diag(MemberLoc,
diag::err_ivar_access_using_property_syntax_suggest)
@@ -1083,13 +1079,14 @@
(void)DiagnoseUseOfDecl(Class, Loc);
// Find the method we are messaging.
if (!Method) {
- if (Class->isForwardDecl()) {
- if (getLangOptions().ObjCAutoRefCount) {
- Diag(Loc, diag::err_arc_receiver_forward_class) << ReceiverType;
- } else {
- Diag(Loc, diag::warn_receiver_forward_class) << Class->getDeclName();
- }
-
+ SourceRange TypeRange
+ = SuperLoc.isValid()? SourceRange(SuperLoc)
+ : ReceiverTypeInfo->getTypeLoc().getSourceRange();
+ if (RequireCompleteType(Loc, Context.getObjCInterfaceType(Class),
+ (getLangOptions().ObjCAutoRefCount
+ ? PDiag(diag::err_arc_receiver_forward_class)
+ : PDiag(diag::warn_receiver_forward_class))
+ << TypeRange)) {
// A forward class used in messaging is treated as a 'Class'
Method = LookupFactoryMethodInGlobalPool(Sel,
SourceRange(LBracLoc, RBracLoc));
@@ -1322,13 +1319,21 @@
// We allow sending a message to a pointer to an interface (an object).
ClassDecl = OCIType->getInterfaceDecl();
- if (ClassDecl->isForwardDecl() && getLangOptions().ObjCAutoRefCount) {
- Diag(Loc, diag::err_arc_receiver_forward_instance)
- << OCIType->getPointeeType()
- << (Receiver ? Receiver->getSourceRange() : SourceRange(SuperLoc));
- return ExprError();
+ // Try to complete the type. Under ARC, this is a hard error from which
+ // we don't try to recover.
+ const ObjCInterfaceDecl *forwardClass = 0;
+ if (RequireCompleteType(Loc, OCIType->getPointeeType(),
+ getLangOptions().ObjCAutoRefCount
+ ? PDiag(diag::err_arc_receiver_forward_instance)
+ << (Receiver ? Receiver->getSourceRange()
+ : SourceRange(SuperLoc))
+ : PDiag())) {
+ if (getLangOptions().ObjCAutoRefCount)
+ return ExprError();
+
+ forwardClass = OCIType->getInterfaceDecl();
}
-
+
// FIXME: consider using LookupInstanceMethodInGlobalPool, since it will be
// faster than the following method (which can do *many* linear searches).
// The idea is to add class info to MethodPool.
@@ -1338,7 +1343,6 @@
// Search protocol qualifiers.
Method = LookupMethodInQualifiedType(Sel, OCIType, true);
- const ObjCInterfaceDecl *forwardClass = 0;
if (!Method) {
// If we have implementations in scope, check "private" methods.
Method = LookupPrivateInstanceMethod(Sel, ClassDecl);
@@ -1356,8 +1360,6 @@
if (OCIType->qual_empty()) {
Method = LookupInstanceMethodInGlobalPool(Sel,
SourceRange(LBracLoc, RBracLoc));
- if (OCIType->getInterfaceDecl()->isForwardDecl())
- forwardClass = OCIType->getInterfaceDecl();
if (Method && !forwardClass)
Diag(Loc, diag::warn_maynot_respond)
<< OCIType->getInterfaceDecl()->getIdentifier() << Sel;
Modified: cfe/trunk/lib/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmt.cpp?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Mon Nov 14 16:10:01 2011
@@ -1060,13 +1060,13 @@
ObjCInterfaceDecl *iface = objectType->getInterface();
// If we have a forward-declared type, we can't do this check.
- if (iface && iface->isForwardDecl()) {
- // This is ill-formed under ARC.
- if (getLangOptions().ObjCAutoRefCount) {
- Diag(forLoc, diag::err_arc_collection_forward)
- << pointerType->getPointeeType() << collection->getSourceRange();
- }
-
+ // Under ARC, it is an error not to have a forward-declared class.
+ if (iface &&
+ RequireCompleteType(forLoc, QualType(objectType, 0),
+ getLangOptions().ObjCAutoRefCount
+ ? PDiag(diag::err_arc_collection_forward)
+ << collection->getSourceRange()
+ : PDiag(0))) {
// Otherwise, if we have any useful type information, check that
// the type declares the appropriate method.
} else if (iface || !objectType->qual_empty()) {
Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Mon Nov 14 16:10:01 2011
@@ -4098,21 +4098,36 @@
return true;
const TagType *Tag = T->getAs<TagType>();
+ const ObjCInterfaceType *IFace = 0;
+
+ if (Tag) {
+ // Avoid diagnosing invalid decls as incomplete.
+ if (Tag->getDecl()->isInvalidDecl())
+ return true;
- // Avoid diagnosing invalid decls as incomplete.
- if (Tag && Tag->getDecl()->isInvalidDecl())
- return true;
-
- // Give the external AST source a chance to complete the type.
- if (Tag && Tag->getDecl()->hasExternalLexicalStorage()) {
- Context.getExternalSource()->CompleteType(Tag->getDecl());
- if (!Tag->isIncompleteType())
- return false;
+ // Give the external AST source a chance to complete the type.
+ if (Tag->getDecl()->hasExternalLexicalStorage()) {
+ Context.getExternalSource()->CompleteType(Tag->getDecl());
+ if (!Tag->isIncompleteType())
+ return false;
+ }
}
-
+ else if ((IFace = T->getAs<ObjCInterfaceType>())) {
+ // Avoid diagnosing invalid decls as incomplete.
+ if (IFace->getDecl()->isInvalidDecl())
+ return true;
+
+ // Give the external AST source a chance to complete the type.
+ if (IFace->getDecl()->hasExternalLexicalStorage()) {
+ Context.getExternalSource()->CompleteType(IFace->getDecl());
+ if (!IFace->isIncompleteType())
+ return false;
+ }
+ }
+
// We have an incomplete type. Produce a diagnostic.
Diag(Loc, PD) << T;
-
+
// If we have a note, produce it.
if (!Note.first.isInvalid())
Diag(Note.first, Note.second);
@@ -4123,7 +4138,11 @@
Diag(Tag->getDecl()->getLocation(),
Tag->isBeingDefined() ? diag::note_type_being_defined
: diag::note_forward_declaration)
- << QualType(Tag, 0);
+ << QualType(Tag, 0);
+
+ // If the Objective-C class was a forward declaration, produce a note.
+ if (IFace && !IFace->getDecl()->isInvalidDecl())
+ Diag(IFace->getDecl()->getLocation(), diag::note_forward_class);
return true;
}
Modified: cfe/trunk/test/Analysis/rdar-6540084.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/rdar-6540084.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/rdar-6540084.m (original)
+++ cfe/trunk/test/Analysis/rdar-6540084.m Mon Nov 14 16:10:01 2011
@@ -10,7 +10,7 @@
@interface NSObject <NSObject> {} @end
extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone);
@class NSArray;
- at class NSMutableArray, NSIndexSet, NSView, NSPredicate, NSString, NSViewAnimation, NSTimer;
+ at class NSMutableArray, NSIndexSet, NSView, NSPredicate, NSString, NSViewAnimation, NSTimer; // expected-note{{forward declaration of class here}}
@interface FooBazController : NSObject {}
@end
typedef struct {} TazVersion;
Modified: cfe/trunk/test/SemaObjC/arc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc.m (original)
+++ cfe/trunk/test/SemaObjC/arc.m Mon Nov 14 16:10:01 2011
@@ -378,7 +378,7 @@
[v test16_6: 0];
}
- at class Test17;
+ at class Test17; // expected-note 2{{forward declaration of class here}}
@protocol Test17p
- (void) test17;
+ (void) test17;
@@ -651,7 +651,7 @@
__builtin_va_end(arglist);
}
- at class Test37;
+ at class Test37; // expected-note{{forward declaration of class here}}
void test37(Test37 *c) {
for (id y in c) { // expected-error {{collection expression type 'Test37' is a forward declaration}}
(void) y;
Modified: cfe/trunk/test/SemaObjC/category-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/category-1.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/category-1.m (original)
+++ cfe/trunk/test/SemaObjC/category-1.m Mon Nov 14 16:10:01 2011
@@ -31,9 +31,9 @@
@interface UnknownClass (Category) @end // expected-error {{cannot find interface declaration for 'UnknownClass'}}
- at class MyClass2;
+ at class MyClass2; // expected-note{{forward declaration of class here}}
- at interface MyClass2 (Category) @end // expected-error {{cannot find interface declaration for 'MyClass2'}}
+ at interface MyClass2 (Category) @end // expected-error {{cannot define category for undefined class 'MyClass2'}}
@interface XCRemoteComputerManager
@end
Modified: cfe/trunk/test/SemaObjC/class-impl-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/class-impl-1.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/class-impl-1.m (original)
+++ cfe/trunk/test/SemaObjC/class-impl-1.m Mon Nov 14 16:10:01 2011
@@ -31,7 +31,7 @@
@implementation INTF4 @end // expected-warning {{cannot find interface declaration for 'INTF4'}}
- at class INTF5;
+ at class INTF5; // expected-note{{forward declaration of class here}}
@implementation INTF5 { // expected-warning {{cannot find interface declaration for 'INTF5'}}
int x;
Modified: cfe/trunk/test/SemaObjC/class-proto-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/class-proto-1.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/class-proto-1.m (original)
+++ cfe/trunk/test/SemaObjC/class-proto-1.m Mon Nov 14 16:10:01 2011
@@ -23,7 +23,7 @@
@interface E2 <p1,p2,p3> @end // expected-warning {{cannot find protocol definition for 'p3'}}
- at class U1, U2; // expected-note {{forward class is declared here}}
+ at class U1, U2; // expected-note {{forward declaration of class here}}
@interface E3 : U1 @end // expected-error {{attempting to use the forward class 'U1' as superclass of 'E3'}}
Modified: cfe/trunk/test/SemaObjC/exprs.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/exprs.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/exprs.m (original)
+++ cfe/trunk/test/SemaObjC/exprs.m Mon Nov 14 16:10:01 2011
@@ -33,7 +33,7 @@
__sync_bool_compare_and_swap(&g, 0, o);
}
- at class Incomplete_ObjC_class;
+ at class Incomplete_ObjC_class; // expected-note{{forward declaration of class here}}
struct Incomplete_struct; // expected-note {{forward declaration}}
void test_encode() {
Modified: cfe/trunk/test/SemaObjC/forward-class-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/forward-class-1.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/forward-class-1.m (original)
+++ cfe/trunk/test/SemaObjC/forward-class-1.m Mon Nov 14 16:10:01 2011
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
- at class FOO, BAR; // expected-note {{forward class is declared here}}
+ at class FOO, BAR; // expected-note {{forward declaration of class here}}
@class FOO, BAR;
@interface INTF : FOO // expected-error {{attempting to use the forward class 'FOO' as superclass of 'INTF'}}
@@ -46,7 +46,7 @@
// rdar://9653341
- at class B; // expected-note {{forward class is declared here}}
+ at class B; // expected-note {{forward declaration of class here}}
@interface A : B {} // expected-error {{attempting to use the forward class 'B' as superclass of 'A'}}
@end
Modified: cfe/trunk/test/SemaObjC/forward-class-receiver.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/forward-class-receiver.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/forward-class-receiver.m (original)
+++ cfe/trunk/test/SemaObjC/forward-class-receiver.m Mon Nov 14 16:10:01 2011
@@ -5,7 +5,7 @@
@end
Class isa;
- at class NotKnown;
+ at class NotKnown; // expected-note{{forward declaration of class here}}
void foo(NotKnown *n) {
[isa new];
Modified: cfe/trunk/test/SemaObjC/property-9.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-9.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/property-9.m (original)
+++ cfe/trunk/test/SemaObjC/property-9.m Mon Nov 14 16:10:01 2011
@@ -97,13 +97,13 @@
@end
// rdar://8774513
- at class MDAInstance; // expected-note {{forward class is declared here}}
+ at class MDAInstance; // expected-note {{forward declaration of class here}}
@interface MDATestDocument
@property(retain) MDAInstance *instance;
@end
id f0(MDATestDocument *d) {
- return d.instance.path; // expected-error {{property 'path' cannot be found in forward class object 'MDAInstance *'}}
+ return d.instance.path; // expected-error {{property 'path' cannot be found in forward class object 'MDAInstance'}}
}
Modified: cfe/trunk/test/SemaObjC/property-missing.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-missing.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/property-missing.m (original)
+++ cfe/trunk/test/SemaObjC/property-missing.m Mon Nov 14 16:10:01 2011
@@ -21,7 +21,7 @@
}
// rdar://8851803
- at class SomeOtherClass; // expected-note {{forward class is declared here}}
+ at class SomeOtherClass; // expected-note {{forward declaration of class here}}
@interface MyClass {
SomeOtherClass *someOtherObject;
Modified: cfe/trunk/test/SemaObjC/sizeof-interface.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/sizeof-interface.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/sizeof-interface.m (original)
+++ cfe/trunk/test/SemaObjC/sizeof-interface.m Mon Nov 14 16:10:01 2011
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -verify -fsyntax-only %s
- at class I0;
+ at class I0; // expected-note 3{{forward declaration of class here}}
// rdar://6811884
int g0 = sizeof(I0); // expected-error{{invalid application of 'sizeof' to an incomplete type 'I0'}}
Modified: cfe/trunk/test/SemaObjC/special-dep-unavail-warning.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/special-dep-unavail-warning.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/special-dep-unavail-warning.m (original)
+++ cfe/trunk/test/SemaObjC/special-dep-unavail-warning.m Mon Nov 14 16:10:01 2011
@@ -27,7 +27,7 @@
@end
- at class C; // expected-note 5 {{forward class is declared here}}
+ at class C; // expected-note 5 {{forward declaration of class here}}
void test(C *c) {
[c depInA]; // expected-warning {{'depInA' maybe deprecated because receiver type is unknown}}
Modified: cfe/trunk/test/SemaObjC/undef-superclass-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/undef-superclass-1.m?rev=144573&r1=144572&r2=144573&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/undef-superclass-1.m (original)
+++ cfe/trunk/test/SemaObjC/undef-superclass-1.m Mon Nov 14 16:10:01 2011
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
- at class SUPER, Y; // expected-note 2 {{forward class is declared here}}
+ at class SUPER, Y; // expected-note 2 {{forward declaration of class here}}
@interface INTF :SUPER // expected-error {{attempting to use the forward class 'SUPER' as superclass of 'INTF'}}
@end
More information about the cfe-commits
mailing list