Author: Kazu Hirata
Date: 2022-10-15T12:48:23-07:00
New Revision: a867cb849ad0ef2e56c63ce091b74aa0497beef8

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

LOG: [clang] Fix a warning

This patch fixes:

  clang/lib/Basic/SourceManager.cpp:2131:72: warning: suggest
  parentheses around ‘&&’ within ‘||’ [-Wparentheses]

Added: 
    

Modified: 
    clang/lib/Basic/SourceManager.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Basic/SourceManager.cpp 
b/clang/lib/Basic/SourceManager.cpp
index 7229561394e32..6aae581be8001 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -2126,10 +2126,11 @@ std::pair<bool, bool> 
SourceManager::isInTheSameTranslationUnit(
       // doesn't matter as these are never mixed in macro expansion.
       unsigned LParent = I->second.ParentFID.ID;
       unsigned RParent = Parent.ID;
-      assert((LOffs.second != ROffs.second) || (LParent == 0 || RParent == 0) 
||
-             isInSameSLocAddrSpace(getComposedLoc(I->second.ParentFID, 0),
-                                   getComposedLoc(Parent, 0), nullptr) &&
-                 "Mixed local/loaded FileIDs with same include location?");
+      assert(((LOffs.second != ROffs.second) ||
+              (LParent == 0 || RParent == 0) ||
+              isInSameSLocAddrSpace(getComposedLoc(I->second.ParentFID, 0),
+                                    getComposedLoc(Parent, 0), nullptr)) &&
+             "Mixed local/loaded FileIDs with same include location?");
       IsBeforeInTUCache.setCommonLoc(LOffs.first, LOffs.second, ROffs.second,
                                      LParent < RParent);
       return std::make_pair(


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to