[PATCH] D12186: Fix bug in modernize-loop-convert check.
    Benjamin Kramer via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Thu Aug 20 03:10:16 PDT 2015
    
    
  
bkramer added a subscriber: bkramer.
bkramer added a comment.
Is this tested? I'd expect a crash when constructing a StringRef implicitly from nullptr.
================
Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:341
@@ -340,3 +340,3 @@
       SourceMgr.getFileID(Range.getEnd()))
-    return nullptr;
+    return StringRef(nullptr, 0);
 
----------------
You can just use the default ctor `return StringRef();`
http://reviews.llvm.org/D12186
    
    
More information about the cfe-commits
mailing list