commit | d6f80daa84164ceeb8900da07f43b6a150edf713 | [log] [tgz] |
---|---|---|
author | Richard Smith <richard-llvm@metafoo.co.uk> | Thu Sep 20 01:31:00 2012 +0000 |
committer | Richard Smith <richard-llvm@metafoo.co.uk> | Thu Sep 20 01:31:00 2012 +0000 |
tree | c671ddd9d89989bf6cfbac1cf9fc4c1887683e57 | |
parent | 561e3c68864d11f39a07a6d1711ce08d2739a263 [diff] [blame] |
Per C++11 [class.friend]p3, the 'friend' keyword must appear first in a non-function friend declaration. Patch by Josh Magee! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164273 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index 21ddd47..8c1722f 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -510,7 +510,7 @@ if (!InstTy) return 0; - FriendDecl *FD = SemaRef.CheckFriendTypeDecl(D->getLocation(), + FriendDecl *FD = SemaRef.CheckFriendTypeDecl(D->getLocStart(), D->getFriendLoc(), InstTy); if (!FD) return 0;