[clang-tools-extra] r269796 - clang-rename: avoid StringRef members in USRLocFindingASTVisitor
Miklos Vajna via cfe-commits
cfe-commits at lists.llvm.org
Tue May 17 11:17:16 PDT 2016
Date: Tue May 17 13:17:16 2016
New Revision: 269796
clang-rename: avoid StringRef members in USRLocFindingASTVisitor
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.
Reviewers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D20296
--- clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp (original)
+++ clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp Tue May 17 13:17:16 2016
@@ -123,9 +123,9 @@ private:
// 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;
} // namespace
More information about the cfe-commits