forked from OSchip/llvm-project
[clang-rename] cleanup: use isWritten
nit: use isWritten and const auto *Initializer in NamedDeclFindingASTVisitor::VisitCXXConstructorDecl method. Test plan: make -j8 check-clang-tools (passed) Patch by Alexander Shaposhnikov! Reviewers: omtcyfz Differential Revision: https://reviews.llvm.org/D23298 llvm-svn: 278112
This commit is contained in:
parent
6cfad71fd7
commit
7fa3395364
|
@ -91,8 +91,8 @@ public:
|
|||
}
|
||||
|
||||
bool VisitCXXConstructorDecl(clang::CXXConstructorDecl *ConstructorDecl) {
|
||||
for (auto &Initializer : ConstructorDecl->inits()) {
|
||||
if (Initializer->getSourceOrder() == -1) {
|
||||
for (const auto *Initializer : ConstructorDecl->inits()) {
|
||||
if (!Initializer->isWritten()) {
|
||||
// Ignore implicit initializers.
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -43,8 +43,8 @@ public:
|
|||
// Declaration visitors:
|
||||
|
||||
bool VisitCXXConstructorDecl(clang::CXXConstructorDecl *ConstructorDecl) {
|
||||
for (auto &Initializer : ConstructorDecl->inits()) {
|
||||
if (Initializer->getSourceOrder() == -1) {
|
||||
for (const auto *Initializer : ConstructorDecl->inits()) {
|
||||
if (!Initializer->isWritten()) {
|
||||
// Ignore implicit initializers.
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue