[clang] 83d93d3 - [clang] Fix a warning
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 6 23:59:43 PDT 2022
Author: Kazu Hirata
Date: 2022-10-06T23:59:34-07:00
New Revision: 83d93d3c11ac9727bf3d4c5c956de44233cc7f87
URL: https://github.com/llvm/llvm-project/commit/83d93d3c11ac9727bf3d4c5c956de44233cc7f87
DIFF: https://github.com/llvm/llvm-project/commit/83d93d3c11ac9727bf3d4c5c956de44233cc7f87.diff
LOG: [clang] Fix a warning
This patch fixes:
clang/lib/Analysis/ThreadSafety.cpp:1788:12: error: unused variable
'inserted' [-Werror,-Wunused-variable]
Added:
Modified:
clang/lib/Analysis/ThreadSafety.cpp
Removed:
################################################################################
diff --git a/clang/lib/Analysis/ThreadSafety.cpp b/clang/lib/Analysis/ThreadSafety.cpp
index 09b626edc8fa0..dd5a11cd661a3 100644
--- a/clang/lib/Analysis/ThreadSafety.cpp
+++ b/clang/lib/Analysis/ThreadSafety.cpp
@@ -1786,6 +1786,7 @@ void BuildLockset::handleCall(const Expr *Exp, const NamedDecl *D,
std::pair<til::LiteralPtr *, StringRef> Placeholder =
Analyzer->SxBuilder.createThisPlaceholder(Exp);
auto inserted = ConstructedObjects.insert({Exp, Placeholder.first});
+ (void)inserted;
assert(inserted.second && "Are we visiting the same expression again?");
if (isa<CXXConstructExpr>(Exp))
Self = Placeholder.first;
More information about the cfe-commits
mailing list