[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 29 02:39:51 PST 2020


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<const int *>(Baz2);
+   auto *volatile FooBar = cast<int *>(Baz3);
+
----------------
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...


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