[clang-tidy] minor coding style tweak. make functions static.
authorDaniel Marjamaki <daniel.marjamaki@evidente.se>
Wed, 1 Jul 2015 13:29:27 +0000 (13:29 +0000)
committerDaniel Marjamaki <daniel.marjamaki@evidente.se>
Wed, 1 Jul 2015 13:29:27 +0000 (13:29 +0000)
llvm-svn: 241160

clang-tools-extra/clang-tidy/misc/MacroParenthesesCheck.cpp

index 68997ed..d1450b6 100644 (file)
@@ -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) {