diff options
author | Kirill Bobyrev <omtcyfz@gmail.com> | 2016-08-09 10:03:33 +0000 |
---|---|---|
committer | Kirill Bobyrev <omtcyfz@gmail.com> | 2016-08-09 10:03:33 +0000 |
commit | 7fa3395364a21c66b11317216e307880d3a57763 (patch) | |
tree | cb255ad0d143a2b7ef67ea9827e4088c2f624d8d | |
parent | 6cfad71fd7df9902096039c651e6ab994db4b159 (diff) | |
download | bcm5719-llvm-7fa3395364a21c66b11317216e307880d3a57763.tar.gz bcm5719-llvm-7fa3395364a21c66b11317216e307880d3a57763.zip |
[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
-rw-r--r-- | clang-tools-extra/clang-rename/USRFinder.cpp | 4 | ||||
-rw-r--r-- | clang-tools-extra/clang-rename/USRLocFinder.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/clang-tools-extra/clang-rename/USRFinder.cpp b/clang-tools-extra/clang-rename/USRFinder.cpp index a586bc610ec..1ad7e9ee9b1 100644 --- a/clang-tools-extra/clang-rename/USRFinder.cpp +++ b/clang-tools-extra/clang-rename/USRFinder.cpp @@ -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; } diff --git a/clang-tools-extra/clang-rename/USRLocFinder.cpp b/clang-tools-extra/clang-rename/USRLocFinder.cpp index 7a491d03fe0..8d4c7e42360 100644 --- a/clang-tools-extra/clang-rename/USRLocFinder.cpp +++ b/clang-tools-extra/clang-rename/USRLocFinder.cpp @@ -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; } |