diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-06-23 15:18:21 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-06-23 15:18:21 +0200 |
commit | e9ad1b4f2fdecaac13af9eeacf2b261890afd941 (patch) | |
tree | 31d0a1b1be89096a8e3cfc084a7a50dee2228b8f | |
parent | ecddd5ee9cd4e1dc874a84f8846f938c0199b552 (diff) |
std::string -> StringRef
Change-Id: I06145822290ae4b3690a792eb4d2ad79437fd9cc
-rw-r--r-- | compilerplugins/clang/staticmethods.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/staticmethods.cxx b/compilerplugins/clang/staticmethods.cxx index d0dd43eb40ee..6360295968bd 100644 --- a/compilerplugins/clang/staticmethods.cxx +++ b/compilerplugins/clang/staticmethods.cxx @@ -36,7 +36,7 @@ public: bool VisitUnresolvedMemberExpr(const UnresolvedMemberExpr *) { bVisitedThis = true; return true; } bool VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *) { bVisitedThis = true; return true; } private: - std::string getFilename(SourceLocation loc); + StringRef getFilename(SourceLocation loc); }; bool BaseCheckNotTestFixtureSubclass( @@ -64,7 +64,7 @@ bool isDerivedFromTestFixture(const CXXRecordDecl *decl) { return false; } -std::string StaticMethods::getFilename(SourceLocation loc) +StringRef StaticMethods::getFilename(SourceLocation loc) { SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc(loc); return compiler.getSourceManager().getFilename(spellingLocation); @@ -103,7 +103,7 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl) return true; } // the DDE has a dummy implementation on Linux and a real one on Windows - std::string aFilename = getFilename(pCXXMethodDecl->getCanonicalDecl()->getLocStart()); + auto aFilename = getFilename(pCXXMethodDecl->getCanonicalDecl()->getLocStart()); if (loplugin::isSamePathname(aFilename, SRCDIR "/include/svl/svdde.hxx")) { return true; } |