[clang-tools-extra] [clang-tidy] fix false positive in modernize-min-max-use-initializer-list (PR #107649)
Danny Mösch via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 7 12:35:06 PDT 2024
================
@@ -168,9 +170,11 @@ generateReplacements(const MatchFinder::MatchResult &Match,
CharSourceRange::getTokenRange(InnerResult.First->getEndLoc())));
}
- const SmallVector<FixItHint> InnerReplacements = generateReplacements(
+ const auto [FoundNestedCallInner, InnerReplacements] = generateReplacements(
Match, InnerCall, InnerResult, IgnoreNonTrivialTypes,
- IgnoreTrivialTypesOfSizeAbove);
+ IgnoreTrivialTypesOfSizeAbove, false);
+
+ FoundNestedCall |= FoundNestedCallInner;
----------------
SimplyDanny wrote:
Isn't the result always `true` with the value being reset to `true` in line 149 and having an `|=` here?
https://github.com/llvm/llvm-project/pull/107649
More information about the cfe-commits
mailing list