[PATCH] D21075: Correct invalid end location in diagnostics for some identifiers.
Erik Verbruggen via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 5 07:03:00 PDT 2016
erikjv added a comment.
I'll add tests in the next diff, but I'd like to know if these changes are ok.
================
Comment at: lib/Sema/SemaType.cpp:1339
@@ +1338,3 @@
+ auto R = DS.getSourceRange();
+ if (R.getEnd().isInvalid())
+ R.setEnd(R.getBegin());
----------------
klimek wrote:
> Do you know in which cases we get source ranges that are half valid?
In Parser::ParseTypeofSpecifier the 'cast range' for a typeof(...) is parsed, but is found to be invalid. Then it explicitly sets the DeclSpec's end location to an invalid location.
http://reviews.llvm.org/D21075
More information about the cfe-commits
mailing list