Skip to content

Commit a54d379

Browse files
committed
[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 llvm-svn: 311035
1 parent 766288b commit a54d379

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang-tools-extra/clang-tidy/android/CloexecCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ std::string buildFixMsgForStringFlag(const Expr *Arg, const SourceManager &SM,
3737
}
3838
} // namespace
3939

40-
constexpr char CloexecCheck::FuncDeclBindingStr[];
40+
const char *CloexecCheck::FuncDeclBindingStr = "funcDecl";
4141

42-
constexpr char CloexecCheck::FuncBindingStr[];
42+
const char *CloexecCheck::FuncBindingStr ="func";
4343

4444
void CloexecCheck::registerMatchersImpl(
4545
MatchFinder *Finder, internal::Matcher<FunctionDecl> Function) {

clang-tools-extra/clang-tidy/android/CloexecCheck.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ class CloexecCheck : public ClangTidyCheck {
9292
int N) const;
9393

9494
/// Binding name of the FuncDecl of a function call.
95-
static constexpr char FuncDeclBindingStr[] = "funcDecl";
95+
static const char *FuncDeclBindingStr;
9696

9797
/// Binding name of the function call expression.
98-
static constexpr char FuncBindingStr[] = "func";
98+
static const char *FuncBindingStr;
9999
};
100100

101101
} // namespace android

0 commit comments

Comments
 (0)