]> granicus.if.org Git - clang/commitdiff
Attempt to fix 'logical operation on address of string constant'
authorKristof Umann <dkszelethus@gmail.com>
Fri, 2 Nov 2018 19:48:56 +0000 (19:48 +0000)
committerKristof Umann <dkszelethus@gmail.com>
Fri, 2 Nov 2018 19:48:56 +0000 (19:48 +0000)
Caused a lot of warnings for Windows:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/21178/steps/build/logs/warnings%20%2867%29

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346033 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp

index 03d2ef30c78d7da3532e49bdd91b2e1a755e1a8c..8a26735b007e2b6e3419137dd2eafa33a21e2d39 100644 (file)
@@ -178,7 +178,8 @@ void ento::printAnalyzerConfigList(raw_ostream &out) {
     {                                                                          \
       CMDFLAG,                                                                 \
       llvm::Twine(llvm::Twine() + "(" +                                        \
-                  (#TYPE == "StringRef" ? "string" : #TYPE ) + ") " DESC       \
+                  (StringRef(#TYPE) == "StringRef" ? "string" : #TYPE ) +      \
+                  ") " DESC                                                    \
                   " (default: " #DEFAULT_VAL ")").str()                        \
     },
 
@@ -187,7 +188,8 @@ void ento::printAnalyzerConfigList(raw_ostream &out) {
     {                                                                          \
       CMDFLAG,                                                                 \
       llvm::Twine(llvm::Twine() + "(" +                                        \
-                  (#TYPE == "StringRef" ? "string" : #TYPE ) + ") " DESC       \
+                  (StringRef(#TYPE) == "StringRef" ? "string" : #TYPE ) +      \
+                  ") " DESC                                                    \
                   " (default: " #SHALLOW_VAL " in shallow mode, " #DEEP_VAL    \
                   " in deep mode)").str()                                      \
     },