summaryrefslogtreecommitdiffstats
path: root/Source/cmStringAlgorithms.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2021-01-22 15:38:05 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2021-01-27 13:45:45 (GMT)
commitcdfc4e31953274be9b745614b4b7620d365a7b5e (patch)
treed730ed1a5258286efbd83ac84e4a24f075bfa2aa /Source/cmStringAlgorithms.cxx
parent808b17b1206dd70c7fbd676e8c24181cde537954 (diff)
downloadCMake-cdfc4e31953274be9b745614b4b7620d365a7b5e.zip
CMake-cdfc4e31953274be9b745614b4b7620d365a7b5e.tar.gz
CMake-cdfc4e31953274be9b745614b4b7620d365a7b5e.tar.bz2
clang-tidy: fix `readability-qualified-auto` warnings
Diffstat (limited to 'Source/cmStringAlgorithms.cxx')
-rw-r--r--Source/cmStringAlgorithms.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmStringAlgorithms.cxx b/Source/cmStringAlgorithms.cxx
index fb0b705..5bb6e7b 100644
--- a/Source/cmStringAlgorithms.cxx
+++ b/Source/cmStringAlgorithms.cxx
@@ -11,6 +11,9 @@
std::string cmTrimWhitespace(cm::string_view str)
{
+ // XXX(clang-tidy): This declaration and the next cannot be `const auto*`
+ // because the qualification of `auto` is platform-dependent.
+ // NOLINTNEXTLINE(readability-qualified-auto)
auto start = str.begin();
while (start != str.end() && cmIsSpace(*start)) {
++start;
@@ -18,6 +21,7 @@ std::string cmTrimWhitespace(cm::string_view str)
if (start == str.end()) {
return std::string();
}
+ // NOLINTNEXTLINE(readability-qualified-auto)
auto stop = str.end() - 1;
while (cmIsSpace(*stop)) {
--stop;