[clang-tools-extra] r311035 - [clang-tidy] Use const char* to compile with VC cl.exe.
Chih-Hung Hsieh via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 16 12:13:35 PDT 2017
Author: chh
Date: Wed Aug 16 12:13:35 2017
New Revision: 311035
URL: http://llvm.org/viewvc/llvm-project?rev=311035&view=rev
Log:
[clang-tidy] Use const char* to compile with VC cl.exe.
Summary:
cl.exe does not accept constexpr char FuncBindingStr[] = ...
Differential Revision: https://reviews.llvm.org/D36761
Modified:
clang-tools-extra/trunk/clang-tidy/android/CloexecCheck.cpp
clang-tools-extra/trunk/clang-tidy/android/CloexecCheck.h
Modified: clang-tools-extra/trunk/clang-tidy/android/CloexecCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/android/CloexecCheck.cpp?rev=311035&r1=311034&r2=311035&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/android/CloexecCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/android/CloexecCheck.cpp Wed Aug 16 12:13:35 2017
@@ -37,9 +37,9 @@ std::string buildFixMsgForStringFlag(con
}
} // namespace
-constexpr char CloexecCheck::FuncDeclBindingStr[];
+const char *CloexecCheck::FuncDeclBindingStr = "funcDecl";
-constexpr char CloexecCheck::FuncBindingStr[];
+const char *CloexecCheck::FuncBindingStr ="func";
void CloexecCheck::registerMatchersImpl(
MatchFinder *Finder, internal::Matcher<FunctionDecl> Function) {
Modified: clang-tools-extra/trunk/clang-tidy/android/CloexecCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/android/CloexecCheck.h?rev=311035&r1=311034&r2=311035&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/android/CloexecCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/android/CloexecCheck.h Wed Aug 16 12:13:35 2017
@@ -92,10 +92,10 @@ protected:
int N) const;
/// Binding name of the FuncDecl of a function call.
- static constexpr char FuncDeclBindingStr[] = "funcDecl";
+ static const char *FuncDeclBindingStr;
/// Binding name of the function call expression.
- static constexpr char FuncBindingStr[] = "func";
+ static const char *FuncBindingStr;
};
} // namespace android
More information about the cfe-commits
mailing list