[PATCH] Parse: Don't crash on trailing whitespace before EOF

Richard Smith richard at metafoo.co.uk
Wed Jul 23 15:15:34 PDT 2014


================
Comment at: lib/Parse/ParseDecl.cpp:2453
@@ -2452,3 +2452,3 @@
     DS.SetRangeStart(Tok.getLocation());
-    DS.SetRangeEnd(Tok.getLocation());
+    DS.SetRangeEnd(SourceLocation());
   }
----------------
Please add a comment explaining why we only set one of these.

http://reviews.llvm.org/D4646






More information about the cfe-commits mailing list