]> granicus.if.org Git - clang/commitdiff
Get rid of the adapted isLiteral method.
authorManuel Klimek <klimek@google.com>
Fri, 28 Mar 2014 09:27:09 +0000 (09:27 +0000)
committerManuel Klimek <klimek@google.com>
Fri, 28 Mar 2014 09:27:09 +0000 (09:27 +0000)
We don't want to deviate from clang's standard terminology.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204997 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp

index b7262f396d5082faf7cd990311e4e7a1e6f1274e..42d4a8dc249a213e086a0b839e253f61660fcd56 100644 (file)
@@ -282,10 +282,6 @@ struct FormatToken {
            (!ColonRequired || (Next && Next->is(tok::colon)));
   }
 
-  bool isLiteral() const {
-    return Tok.isLiteral() || isOneOf(tok::kw_true, tok::kw_false);
-  }
-
   /// \brief Determine whether the token is a simple-type-specifier.
   bool isSimpleTypeSpecifier() const;
 
index c3312cc66bdc1ba76b0e51d6e65b655a9cb518ef..6a0e03461eef074b672a0b78362d0d9e88b6f836 100644 (file)
@@ -862,9 +862,12 @@ private:
         PrevToken->MatchingParen->Previous->is(tok::kw_typeof))
       return TT_PointerOrReference;
 
-    if (PrevToken->isLiteral() ||
-        PrevToken->isOneOf(tok::r_paren, tok::r_square) ||
-        NextToken->isLiteral() || NextToken->isUnaryOperator() ||
+    if (PrevToken->Tok.isLiteral() ||
+        PrevToken->isOneOf(tok::r_paren, tok::r_square, tok::kw_true,
+                           tok::kw_false) ||
+        NextToken->Tok.isLiteral() ||
+        NextToken->isOneOf(tok::kw_true, tok::kw_false) ||
+        NextToken->isUnaryOperator() ||
         // If we know we're in a template argument, there are no named
         // declarations. Thus, having an identifier on the right-hand side
         // indicates a binary operator.