[Lldb-commits] [PATCH] D12388: Silence some MSVC warnings.

Stephane Sezer via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 26 16:43:33 PDT 2015


sas created this revision.
sas added a reviewer: zturner.
sas added a subscriber: lldb-commits.

Just `assert("string" && false)` instead of `assert("string" == NULL)`.

This avoid errors like

    [...]\Core\SourceManager.cpp(647): warning C4130: '==' : logical operation on address of string constant

http://reviews.llvm.org/D12388

Files:
  source/Core/SourceManager.cpp

Index: source/Core/SourceManager.cpp
===================================================================
--- source/Core/SourceManager.cpp
+++ source/Core/SourceManager.cpp
@@ -644,14 +644,14 @@
         else
         {
             // Some lines have been populated, start where we last left off
-            assert("Not implemented yet" == NULL);
+            assert("Not implemented yet" && false);
         }
 
     }
     else
     {
         // Calculate all line offsets up to "line"
-        assert("Not implemented yet" == NULL);
+        assert("Not implemented yet" && false);
     }
     return false;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12388.33275.patch
Type: text/x-patch
Size: 617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150826/5381e8ca/attachment.bin>


More information about the lldb-commits mailing list