aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-05-09 21:49:29 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-05-09 21:49:29 +0000
commit1de6a6cb485fb58b4fb100282bb3cf298eedacd9 (patch)
tree37b7745f0dcd9bf17eb64ec64c87586224f93b67 /lib/Sema/SemaDecl.cpp
parent060ddb0173ba91cd400f073ed0bd1f9b9c3a4d50 (diff)
objective-c. Fixes a 'fixit' where location of
'*' on objective-c class name was misplaced. // rdar://11311333 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index fc37a25d8b..dfe73884d4 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -7193,9 +7193,10 @@ ParmVarDecl *Sema::CheckParameter(DeclContext *DC, SourceLocation StartLoc,
// Parameter declarators cannot be interface types. All ObjC objects are
// passed by reference.
if (T->isObjCObjectType()) {
+ SourceLocation TypeEndLoc = TSInfo->getTypeLoc().getLocEnd();
Diag(NameLoc,
diag::err_object_cannot_be_passed_returned_by_value) << 1 << T
- << FixItHint::CreateInsertion(NameLoc, "*");
+ << FixItHint::CreateInsertion(TypeEndLoc, "*");
T = Context.getObjCObjectPointerType(T);
New->setType(T);
}