Tweak duplicate category diagnostic to work like the duplicate protocol diagnostic.
Also, point out where the previous decl was. This unxfails two tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59918 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 49bfad7..7ffae47 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -406,6 +406,7 @@
if (CategoryName && CDeclChain->getIdentifier() == CategoryName) {
Diag(CategoryLoc, diag::warn_dup_category_def)
<< ClassName << CategoryName;
+ Diag(CDeclChain->getLocation(), diag::note_previous_definition);
break;
}
}