klimek added a reviewer: rsmith. ================ Comment at: lib/Sema/SemaType.cpp:1339 @@ +1338,3 @@ + auto R = DS.getSourceRange(); + if (R.getEnd().isInvalid()) + R.setEnd(R.getBegin()); ---------------- erikjv wrote: > 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. Ok, in this case, we'll need Richard to verify whether he intended half-valid source locations something that users need to deal with.
http://reviews.llvm.org/D21075 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits