owenpan accepted this revision.
owenpan added a comment.

LGTM. Any comments, @curdeius?



================
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;
----------------
sstwcw wrote:
> owenpan wrote:
> > If this was bug, it should be in a separate patch with test cases added.
> Sorry that the previous patch did not include more context.  Pun intended.  
> Now you can scroll up and see that the context was just initialized, so 
> `InTemplateArgument` starts being false, so it didn't matter whether the 
> original code was `InTemplateArgument = ...;` or `if (...) InTemplateArgument 
> = true;`.
Got it. Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121907

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to