[PATCH] D52179: [clang-tidy] Replace redundant checks with an assert().
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 17 13:20:30 PDT 2018
aaron.ballman added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:388
&NamingStyles) {
+ assert(D->getIdentifier() && !D->getName().empty() && !D->isImplicit() &&
+ "Decl must be an explicit identifier with a name.");
----------------
Can you also assert `D` is nonnull here? (`isa<>` used to take care of that, so it's a minor regression in checking.)
================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:551-552
if (Decl->isMain() || !Decl->isUserProvided() ||
- Decl->isUsualDeallocationFunction() ||
- Decl->isCopyAssignmentOperator() || Decl->isMoveAssignmentOperator() ||
Decl->size_overridden_methods() > 0)
----------------
Why are these being removed?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D52179
More information about the cfe-commits
mailing list