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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to