[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:
Kirill Bobyrev 2016-08-09 10:03:33 +00:00
parent 6cfad71fd7
commit 7fa3395364
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;
}