Il 23/05/2014 14:48, Nikola Smiljanic ha scritto: > Author: nikola > Date: Fri May 23 07:48:27 2014 > New Revision: 209511 > > URL: http://llvm.org/viewvc/llvm-project?rev=209511&view=rev > Log: > PR19352 - getLocation() points to the wrong position for FriendDecls > > Modified: > cfe/trunk/lib/Sema/SemaDeclCXX.cpp > > Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=209511&r1=209510&r2=209511&view=diff > ============================================================================== > --- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original) > +++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Fri May 23 07:48:27 2014 > @@ -11425,7 +11425,9 @@ FriendDecl *Sema::CheckFriendTypeDecl(So > // 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); > }
This seems wrong to me. Did you mean to write getLocEnd() instead? (Under the assumption that identifier should comes last in class type) -- Abramo Bagnara BUGSENG srl - http://bugseng.com mailto:[email protected] _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
