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

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


angelgarcia created this revision.
angelgarcia added a reviewer: alexfh.
angelgarcia added a subscriber: cfe-commits.
angelgarcia changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users".

Remove implicit conversion from nullptr to StringRef.

http://reviews.llvm.org/D12186

Files:
  clang-tidy/modernize/LoopConvertCheck.cpp

Index: clang-tidy/modernize/LoopConvertCheck.cpp
===================================================================
--- clang-tidy/modernize/LoopConvertCheck.cpp
+++ clang-tidy/modernize/LoopConvertCheck.cpp
@@ -338,7 +338,7 @@
                                     SourceRange Range) {
   if (SourceMgr.getFileID(Range.getBegin()) !=
       SourceMgr.getFileID(Range.getEnd()))
-    return nullptr;
+    return StringRef(nullptr, 0);
 
   return Lexer::getSourceText(CharSourceRange(Range, true), SourceMgr,
                               LangOpts);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12186.32672.patch
Type: text/x-patch
Size: 551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150820/bc3fd2c5/attachment.bin>


More information about the cfe-commits mailing list