[PATCH] D69764: [clang-format] Add East/West Const fixer capability

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 26 13:05:38 PDT 2020


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


================
Comment at: clang/lib/Format/Format.cpp:2547
 
+  if (Style.isCpp() || Style.Language == FormatStyle::LK_ObjC) {
+    if (Style.ConstStyle != FormatStyle::CS_Leave)
----------------
aaron.ballman wrote:
> MyDeveloperDay wrote:
> > aaron.ballman wrote:
> > > This prevents us from using this in C code despite C having qualifiers that can go to the left or right of the base type but still allows you to use if from Objective-C. That seems incorrect.
> > clang-format's isCpp() covers C and C++ (and ObjectiveC and ObjectiveC++)
> > 
> > but you did highlight that I don't need the extra LK_ObjC check
> > clang-format's isCpp() covers C and C++ (and ObjectiveC and ObjectiveC++)
> 
> Wow, that's a really poorly named function then! Thank you for the clarification.
I've been trying to persuade people ;-) {D80079}


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

https://reviews.llvm.org/D69764





More information about the cfe-commits mailing list