]> granicus.if.org Git - clang/commitdiff
Some documentation fixes for the parser, from John Freeman
authorDouglas Gregor <dgregor@apple.com>
Tue, 5 Jul 2011 17:13:11 +0000 (17:13 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 5 Jul 2011 17:13:11 +0000 (17:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134419 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Parse/Parser.h
lib/Parse/Parser.cpp

index 0bbf29044fc54e1092717cd14dc8d578ff1a68e8..a0fd4d5da8a9d0b382f2a05ee73929e746afea85 100644 (file)
@@ -424,25 +424,7 @@ private:
       Tok.setAnnotationValue(ER.get());
   }
 
-  /// TryAnnotateTypeOrScopeToken - If the current token position is on a
-  /// typename (possibly qualified in C++) or a C++ scope specifier not followed
-  /// by a typename, TryAnnotateTypeOrScopeToken will replace one or more tokens
-  /// with a single annotation token representing the typename or C++ scope
-  /// respectively.
-  /// This simplifies handling of C++ scope specifiers and allows efficient
-  /// backtracking without the need to re-parse and resolve nested-names and
-  /// typenames.
-  /// It will mainly be called when we expect to treat identifiers as typenames
-  /// (if they are typenames). For example, in C we do not expect identifiers
-  /// inside expressions to be treated as typenames so it will not be called
-  /// for expressions in C.
-  ///
-  /// This returns true if the token was annotated.
   bool TryAnnotateTypeOrScopeToken(bool EnteringContext = false);
-
-  /// TryAnnotateCXXScopeToken - Like TryAnnotateTypeOrScopeToken but
-  /// only annotates C++ scope specifiers.  This returns true if there
-  /// was an unrecoverable error.
   bool TryAnnotateCXXScopeToken(bool EnteringContext = false);
 
   /// TryAltiVecToken - Check for context-sensitive AltiVec identifier tokens,
@@ -517,12 +499,6 @@ private:
   };
 
 
-  /// MatchRHSPunctuation - For punctuation with a LHS and RHS (e.g. '['/']'),
-  /// this helper function matches and consumes the specified RHS token if
-  /// present.  If not present, it emits the specified diagnostic indicating
-  /// that the parser failed to match the RHS of the token at LHSLoc.  LHSName
-  /// should be the name of the unmatched LHS token.  This returns the location
-  /// of the consumed token.
   SourceLocation MatchRHSPunctuation(tok::TokenKind RHSTok,
                                      SourceLocation LHSLoc);
 
index 1089d2309aff7f1090338ded92a70bebbef3ebb3..5c502907bc15be2bb1c5728c595199d0e0252d0d 100644 (file)
@@ -124,9 +124,8 @@ void Parser::SuggestParentheses(SourceLocation Loc, unsigned DK,
 
 /// MatchRHSPunctuation - For punctuation with a LHS and RHS (e.g. '['/']'),
 /// this helper function matches and consumes the specified RHS token if
-/// present.  If not present, it emits the specified diagnostic indicating
-/// that the parser failed to match the RHS of the token at LHSLoc.  LHSName
-/// should be the name of the unmatched LHS token.
+/// present.  If not present, it emits a corresponding diagnostic indicating
+/// that the parser failed to match the RHS of the token at LHSLoc.
 SourceLocation Parser::MatchRHSPunctuation(tok::TokenKind RHSTok,
                                            SourceLocation LHSLoc) {