[clang] 7a932f4 - [Parser] ParseMicrosoftAsmStatement - Replace bit '|' operator with logical '||' operator. (PR47071)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 5 06:24:08 PDT 2020


Author: Simon Pilgrim
Date: 2020-10-05T14:23:28+01:00
New Revision: 7a932f4f4ccbc0c4294c6911d404f74529f3259b

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

LOG: [Parser] ParseMicrosoftAsmStatement - Replace bit '|' operator with logical '||' operator. (PR47071)

Fixes static analysis warning.

Added: 
    

Modified: 
    clang/lib/Parse/ParseStmtAsm.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Parse/ParseStmtAsm.cpp b/clang/lib/Parse/ParseStmtAsm.cpp
index 7d0818840a4f..bdf40c291cb6 100644
--- a/clang/lib/Parse/ParseStmtAsm.cpp
+++ b/clang/lib/Parse/ParseStmtAsm.cpp
@@ -581,7 +581,7 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) {
   std::unique_ptr<llvm::MCSubtargetInfo> STI(
       TheTarget->createMCSubtargetInfo(TT, TO.CPU, FeaturesStr));
   // Target MCTargetDesc may not be linked in clang-based tools.
-  if (!MAI || !MII | !MOFI || !STI) {
+  if (!MAI || !MII || !MOFI || !STI) {
     Diag(AsmLoc, diag::err_msasm_unable_to_create_target)
         << "target MC unavailable";
     return EmptyStmt();


        


More information about the cfe-commits mailing list