erik.pilkington added inline comments.
================
Comment at: lib/AST/StmtPrinter.cpp:502
@@ +501,3 @@
+ ObjCAvailabilityCheckExpr *Node) {
+ OS << "@available(...)";
+}
----------------
manmanren wrote:
> Why not print other information of Node?
Because by the time that we have the `ObjCAvailabilityCheckExpr`, we no longer
keep track of the `AvailabilitySpec`s that are no longer relevant (ie, watchos
if the platform we are targeting is macos), therefore we cannot replicate the
text that lead to this particular `@available`. Is it worth it to carry these
specs around? I can't think of any other time they are useful. (FWIW, many
other AST nodes are also not fully supported, for example `ObjCAtCatchStmt`
just above this.)
================
Comment at: lib/Parse/ParseDecl.cpp:723
@@ -722,3 +722,3 @@
VersionTuple Parser::ParseVersionTuple(SourceRange &Range) {
- Range = Tok.getLocation();
+ Range.setBegin(Tok.getLocation());
----------------
manmanren wrote:
> I don't quite get what motivates this change. Are we not setting the range
> correctly before, for version tuples?
Yes, `Range = Tok.getLocation()` sets both the Begin & End locations in Range
to the same location, which makes us place the cursor at the wrong place in
some diagnostics. I've fixed this a bit in the new patch.
http://reviews.llvm.org/D22171
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits