From: Nikola Smiljanic Date: Fri, 23 May 2014 12:48:27 +0000 (+0000) Subject: PR19352 - getLocation() points to the wrong position for FriendDecls X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2190ccc7d3a308425accf03d06ee1319106baa9;p=clang PR19352 - getLocation() points to the wrong position for FriendDecls git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209511 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 425c0f6bc6..2930d30752 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/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