[cfe-commits] r52006 - /cfe/trunk/lib/Sema/SemaDeclObjC.cpp
Steve Naroff
snaroff at apple.com
Thu Jun 5 08:03:28 PDT 2008
Author: snaroff
Date: Thu Jun 5 10:03:27 2008
New Revision: 52006
URL: http://llvm.org/viewvc/llvm-project?rev=52006&view=rev
Log:
Fixed a recent test regression from last night (r51976).
Modified:
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=52006&r1=52005&r2=52006&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Thu Jun 5 10:03:27 2008
@@ -408,19 +408,19 @@
/// Check that class of this category is already completely declared.
if (!IDecl || IDecl->isForwardDecl())
Diag(ClassLoc, diag::err_undef_interface, ClassName->getName());
- else if (CategoryName) {
+ else {
/// Check for duplicate interface declaration for this category
ObjCCategoryDecl *CDeclChain;
for (CDeclChain = IDecl->getCategoryList(); CDeclChain;
CDeclChain = CDeclChain->getNextClassCategory()) {
- if (CDeclChain->getIdentifier() == CategoryName) {
+ if (CategoryName && CDeclChain->getIdentifier() == CategoryName) {
Diag(CategoryLoc, diag::warn_dup_category_def, ClassName->getName(),
CategoryName->getName());
break;
}
}
- if (!CDeclChain)
- CDecl->insertNextClassCategory();
+ if (!CDeclChain)
+ CDecl->insertNextClassCategory();
}
if (NumProtoRefs) {
More information about the cfe-commits
mailing list