[clang-tools-extra] 1a30eab - Prevent unused error when assertions are disabled.
Author: Tres Popp Date: 2020-06-26T10:12:04+02:00 New Revision: 1a30eab413cefb18e733ef6aec42dc04a4a76592 URL: https://github.com/llvm/llvm-project/commit/1a30eab413cefb18e733ef6aec42dc04a4a76592 DIFF: https://github.com/llvm/llvm-project/commit/1a30eab413cefb18e733ef6aec42dc04a4a76592.diff LOG: Prevent unused error when assertions are disabled. Added: Modified: clang-tools-extra/clangd/ConfigYAML.cpp Removed: diff --git a/clang-tools-extra/clangd/ConfigYAML.cpp b/clang-tools-extra/clangd/ConfigYAML.cpp index ee3331df8694..8575356132ca 100644 --- a/clang-tools-extra/clangd/ConfigYAML.cpp +++ b/clang-tools-extra/clangd/ConfigYAML.cpp @@ -80,8 +80,10 @@ class Parser { // It should emit diagnostics if the value is invalid (e.g. wrong type). // If Key is seen twice, Parse runs only once and an error is reported. void handle(llvm::StringLiteral Key, std::function Parse) { - for (const auto &Entry : Keys) + for (const auto &Entry : Keys) { +(void) Entry; assert(Entry.first != Key && "duplicate key handler"); + } Keys.emplace_back(Key, std::move(Parse)); } ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 262cc74 - Fix pair construction with an implicit constructor inside.
Author: Tres Popp Date: 2022-01-18T18:01:52+01:00 New Revision: 262cc74e0b699071ff3e2627140b02d01ae2aa7e URL: https://github.com/llvm/llvm-project/commit/262cc74e0b699071ff3e2627140b02d01ae2aa7e DIFF: https://github.com/llvm/llvm-project/commit/262cc74e0b699071ff3e2627140b02d01ae2aa7e.diff LOG: Fix pair construction with an implicit constructor inside. Added: Modified: clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp Removed: diff --git a/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp index 1b61b4982931..e2209e3debfd 100644 --- a/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp @@ -469,7 +469,7 @@ void GenericTaintRuleParser::consumeRulesFromConfig(const Config &C, llvm::SmallVector CallDescParts{NameParts.size()}; llvm::transform(NameParts, CallDescParts.begin(), [](SmallString<32> &S) { return S.c_str(); }); - Rules.emplace_back(CallDescParts, std::move(Rule)); + Rules.emplace_back(CallDescription(CallDescParts), std::move(Rule)); } void GenericTaintRuleParser::parseConfig(const std::string &Option, ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits