diff options
author | Kazu Hirata <kazu@google.com> | 2022-10-15 12:48:23 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-10-15 12:48:23 -0700 |
commit | a867cb849ad0ef2e56c63ce091b74aa0497beef8 (patch) | |
tree | 6d6c9af6251a661cff26f231485b4d176e8259b8 /clang/lib/Basic/SourceManager.cpp | |
parent | f3a76f05811f6ac6071bdd865935b9974c97ff2b (diff) | |
download | llvm-a867cb849ad0ef2e56c63ce091b74aa0497beef8.zip llvm-a867cb849ad0ef2e56c63ce091b74aa0497beef8.tar.gz llvm-a867cb849ad0ef2e56c63ce091b74aa0497beef8.tar.bz2 |
[clang] Fix a warning
This patch fixes:
clang/lib/Basic/SourceManager.cpp:2131:72: warning: suggest
parentheses around ‘&&’ within ‘||’ [-Wparentheses]
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index 7229561..6aae581 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( |