Looks good

================
Comment at: tools/driver/driver.cpp:251
@@ +250,3 @@
+    while (!ProgNameRef.empty() &&
+           (isDigit(ProgNameRef.back()) || ProgNameRef.back() == '.'))
+      ProgNameRef = ProgNameRef.drop_back(1);
----------------
hans wrote:
> dblaikie wrote:
> > the extra parens around the isDigit call are a bit confusing/misleading (I 
> > saw the end ')' and thought it was maybe grouped with the empty() call 
> > above for some reason)
> The extra parenthesis are around the || expression.
> 
> Anyway, I've rewritten this with less parenthesis, and fitting on one line.
Oh, right - I just can't count. Sorry about that.

The new version isn't necessarily 'portable' to interesting digit characters in 
other languages? Maybe? Dunno if that's important.

If you're going to write it that way, I'll at least optionally suggest that you 
could use StringRef's find_last_not_of to do that search.

http://reviews.llvm.org/D5833



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to