aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-23 22:46:27 +0000
committerChris Lattner <sabre@nondot.org>2008-11-23 22:46:27 +0000
commitb8b96aff63e24ff1509f112de871f697aaea55f9 (patch)
treed529994cf00492879aabb3ea89c8adad9d1034cc /lib/Sema/SemaDeclObjC.cpp
parent6ff0fc341f6d66b523d63b5d3fdfe00f6d4254fd (diff)
make some objc redefinition warnings more consistent: call definitions
"definitions", not declarations. Point out the location of the original definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 7ffae4725c..c030a370e4 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -76,6 +76,8 @@ ActOnStartClassInterface(SourceLocation AtInterfaceLoc,
// Class already seen. Is it a forward declaration?
if (!IDecl->isForwardDecl()) {
Diag(AtInterfaceLoc, diag::err_duplicate_class_def) << IDecl->getName();
+ Diag(IDecl->getLocation(), diag::note_previous_definition);
+
// Return the previous class interface.
// FIXME: don't leak the objects passed in!
return IDecl;
@@ -188,6 +190,7 @@ Sema::ActOnStartProtocolInterface(SourceLocation AtProtoInterfaceLoc,
// Protocol already seen. Better be a forward protocol declaration
if (!PDecl->isForwardDecl()) {
Diag(ProtocolLoc, diag::err_duplicate_protocol_def) << ProtocolName;
+ Diag(PDecl->getLocation(), diag::note_previous_definition);
// Just return the protocol we already had.
// FIXME: don't leak the objects passed in!
return PDecl;