[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 10 10:22:16 PST 2020
njames93 added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:99
+ QualType Pointee =
+ dyn_cast<AutoType>(QType->getPointeeType().getTypePtr())->desugar();
+ assert(!Pointee.isNull() && "can't have a null Pointee");
----------------
aaron.ballman wrote:
> `dyn_cast<>` can return null, but you don't check for null here. Should this be using `cast<>` or should it be checking for null?
It should be using cast, we already know that its an ``AutoType`` because the matcher matched on autoType
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72217/new/
https://reviews.llvm.org/D72217
More information about the cfe-commits
mailing list