Re: [PATCH] D20296: clang-rename: avoid StringRef members in USRLocFindingASTVisitor
This revision was automatically updated to reflect the committed changes. Closed by commit rL269796: clang-rename: avoid StringRef members in USRLocFindingASTVisitor (authored by vmiklos). Changed prior to commit: http://reviews.llvm.org/D20296?vs=57385=57503#toc Repository: rL LLVM http://reviews.llvm.org/D20296 Files: clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp 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 @@ -123,9 +123,9 @@ } // All the locations of the USR were found. - StringRef USR; + const std::string USR; // Old name that is renamed. - StringRef PrevName; + const std::string PrevName; std::vector LocationsFound; }; } // namespace 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 @@ -123,9 +123,9 @@ } // All the locations of the USR were found. - StringRef USR; + const std::string USR; // Old name that is renamed. - StringRef PrevName; + const std::string PrevName; std::vector LocationsFound; }; } // namespace ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D20296: clang-rename: avoid StringRef members in USRLocFindingASTVisitor
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D20296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D20296: clang-rename: avoid StringRef members in USRLocFindingASTVisitor
vmiklos created this revision. vmiklos added reviewers: klimek, cfe-commits. Even if this is defined in the .cpp file and only used as part of the function (so here it's safe), usually storing StringRefs in the class is dangerous, so don't do so. http://reviews.llvm.org/D20296 Files: clang-rename/USRLocFinder.cpp Index: clang-rename/USRLocFinder.cpp === --- clang-rename/USRLocFinder.cpp +++ clang-rename/USRLocFinder.cpp @@ -123,9 +123,9 @@ } // All the locations of the USR were found. - StringRef USR; + const std::string USR; // Old name that is renamed. - StringRef PrevName; + const std::string PrevName; std::vector LocationsFound; }; } // namespace Index: clang-rename/USRLocFinder.cpp === --- clang-rename/USRLocFinder.cpp +++ clang-rename/USRLocFinder.cpp @@ -123,9 +123,9 @@ } // All the locations of the USR were found. - StringRef USR; + const std::string USR; // Old name that is renamed. - StringRef PrevName; + const std::string PrevName; std::vector LocationsFound; }; } // namespace ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits