[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 29 05:04:19 PST 2020
aaron.ballman added inline comments.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:41
+ auto *const Bar = cast<const int *>(Baz2);
+ auto *volatile FooBar = cast<int *>(Baz3);
+
----------------
njames93 wrote:
> aaron.ballman wrote:
> > njames93 wrote:
> > > Quuxplusone wrote:
> > > > Is it worth adding an example of a double pointer?
> > > >
> > > > auto BarN = cast<int **>(FooN);
> > > >
> > > > Does that become `auto*` or `auto**` (and why)? My wild guess is that it becomes `auto*` (and because nobody cares about double pointers), but I could be wrong.
> > > Double pointers are just resolved to `auto *`.
> > They resolve to `auto *` today but I could see a real argument that they should resolve to `auto **` instead based on the same logic of: don't make the reader infer pointer/references and qualifiers.
> One change per patch...
I wasn't suggesting a change to this patch, I was checking to see if there's sentiment that we missed this case in the first place. Sorry for not making that more clear.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73548/new/
https://reviews.llvm.org/D73548
More information about the cfe-commits
mailing list