From 1bf93efb35da398df9b721a46decb831ac6310b3 Mon Sep 17 00:00:00 2001 From: Qrox Date: Thu, 30 Apr 2020 21:01:53 +0800 Subject: [PATCH] Also replace windows path separator along with the unix one in header guard check --- tools/clang-tidy-plugin/HeaderGuardCheck.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/clang-tidy-plugin/HeaderGuardCheck.cpp b/tools/clang-tidy-plugin/HeaderGuardCheck.cpp index e967763aa85e4..d8090dd09c6ca 100644 --- a/tools/clang-tidy-plugin/HeaderGuardCheck.cpp +++ b/tools/clang-tidy-plugin/HeaderGuardCheck.cpp @@ -62,6 +62,7 @@ static std::string getHeaderGuard( StringRef Filename ) Guard = Guard.substr( TopDir.length() + 1 ); std::replace( Guard.begin(), Guard.end(), '/', '_' ); + std::replace( Guard.begin(), Guard.end(), '\\', '_' ); std::replace( Guard.begin(), Guard.end(), '.', '_' ); std::replace( Guard.begin(), Guard.end(), '-', '_' );