[PATCH] D118927: [clang-tidy] Fix invalid fix-it for cppcoreguidelines-prefer-member-initializer

2022-02-04 Thread Simon Giesecke via Phabricator via cfe-commits
simon.giesecke added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-prefer-member-initializer.cpp:537 +struct PR53515 { + int M; Can this be renamed to something describing the test case? E.g. `AlreadyHasInitializer

[PATCH] D115106: [clang-tidy] Fix `readability-static-accessed-through-instance` false negative for static methods

2021-12-09 Thread Simon Giesecke via Phabricator via cfe-commits
simon.giesecke added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6017 +/// cxxMethodDecl(isStatic()) matches A::foo() but not A::bar() +AST_MATCHER(CXXMethodDecl, isStatic) { return Node.isStatic(); } + aaron.ballman wrote: > I woul

[PATCH] D115106: [clang-tidy] Fix `readability-static-accessed-through-instance` false negative for static methods

2021-12-09 Thread Simon Giesecke via Phabricator via cfe-commits
simon.giesecke added a comment. In D115106#3180439 , @aaron.ballman wrote: > In D115106#3172949 , > @simon.giesecke wrote: > >> Thanks a lot for addressing this issue! I am just trying it on our codebase. >> >>>

[PATCH] D115106: [clang-tidy] Fix `readability-static-accessed-through-instance` false negative for static methods

2021-12-06 Thread Simon Giesecke via Phabricator via cfe-commits
simon.giesecke added a comment. Thanks a lot for addressing this issue! I am just trying it on our codebase. > The problem actually has nothing to do with the out-of-line definition being > inline; the problem is that hasDeclaration() of the memberExpr() will match > the out-of-line definition,

[PATCH] D113429: [clang-tidy] Use `hasCanonicalType()` matcher in `bugprone-unused-raii` check

2021-11-09 Thread Simon Giesecke via Phabricator via cfe-commits
simon.giesecke accepted this revision. simon.giesecke added a comment. This revision is now accepted and ready to land. LGTM, thanks a lot! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113429/new/ https://reviews.llvm.org/D113429

[PATCH] D93543: clang-tidy: Add `-use-color` for `run-clang-tidy.py` in order to make it sane with `clang-tidy` coloring argument

2021-10-07 Thread Simon Giesecke via Phabricator via cfe-commits
simon.giesecke added a comment. I think this would be a useful change. In the current state, one needs to modify the script to run this in a context where coloring is not supported. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93543/new/ https://

[PATCH] D110801: [clang-format] [docs] [NFC] improve clarity in the QualifierAlignment warning

2021-09-30 Thread Simon Giesecke via Phabricator via cfe-commits
simon.giesecke added inline comments. Comment at: clang/include/clang/Format/Format.h:1902 + /// Setting ``QualifierAlignment`` to something other than `Leave`, COULD + /// lead to incorrect code generation due to a lack of semantic information + /// especially in the pres

[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability

2021-09-30 Thread Simon Giesecke via Phabricator via cfe-commits
simon.giesecke added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3233 + + ``QualifierAlignment`` COULD lead to incorrect code generation. + MyDeveloperDay wrote: > HazardyKnusperkeks wrote: > > simon.giesecke wrote: > > > This is pretty

[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability

2021-09-29 Thread Simon Giesecke via Phabricator via cfe-commits
simon.giesecke added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3233 + + ``QualifierAlignment`` COULD lead to incorrect code generation. + This is pretty unclear, for a number of reasons: * First, this probably only refers to a setting