rsmith added inline comments.

================
Comment at: lib/Driver/ToolChains.cpp:722
@@ +721,3 @@
+    if (BeginSDK != StringRef::npos && EndSDK != StringRef::npos) {
+      StringRef SDK = isysroot.slice(BeginSDK + 5, EndSDK);
+      if (!SDK.startswith(getPlatformFamily()))
----------------
rsmith wrote:
> According to `slice`'s documentation, if `EndSDK < BeginSDK + 5`, this 
> `slice` call will return a slice from `BeginSDK + 5` to the end of the 
> string, and you won't be checking for a `.sdk` prefix as you intended to.
Huh. That's a bug in `slice`'s documentation (fixed in r267831).


http://reviews.llvm.org/D18088



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to