From: Benjamin Kramer Date: Fri, 13 Jan 2023 15:14:47 +0000 (+0100) Subject: [analyzer] Fix a FIXME. NFCI X-Git-Tag: upstream/17.0.6~21029 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18b0d2c5d9762070f7c579f2ffffe7ecaa105db7;p=platform%2Fupstream%2Fllvm.git [analyzer] Fix a FIXME. NFCI --- diff --git a/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp b/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp index 94287b7..5227766 100644 --- a/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp +++ b/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp @@ -35,10 +35,7 @@ using namespace ento; bool CheckerManager::hasPathSensitiveCheckers() const { const auto IfAnyAreNonEmpty = [](const auto &... Callbacks) -> bool { - bool Result = false; - // FIXME: Use fold expressions in C++17. - LLVM_ATTRIBUTE_UNUSED int Unused[]{0, (Result |= !Callbacks.empty())...}; - return Result; + return (!Callbacks.empty() || ...); }; return IfAnyAreNonEmpty( StmtCheckers, PreObjCMessageCheckers, ObjCMessageNilCheckers,