Extend ObjCMessageExpr for class method sends with the source location
of the class name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97943 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index 3a05241..c60455d 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -470,13 +470,13 @@
// now, we simply pass the "super" identifier through (which isn't consistent
// with instance methods.
if (isSuper)
- return new (Context) ObjCMessageExpr(Context, receiverName, Sel, returnType,
- Method, lbrac, rbrac, ArgExprs,
- NumArgs);
+ return new (Context) ObjCMessageExpr(Context, receiverName, receiverLoc,
+ Sel, returnType, Method, lbrac, rbrac,
+ ArgExprs, NumArgs);
else
- return new (Context) ObjCMessageExpr(Context, ClassDecl, Sel, returnType,
- Method, lbrac, rbrac, ArgExprs,
- NumArgs);
+ return new (Context) ObjCMessageExpr(Context, ClassDecl, receiverLoc,
+ Sel, returnType, Method, lbrac, rbrac,
+ ArgExprs, NumArgs);
}
// ActOnInstanceMessage - used for both unary and keyword messages.