Il 07/11/2012 01:12, David Blaikie ha scritto:
> Author: dblaikie
> Date: Tue Nov 6 18:12:38 2012
> New Revision: 167507
>
> URL: http://llvm.org/viewvc/llvm-project?rev=167507&view=rev
> Log:
> PR13552: Fix the end location of a CXXNewExpr.
>
> Spent longer than reasonable looking for a nice way to test this & decided to
> give up for now. Open to suggestions/requests. Richard Smith suggested adding
> something to ASTMatchers but it wasn't readily apparent how to test this with
> that.
After this commit we have a regression: the range for "new MyClass()"
now does not include the final parentheses.
>
> -SourceLocation CXXNewExpr::getEndLoc() const {
> - switch (getInitializationStyle()) {
> - case NoInit:
> - return AllocatedTypeInfo->getTypeLoc().getEndLoc();
> - case CallInit:
> - return DirectInitRange.getEnd();
> - case ListInit:
> - return getInitializer()->getSourceRange().getEnd();
> - }
> - llvm_unreachable("bogus initialization style");
> -}
I guess that the problem is due to removal of the code above without a
proper replacement.
--
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