From e2190ccc7d3a308425accf03d06ee1319106baa9 Mon Sep 17 00:00:00 2001 From: Nikola Smiljanic Date: Fri, 23 May 2014 12:48:27 +0000 Subject: [PATCH] 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 --- lib/Sema/SemaDeclCXX.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.40.0