================ Comment at: include/clang/Parse/Parser.h:649 @@ -648,1 +648,3 @@ + /// If NoCount is true, it ignores parens/brackets/braces as regular tokens + /// and does not count them. bool ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned Diag, ---------------- [email protected] wrote: > Add: The default behavior is to skip balance pairs of parens/brackets/braces. > > (maybe nested would be a better word than balanced?) Ok.
================ Comment at: include/clang/Parse/Parser.h:757 @@ -754,1 +756,3 @@ + StopAtCodeCompletion = 1 << 2, ///< Stop at code completion + NoBracketsCount = 1 << 3 /// \brief Don't count braces/brackets/parens }; ---------------- [email protected] wrote: > Add: to skip balanced pairs. Ok ================ Comment at: lib/Parse/Parser.cpp:195 @@ +194,3 @@ + if (NoCount) { + SkipUntil(SkipToTok, StopAtSemi | NoBracketsCount); + } else { ---------------- [email protected] wrote: > Please don't duplicate the call to SkipUntil here. Either make a flags > variable: > > SkipUntilFlags Flags = StopAtSemi; > if (NoCount) > Flags |= NoBracketsCount; > > or just use StopAtSemi | (NoCount ? NoBracketsCount : 0). > Ok, I'll fix it. http://llvm-reviews.chandlerc.com/D1847 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
