From e9ad1b4f2fdecaac13af9eeacf2b261890afd941 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 23 Jun 2017 15:18:21 +0200 Subject: std::string -> StringRef Change-Id: I06145822290ae4b3690a792eb4d2ad79437fd9cc --- compilerplugins/clang/staticmethods.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compilerplugins') 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; } -- cgit