From 3a01af08053ba914876b51d116136538dbcc5b95 Mon Sep 17 00:00:00 2001 From: Nikola Smiljanic Date: Fri, 23 May 2014 12:48:27 +0000 Subject: PR19352 - getLocation() points to the wrong position for FriendDecls llvm-svn: 209511 --- clang/lib/Sema/SemaDeclCXX.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clang') diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 425c0f6bc6a..2930d307528 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -11425,7 +11425,9 @@ FriendDecl *Sema::CheckFriendTypeDecl(SourceLocation LocStart, // If the type specifier in a friend declaration designates a (possibly // cv-qualified) class type, that class is declared as a friend; otherwise, // the friend declaration is ignored. - return FriendDecl::Create(Context, CurContext, LocStart, TSInfo, FriendLoc); + return FriendDecl::Create(Context, CurContext, + TSInfo->getTypeLoc().getLocStart(), TSInfo, + FriendLoc); } /// Handle a friend tag declaration where the scope specifier was -- cgit v1.2.3