[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

psigillito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 17 22:28:53 PST 2022


psigillito added a comment.

These are just initial changes, there is still a lot of work and test cases to write. I figured I would put this out there to see if this is the direction we were thinking.



================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2504
     nextToken();
-  addUnwrappedLine();
+    addUnwrappedLine();
+    return;
----------------
MyDeveloperDay wrote:
> 
> I get what your trying to do but what happens in this scenario
> 
> `private::mynamespace::g_value -1;`
> 
> 
Yea, it doesnt parse correctly and is split to a new line after private:. I am going to revert all the changes in this code review and start looking at implementing C as its own language.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117416



More information about the llvm-commits mailing list