aaron.ballman added inline comments.
Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:262
+ << (Var->getType().isLocalVolatileQualified() ? "volatile " : "")
+ << Var->getName() << FixItHint::CreateInsertion(InsertPos, "const ");
+
This revision was automatically updated to reflect the committed changes.
njames93 marked an inline comment as done.
Closed by commit rG8a68c40a1bf2: [clang-tidy] Added option for disabling const
qualifiers in readability… (authored by njames93).
Repository:
rG LLVM Github Monorepo
CHANGES
njames93 marked 2 inline comments as done.
njames93 added inline comments.
Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:262
+ << (Var->getType().isLocalVolatileQualified() ? "volatile " : "")
+ << Var->getName() <<
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:262
+ << (Var->getType().isLocalVolatileQualified() ? "volatile " :
merge_guards_bot added a comment.
{icon check-circle color=green} Unit tests: pass. 62383 tests passed, 0 failed
and 839 were skipped.
{icon check-circle color=green} clang-tidy: pass.
{icon check-circle color=green} clang-format: pass.
Build artifacts
njames93 updated this revision to Diff 241924.
njames93 added a comment.
- Small reformat
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73548/new/
https://reviews.llvm.org/D73548
Files:
clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp
merge_guards_bot added a comment.
{icon times-circle color=red} Unit tests: fail. 62275 tests passed, 1 failed
and 827 were skipped.
failed: Clang.CodeGenOpenCL/amdgpu-features.cl
{icon check-circle color=green} clang-tidy: pass.
{icon times-circle color=red} clang-format: fail. Please
njames93 updated this revision to Diff 241374.
njames93 added a comment.
- Streamline fixits
- Add documentation about double pointers, maybe a follow up patch to fix
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73548/new/
aaron.ballman added inline comments.
Comment at:
clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:41
+ auto *const Bar = cast(Baz2);
+ auto *volatile FooBar = cast(Baz3);
+
njames93 wrote:
> aaron.ballman wrote:
> > njames93 wrote:
>
merge_guards_bot added a comment.
{icon times-circle color=red} Unit tests: fail. 62275 tests passed, 1 failed
and 827 were skipped.
failed: Clang.CodeGenOpenCL/amdgpu-features.cl
{icon check-circle color=green} clang-tidy: pass.
{icon check-circle color=green} clang-format: pass.
Build
njames93 updated this revision to Diff 241082.
njames93 added a comment.
- Always add const to `auto` typed variable.
This update adds const to variables just typed with `auto`, but wont enforce
checking on `auto *` or `auto &` unless `AddConstToQualified` is set.
Repository:
rG LLVM Github
njames93 marked 4 inline comments as done.
njames93 added inline comments.
Comment at:
clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:41
+ auto *const Bar = cast(Baz2);
+ auto *volatile FooBar = cast(Baz3);
+
aaron.ballman wrote:
>
aaron.ballman added inline comments.
Comment at:
clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:41
+ auto *const Bar = cast(Baz2);
+ auto *volatile FooBar = cast(Baz3);
+
njames93 wrote:
> Quuxplusone wrote:
> > Is it worth adding
njames93 marked 7 inline comments as done.
njames93 added inline comments.
Comment at:
clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:41
+ auto *const Bar = cast(Baz2);
+ auto *volatile FooBar = cast(Baz3);
+
Quuxplusone wrote:
> Is
Quuxplusone added inline comments.
Comment at:
clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:41
+ auto *const Bar = cast(Baz2);
+ auto *volatile FooBar = cast(Baz3);
+
Is it worth adding an example of a double pointer?
auto
merge_guards_bot added a comment.
{icon check-circle color=green} Unit tests: pass. 62260 tests passed, 0 failed
and 827 were skipped.
{icon check-circle color=green} clang-tidy: pass.
{icon check-circle color=green} clang-format: pass.
Build artifacts
njames93 marked an inline comment as done.
njames93 added inline comments.
Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:209
+ llvm::StringRef PtrConst =
+ (AddConstQualifier && isPointerConst(Var->getType())) ? "const " :
"";
lebedev.ri added a comment.
SGTM, but please wait for the reviewers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73548/new/
https://reviews.llvm.org/D73548
___
cfe-commits mailing list
njames93 created this revision.
Herald added subscribers: cfe-commits, xazax.hun.
Herald added a project: clang.
Adds an option called `AddConstQualifier` to readability-qualified-auto to
toggle adding const to the auto typed pointers and references. By default its
enabled but in the LLVM
19 matches
Mail list logo