[PATCH] D12186: Fix bug in modernize-loop-convert check.

Angel Garcia via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 20 03:34:49 PDT 2015


angelgarcia added a comment.

In http://reviews.llvm.org/D12186#228704, @bkramer wrote:

> I meant the code before your change, which calls `StringRef(const char *Str)` and completely disallows nullptr. In other words: this change is missing a regression test.


You are right, the current tests don't cover this line.

> I prefer the default ctor. Using nullptr for the empty string is just an implementation detail, exposing it doesn't add clarity in my opinion.


OK. I'll put the default constructor and try to write a test that covers this case. Thank you for your comments!


http://reviews.llvm.org/D12186





More information about the cfe-commits mailing list