[PATCH] D23298: [clang-rename] nit: use isWritten

Alexander Shaposhnikov via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 9 02:15:36 PDT 2016


alexshap updated this revision to Diff 67301.
alexshap added a comment.

Fix clang-rename/USRLocFinder.cpp:47 as well


https://reviews.llvm.org/D23298

Files:
  clang-rename/USRFinder.cpp
  clang-rename/USRLocFinder.cpp

Index: clang-rename/USRLocFinder.cpp
===================================================================
--- clang-rename/USRLocFinder.cpp
+++ clang-rename/USRLocFinder.cpp
@@ -43,8 +43,8 @@
   // 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;
       }
Index: clang-rename/USRFinder.cpp
===================================================================
--- clang-rename/USRFinder.cpp
+++ clang-rename/USRFinder.cpp
@@ -91,8 +91,8 @@
   }
 
   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;
       }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23298.67301.patch
Type: text/x-patch
Size: 1130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160809/8698f8b4/attachment-0001.bin>


More information about the cfe-commits mailing list