[clang] efb284c - [clang-format] Fixed an unused variable warning
Dmitri Gribenko via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 24 01:37:30 PDT 2021
Author: Dmitri Gribenko
Date: 2021-09-24T10:37:04+02:00
New Revision: efb284c07e97776e01933f470afb5215a561db3e
URL: https://github.com/llvm/llvm-project/commit/efb284c07e97776e01933f470afb5215a561db3e
DIFF: https://github.com/llvm/llvm-project/commit/efb284c07e97776e01933f470afb5215a561db3e.diff
LOG: [clang-format] Fixed an unused variable warning
Added:
Modified:
clang/lib/Format/QualifierAlignmentFixer.cpp
Removed:
################################################################################
diff --git a/clang/lib/Format/QualifierAlignmentFixer.cpp b/clang/lib/Format/QualifierAlignmentFixer.cpp
index 6e2b53b711f26..4a42442ca24bc 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;
More information about the cfe-commits
mailing list