[clang] e4b3fc1 - Get rid of -Wunused warnings in release build, NFC.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 12 06:45:21 PDT 2020
Author: Haojian Wu
Date: 2020-06-12T15:42:29+02:00
New Revision: e4b3fc18d33199e2081d300f14687d81be48b6a0
URL: https://github.com/llvm/llvm-project/commit/e4b3fc18d33199e2081d300f14687d81be48b6a0
DIFF: https://github.com/llvm/llvm-project/commit/e4b3fc18d33199e2081d300f14687d81be48b6a0.diff
LOG: Get rid of -Wunused warnings in release build, NFC.
Added:
Modified:
clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
Removed:
################################################################################
diff --git a/clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp b/clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
index c2ca9c12b025..4a7e0d91ea23 100644
--- a/clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
@@ -285,6 +285,7 @@ CheckerRegistry::CheckerRegistry(
resolveDependencies<true>();
resolveDependencies<false>();
+#ifndef NDEBUG // avoid -Wunused warnings in release build.
for (auto &DepPair : Dependencies) {
for (auto &WeakDepPair : WeakDependencies) {
// Some assertions to enforce that strong dependencies are relations in
@@ -298,6 +299,7 @@ CheckerRegistry::CheckerRegistry(
"A strong dependency mustn't be a weak dependency as well!");
}
}
+#endif
resolveCheckerAndPackageOptions();
More information about the cfe-commits
mailing list