summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorNikola Smiljanic <popizdeh@gmail.com>2014-05-23 12:48:27 +0000
committerNikola Smiljanic <popizdeh@gmail.com>2014-05-23 12:48:27 +0000
commit3a01af08053ba914876b51d116136538dbcc5b95 (patch)
tree4a4fd8040698ca8c96a2c0e38e5db4ada5a0bd1f /clang
parent13a0a38fe087a0d10f8038ed647c673da6d14370 (diff)
downloadbcm5719-llvm-3a01af08053ba914876b51d116136538dbcc5b95.tar.gz
bcm5719-llvm-3a01af08053ba914876b51d116136538dbcc5b95.zip
PR19352 - getLocation() points to the wrong position for FriendDecls
llvm-svn: 209511
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp4
1 files changed, 3 insertions, 1 deletions
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
OpenPOWER on IntegriCloud