[PATCH] Added AnnotatedToken::isOneOf + a few other refactorings

Daniel Jasper djasper at google.com
Wed Mar 13 06:42:29 PDT 2013


  Looks good!

  Thanks a lot for this cleanup. Can you do a timed run on the attachment of http://llvm.org/bugs/show_bug.cgi?id=14959, just to be sure that the isOneOf() function does not cause significant performance regressions before submitting?


================
Comment at: lib/Format/TokenAnnotator.h:83
@@ +82,3 @@
+  bool isOneOf(
+      tok::TokenKind K1, tok::TokenKind K2 = tok::NUM_TOKENS,
+      tok::TokenKind K3 = tok::NUM_TOKENS, tok::TokenKind K4 = tok::NUM_TOKENS,
----------------
I think using isOneOf with only one element does not make sense, i.e. I would not add a default value for K2.


http://llvm-reviews.chandlerc.com/D536

BRANCH
  svn

ARCANIST PROJECT
  clang



More information about the cfe-commits mailing list