[PATCH] Driver: support detecting driver mode when clang has a version suffix without dash (PR21094)
Hans Wennborg
hans at chromium.org
Thu Oct 16 17:16:31 PDT 2014
================
Comment at: tools/driver/driver.cpp:251
@@ +250,3 @@
+ while (!ProgNameRef.empty() &&
+ (isDigit(ProgNameRef.back()) || ProgNameRef.back() == '.'))
+ ProgNameRef = ProgNameRef.drop_back(1);
----------------
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.
================
Comment at: tools/driver/driver.cpp:254
@@ +253,3 @@
+ }
+ SuffixIndex = FindDriverSuffix(ProgNameRef);
+
----------------
dblaikie wrote:
> Should this line be inside the prior if (but after/outside the loop)?
D'oh, yes it should. Done.
http://reviews.llvm.org/D5833
More information about the cfe-commits
mailing list