[PATCH] D79293: [clang-format] [PR45218] Fix an issue where < and > and >> in a for loop gets incorrectly interpreted at a TemplateOpener/Closer

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 4 01:01:38 PDT 2020


MyDeveloperDay marked an inline comment as done.
MyDeveloperDay added a comment.

> For what is worth, with lambdas in unevaluated context (C++20), you can get a semicolon between template opener/closer easily:

I actually no longer need the check for the semi if the TemplateOpener/Closer is correctly labelled



================
Comment at: clang/lib/Format/TokenAnnotator.cpp:40
 /// keyword as a potential Objective-C selector component.
 static bool canBeObjCSelectorComponent(const FormatToken &Tok) {
   return Tok.Tok.getIdentifierInfo() != nullptr;
----------------
curdeius wrote:
> I know you haven't changed this, but...
> Static function (internal linkage) in anonymous namespace?
I believe the guideline is to not use anonymous namespaces for functions

https://llvm.org/docs/CodingStandards.html#anonymous-namespaces

(not my personal preference mind)


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

https://reviews.llvm.org/D79293





More information about the cfe-commits mailing list