[PATCH] D121907: [clang-format] Use an enum for context types.

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 17 10:35:00 PDT 2022


owenpan added subscribers: HazardyKnusperkeks, MyDeveloperDay, curdeius, owenpan.
owenpan added a comment.

If this patch is an NFC, please add `[NFC]` to the title.

Please add @MyDeveloperDay @curdeius @HazardyKnusperkeks to Reviewers.



================
Comment at: clang/lib/Format/TokenAnnotator.cpp:116
     // template parameter, not an argument.
-    Contexts.back().InTemplateArgument =
-        Left->Previous && Left->Previous->isNot(tok::kw_template);
+    if (Left->Previous && Left->Previous->isNot(tok::kw_template))
+      Contexts.back().ContextType = Context::TemplateArgument;
----------------
If this was bug, it should be in a separate patch with test cases added.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121907/new/

https://reviews.llvm.org/D121907



More information about the cfe-commits mailing list