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

MyDeveloperDay via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 22 04:02:26 PST 2022


MyDeveloperDay accepted this revision.
MyDeveloperDay added a comment.

new nits but basically I think this looks like it might handle this ok? LGTM

We need to run this across a large code base to check



================
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:106
+      bool returnValue{false};
+      if (RootToken.isAccessSpecifier(Style.isCpp())) {
+        returnValue = true;
----------------
remove extraneous `{}` braces


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