diff options
author | Daniel Marjamaki <daniel.marjamaki@evidente.se> | 2015-07-01 13:29:27 +0000 |
---|---|---|
committer | Daniel Marjamaki <daniel.marjamaki@evidente.se> | 2015-07-01 13:29:27 +0000 |
commit | bf5e59c78b160e910019838f1e42957efbba8cb2 (patch) | |
tree | 693356267ca72ba7cbd77f79318d2bebfa9ada1e | |
parent | 15820b072b796c03f5f87a8fb0440a931d957022 (diff) | |
download | bcm5719-llvm-bf5e59c78b160e910019838f1e42957efbba8cb2.tar.gz bcm5719-llvm-bf5e59c78b160e910019838f1e42957efbba8cb2.zip |
[clang-tidy] minor coding style tweak. make functions static.
llvm-svn: 241160
-rw-r--r-- | clang-tools-extra/clang-tidy/misc/MacroParenthesesCheck.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/MacroParenthesesCheck.cpp b/clang-tools-extra/clang-tidy/misc/MacroParenthesesCheck.cpp index 68997ede2db..d1450b6bff7 100644 --- a/clang-tools-extra/clang-tidy/misc/MacroParenthesesCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/MacroParenthesesCheck.cpp @@ -38,33 +38,33 @@ private: Preprocessor *PP; MacroParenthesesCheck *Check; }; +} // namespace /// Is argument surrounded properly with parentheses/braces/squares/commas? -bool isSurroundedLeft(const Token &T) { +static bool isSurroundedLeft(const Token &T) { return T.isOneOf(tok::l_paren, tok::l_brace, tok::l_square, tok::comma, tok::semi); } /// Is argument surrounded properly with parentheses/braces/squares/commas? -bool isSurroundedRight(const Token &T) { +static bool isSurroundedRight(const Token &T) { return T.isOneOf(tok::r_paren, tok::r_brace, tok::r_square, tok::comma, tok::semi); } /// Is given TokenKind a keyword? -bool isKeyword(const Token &T) { +static bool isKeyword(const Token &T) { /// \TODO better matching of keywords to avoid false positives return T.isOneOf(tok::kw_case, tok::kw_const, tok::kw_struct); } /// Warning is written when one of these operators are not within parentheses. -bool isWarnOp(const Token &T) { +static bool isWarnOp(const Token &T) { /// \TODO This is an initial list of operators. It can be tweaked later to /// get more positives or perhaps avoid some false positive. return T.isOneOf(tok::plus, tok::minus, tok::star, tok::slash, tok::percent, tok::amp, tok::pipe, tok::caret); } -} void MacroParenthesesPPCallbacks::replacementList(const Token &MacroNameTok, const MacroInfo *MI) { |