forked from OSchip/llvm-project
Make string constants in the modernize module static.
Summary: Add static to global variables, if they are not in an anonymous namespace. Reviewers: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13975 llvm-svn: 251005
This commit is contained in:
parent
31bcd2bddd
commit
146b96dfcb
|
@ -19,19 +19,19 @@ namespace clang {
|
|||
namespace tidy {
|
||||
namespace modernize {
|
||||
|
||||
const char LoopNameArray[] = "forLoopArray";
|
||||
const char LoopNameIterator[] = "forLoopIterator";
|
||||
const char LoopNamePseudoArray[] = "forLoopPseudoArray";
|
||||
const char ConditionBoundName[] = "conditionBound";
|
||||
const char ConditionVarName[] = "conditionVar";
|
||||
const char IncrementVarName[] = "incrementVar";
|
||||
const char InitVarName[] = "initVar";
|
||||
const char BeginCallName[] = "beginCall";
|
||||
const char EndCallName[] = "endCall";
|
||||
const char ConditionEndVarName[] = "conditionEndVar";
|
||||
const char EndVarName[] = "endVar";
|
||||
const char DerefByValueResultName[] = "derefByValueResult";
|
||||
const char DerefByRefResultName[] = "derefByRefResult";
|
||||
static const char LoopNameArray[] = "forLoopArray";
|
||||
static const char LoopNameIterator[] = "forLoopIterator";
|
||||
static const char LoopNamePseudoArray[] = "forLoopPseudoArray";
|
||||
static const char ConditionBoundName[] = "conditionBound";
|
||||
static const char ConditionVarName[] = "conditionVar";
|
||||
static const char IncrementVarName[] = "incrementVar";
|
||||
static const char InitVarName[] = "initVar";
|
||||
static const char BeginCallName[] = "beginCall";
|
||||
static const char EndCallName[] = "endCall";
|
||||
static const char ConditionEndVarName[] = "conditionEndVar";
|
||||
static const char EndVarName[] = "endVar";
|
||||
static const char DerefByValueResultName[] = "derefByValueResult";
|
||||
static const char DerefByRefResultName[] = "derefByRefResult";
|
||||
|
||||
// shared matchers
|
||||
static const TypeMatcher AnyType = anything();
|
||||
|
|
|
@ -18,9 +18,9 @@ namespace clang {
|
|||
namespace tidy {
|
||||
namespace modernize {
|
||||
|
||||
const char PointerType[] = "pointerType";
|
||||
const char ConstructorCall[] = "constructorCall";
|
||||
const char NewExpression[] = "newExpression";
|
||||
static const char PointerType[] = "pointerType";
|
||||
static const char ConstructorCall[] = "constructorCall";
|
||||
static const char NewExpression[] = "newExpression";
|
||||
|
||||
void MakeUniqueCheck::registerMatchers(MatchFinder *Finder) {
|
||||
if (getLangOpts().CPlusPlus11) {
|
||||
|
|
|
@ -21,8 +21,8 @@ namespace clang {
|
|||
namespace tidy {
|
||||
namespace modernize {
|
||||
|
||||
const char AutoPtrTokenId[] = "AutoPrTokenId";
|
||||
const char AutoPtrOwnershipTransferId[] = "AutoPtrOwnershipTransferId";
|
||||
static const char AutoPtrTokenId[] = "AutoPrTokenId";
|
||||
static const char AutoPtrOwnershipTransferId[] = "AutoPtrOwnershipTransferId";
|
||||
|
||||
/// \brief Matches expressions that are lvalues.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue