[PATCH] D69764: [clang-format] Add Left/Right Const (East/West , Before/After) fixer capability

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 19 07:46:44 PST 2019


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


================
Comment at: clang/include/clang/Format/Format.h:1110
+  /// Different const alignment styles.
+  enum ConstAlignmentStyle {
+    /// Don't change const to either East const or West const.
----------------
JonasToth wrote:
> Drive-By question: https://reviews.llvm.org/D54395 implements clang-tidy part of adding `const` to variables. It would be great to use the same underlying functionality, e.g. this enum for determining which const-style to use.
> Is this header-file always accessible from clang-tidy-code? Or can e.g. clang-format be deactivated while building leading to exclusion of these bits?
Doesn't `clang-tidy` include the `clangFormat` library for the purposes of reformatting after a replacement? in which case this should be linked in should it not?

from clang-tidy CMakeLists.txt

```
LINK_LIBS
  clangAnalysis
  clangAST
  clangASTMatchers
  clangBasic
  clangFormat
  clangFrontend
  clangLex
  clangRewrite
  clangSema
  clangSerialization
  clangTooling
  clangToolingCore
  )
```



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

https://reviews.llvm.org/D69764





More information about the cfe-commits mailing list