[clang-tools-extra] r329454 - [clang-tidy] One more fix compilation for ParentVirtualCallCheck.cpp: find_if predicate
Zinovy Nis via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 6 14:00:18 PDT 2018
Author: zinovy.nis
Date: Fri Apr 6 14:00:18 2018
New Revision: 329454
URL: http://llvm.org/viewvc/llvm-project?rev=329454&view=rev
Log:
[clang-tidy] One more fix compilation for ParentVirtualCallCheck.cpp: find_if predicate
Modified:
clang-tools-extra/trunk/clang-tidy/bugprone/ParentVirtualCallCheck.cpp
Modified: clang-tools-extra/trunk/clang-tidy/bugprone/ParentVirtualCallCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/bugprone/ParentVirtualCallCheck.cpp?rev=329454&r1=329453&r2=329454&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/bugprone/ParentVirtualCallCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/bugprone/ParentVirtualCallCheck.cpp Fri Apr 6 14:00:18 2018
@@ -76,8 +76,11 @@ static std::string getNameAsString(const
static std::string getExprAsString(const clang::Expr &E,
clang::ASTContext &AC) {
std::string Text = tooling::fixit::getText(E, AC).str();
- Text.erase(std::remove_if(Text.begin(), Text.end(), std::isspace),
- Text.end());
+ Text.erase(
+ std::remove_if(
+ Text.begin(), Text.end(),
+ [](char c) { return std::isspace(static_cast<unsigned char>(c)); }),
+ Text.end());
return Text;
}
More information about the cfe-commits
mailing list