[clang-tools-extra] r278112 - [clang-rename] cleanup: use isWritten
Kirill Bobyrev via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 9 03:03:33 PDT 2016
Author: omtcyfz
Date: Tue Aug 9 05:03:33 2016
New Revision: 278112
URL: http://llvm.org/viewvc/llvm-project?rev=278112&view=rev
Log:
[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
Modified:
clang-tools-extra/trunk/clang-rename/USRFinder.cpp
clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp
Modified: clang-tools-extra/trunk/clang-rename/USRFinder.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-rename/USRFinder.cpp?rev=278112&r1=278111&r2=278112&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-rename/USRFinder.cpp (original)
+++ clang-tools-extra/trunk/clang-rename/USRFinder.cpp Tue Aug 9 05:03:33 2016
@@ -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;
}
Modified: clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp?rev=278112&r1=278111&r2=278112&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp (original)
+++ clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp Tue Aug 9 05:03:33 2016
@@ -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;
}
More information about the cfe-commits
mailing list