[PATCH] D25257: Use StringRef in Option library instead of raw pointers (NFC)

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 8 16:37:25 PDT 2016


mehdi_amini added inline comments.


================
Comment at: clang/lib/Driver/Driver.cpp:97
+  for (StringRef Arg : Args) {
     // Ingore nullptrs, they are response file's EOL markers
+    if (Arg.empty())
----------------
mehdi_amini wrote:
> rnk wrote:
> > Hang on, nullptr is different from an empty string in the response file parsing logic. We have to be careful not to affect that.
> Good to know, during a recent discussion about StringRef we were wondering about examples where we'd like to differentiate between empty and null.
> 
> It seems we don't have any test that rely on this different right now, and I don't know about the "response file" (what are they, how to use them), I so don't feel I can come up easily with a test without guidance.
@rnk ping


https://reviews.llvm.org/D25257





More information about the llvm-commits mailing list