PR19352 - getLocation() points to the wrong position for FriendDecls

llvm-svn: 209511
This commit is contained in:
Nikola Smiljanic 2014-05-23 12:48:27 +00:00
parent 13a0a38fe0
commit 3a01af0805

View File

@ -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