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

Kirill Bobyrev via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 9 03:11:33 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL278112: [clang-rename] cleanup: use isWritten (authored by omtcyfz).

Changed prior to commit:
  https://reviews.llvm.org/D23298?vs=67301&id=67309#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23298

Files:
  clang-tools-extra/trunk/clang-rename/USRFinder.cpp
  clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp

Index: clang-tools-extra/trunk/clang-rename/USRFinder.cpp
===================================================================
--- clang-tools-extra/trunk/clang-rename/USRFinder.cpp
+++ clang-tools-extra/trunk/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;
       }
Index: clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp
===================================================================
--- clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp
+++ clang-tools-extra/trunk/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;
       }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23298.67309.patch
Type: text/x-patch
Size: 1274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160809/581d8eaf/attachment.bin>


More information about the cfe-commits mailing list