From: Dmitri Gribenko Date: Fri, 24 Sep 2021 08:36:21 +0000 (+0200) Subject: [clang-format] Fixed an unused variable warning X-Git-Tag: upstream/15.0.7~30633 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=efb284c07e97776e01933f470afb5215a561db3e;p=platform%2Fupstream%2Fllvm.git [clang-format] Fixed an unused variable warning --- diff --git a/clang/lib/Format/QualifierAlignmentFixer.cpp b/clang/lib/Format/QualifierAlignmentFixer.cpp index 6e2b53b..4a42442 100644 --- a/clang/lib/Format/QualifierAlignmentFixer.cpp +++ b/clang/lib/Format/QualifierAlignmentFixer.cpp @@ -406,9 +406,9 @@ void QualifierAlignmentFixer::PrepareLeftRightOrdering( // Depending on the position of type in the order you need // To iterate forward or backward through the order list as qualifier // can push through each other. - auto type = std::find(Order.begin(), Order.end(), "type"); // The Order list must define the position of "type" to signify - assert(type != Order.end() && "QualifierOrder must contain type"); + assert(std::find(Order.begin(), Order.end(), "type") != Order.end() && + "QualifierOrder must contain type"); // Split the Order list by type and reverse the left side. bool left = true;