[clang-tools-extra] 7dfff42 - Silencing some 'logical operation on address of string constant diagnostics; NFC

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 19 07:54:10 PDT 2020


Author: Aaron Ballman
Date: 2020-07-19T10:53:51-04:00
New Revision: 7dfff42f019583076c55993d30a63889613922dd

URL: https://github.com/llvm/llvm-project/commit/7dfff42f019583076c55993d30a63889613922dd
DIFF: https://github.com/llvm/llvm-project/commit/7dfff42f019583076c55993d30a63889613922dd.diff

LOG: Silencing some 'logical operation on address of string constant diagnostics; NFC

Added: 
    

Modified: 
    clang-tools-extra/clangd/CompileCommands.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/CompileCommands.cpp b/clang-tools-extra/clangd/CompileCommands.cpp
index f6210a43b34e..6df29bd82319 100644
--- a/clang-tools-extra/clangd/CompileCommands.cpp
+++ b/clang-tools-extra/clangd/CompileCommands.cpp
@@ -354,7 +354,7 @@ llvm::ArrayRef<ArgStripper::Rule> ArgStripper::rulesFor(llvm::StringRef Arg) {
 #define PREFIX(NAME, VALUE) static const char *const NAME[] = VALUE;
 #define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM,  \
                HELP, METAVAR, VALUES)                                          \
-  if (DriverID::OPT_##ALIAS != DriverID::OPT_INVALID && ALIASARGS == nullptr)  \
+  if (DriverID::OPT_##ALIAS != DriverID::OPT_INVALID && !ALIASARGS)            \
     AddAlias(DriverID::OPT_##ID, DriverID::OPT_##ALIAS);                       \
   Prefixes[DriverID::OPT_##ID] = PREFIX;
 #include "clang/Driver/Options.inc"


        


More information about the cfe-commits mailing list