diff options
author | Wastack <btomi96@gmail.com> | 2016-03-11 01:00:27 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-03-11 08:57:51 +0000 |
commit | 9a13cff64783a7de3dce7d484c150605bd42a4d6 (patch) | |
tree | 68f9f34bf5b763578067e205e04cacf0652242c0 | |
parent | 018c6adf85097d07a0b0fbce3d7155ca5a369ae1 (diff) |
tdf#97966: Remove 'static' keywords
Change-Id: Id991cead4f01830eafd9cf8dd63b519ef07c9451
Reviewed-on: https://gerrit.libreoffice.org/23134
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | compilerplugins/clang/cstylecast.cxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/fpcomparison.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/mergeclasses.cxx | 8 | ||||
-rw-r--r-- | compilerplugins/clang/staticmethods.cxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/store/removevirtuals.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/store/unnecessaryvirtual.cxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/unusedfieldsremove.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/unusedmethodsremove.cxx | 4 |
8 files changed, 15 insertions, 15 deletions
diff --git a/compilerplugins/clang/cstylecast.cxx b/compilerplugins/clang/cstylecast.cxx index ce4b8b6342eb..e33e905cac1a 100644 --- a/compilerplugins/clang/cstylecast.cxx +++ b/compilerplugins/clang/cstylecast.cxx @@ -110,7 +110,7 @@ private: bool externCFunction; }; -static const char * recommendedFix(clang::CastKind ck) { +const char * recommendedFix(clang::CastKind ck) { switch(ck) { case CK_IntegralToPointer: return "reinterpret_cast"; case CK_PointerToIntegral: return "reinterpret_cast"; diff --git a/compilerplugins/clang/fpcomparison.cxx b/compilerplugins/clang/fpcomparison.cxx index 8d20b8cb6c0c..491eb80f2d77 100644 --- a/compilerplugins/clang/fpcomparison.cxx +++ b/compilerplugins/clang/fpcomparison.cxx @@ -40,7 +40,7 @@ private: EState meState = EState::None; }; -static const std::set<std::string> whitelist { +const std::set<std::string> whitelist { "rtl::math::approxEqual", "(anonymous namespace)::doubleToString", "(anonymous namespace)::stringToDouble", @@ -95,7 +95,7 @@ bool FpComparison::ignore(FunctionDecl* function) return false; } -static bool isZeroConstant(ASTContext& context, const Expr* expr) +bool isZeroConstant(ASTContext& context, const Expr* expr) { if (!expr->getType()->isFloatingType()) { return false; diff --git a/compilerplugins/clang/mergeclasses.cxx b/compilerplugins/clang/mergeclasses.cxx index 72e4f329fe84..6fcee444eedd 100644 --- a/compilerplugins/clang/mergeclasses.cxx +++ b/compilerplugins/clang/mergeclasses.cxx @@ -79,11 +79,11 @@ public: bool VisitCallExpr(const CallExpr* decl); }; -static bool startsWith(const std::string& rStr, const char* pSubStr) { +bool startsWith(const std::string& rStr, const char* pSubStr) { return rStr.compare(0, strlen(pSubStr), pSubStr) == 0; } -static void addToInstantiatedSet(const std::string& s) +void addToInstantiatedSet(const std::string& s) { // ignore stuff in the standard library, and UNO stuff we can't touch. if (startsWith(s, "rtl::") || startsWith(s, "sal::") || startsWith(s, "com::sun::") @@ -161,12 +161,12 @@ bool MergeClasses::VisitFunctionDecl(const FunctionDecl* decl) return true; } -static bool startswith(const std::string& s, const std::string& prefix) +bool startswith(const std::string& s, const std::string& prefix) { return s.rfind(prefix,0) == 0; } -static bool endswith(const std::string& s, const std::string& suffix) +bool endswith(const std::string& s, const std::string& suffix) { return s.rfind(suffix) == (s.size()-suffix.size()); } diff --git a/compilerplugins/clang/staticmethods.cxx b/compilerplugins/clang/staticmethods.cxx index d4edb1a53758..43e0f73db414 100644 --- a/compilerplugins/clang/staticmethods.cxx +++ b/compilerplugins/clang/staticmethods.cxx @@ -67,7 +67,7 @@ std::string StaticMethods::getFilename(SourceLocation loc) return compiler.getSourceManager().getFilename(spellingLocation); } -static bool startsWith(const std::string& rStr, const char* pSubStr) { +bool startsWith(const std::string& rStr, const char* pSubStr) { return rStr.compare(0, strlen(pSubStr), pSubStr) == 0; } diff --git a/compilerplugins/clang/store/removevirtuals.cxx b/compilerplugins/clang/store/removevirtuals.cxx index 86f44773601c..da204d393b43 100644 --- a/compilerplugins/clang/store/removevirtuals.cxx +++ b/compilerplugins/clang/store/removevirtuals.cxx @@ -44,7 +44,7 @@ private: char* mmappedData; }; -static size_t getFilesize(const char* filename) +size_t getFilesize(const char* filename) { struct stat st; stat(filename, &st); @@ -71,7 +71,7 @@ RemoveVirtuals::~RemoveVirtuals() close(mmapFD); } -static std::string niceName(const CXXMethodDecl* functionDecl) +std::string niceName(const CXXMethodDecl* functionDecl) { std::string s = functionDecl->getParent()->getQualifiedNameAsString() + "::" diff --git a/compilerplugins/clang/store/unnecessaryvirtual.cxx b/compilerplugins/clang/store/unnecessaryvirtual.cxx index a5682ce96a96..463fc233e84e 100644 --- a/compilerplugins/clang/store/unnecessaryvirtual.cxx +++ b/compilerplugins/clang/store/unnecessaryvirtual.cxx @@ -68,7 +68,7 @@ private: std::string fullyQualifiedName(const FunctionDecl* functionDecl); }; -static std::string niceName(const CXXMethodDecl* functionDecl) +std::string niceName(const CXXMethodDecl* functionDecl) { std::string s = functionDecl->getParent()->getQualifiedNameAsString() + "::" diff --git a/compilerplugins/clang/unusedfieldsremove.cxx b/compilerplugins/clang/unusedfieldsremove.cxx index 943034cc8826..e33f940a8a35 100644 --- a/compilerplugins/clang/unusedfieldsremove.cxx +++ b/compilerplugins/clang/unusedfieldsremove.cxx @@ -44,7 +44,7 @@ private: char* mmappedData; }; -static size_t getFilesize(const char* filename) +size_t getFilesize(const char* filename) { struct stat st; stat(filename, &st); @@ -71,7 +71,7 @@ UnusedFieldsRemove::~UnusedFieldsRemove() close(mmapFD); } -static std::string niceName(const FieldDecl* fieldDecl) +std::string niceName(const FieldDecl* fieldDecl) { std::string s = fieldDecl->getParent()->getQualifiedNameAsString() + " " + fieldDecl->getNameAsString(); diff --git a/compilerplugins/clang/unusedmethodsremove.cxx b/compilerplugins/clang/unusedmethodsremove.cxx index 4da3b16a38bb..74c310dbba46 100644 --- a/compilerplugins/clang/unusedmethodsremove.cxx +++ b/compilerplugins/clang/unusedmethodsremove.cxx @@ -44,7 +44,7 @@ private: char* mmappedData; }; -static size_t getFilesize(const char* filename) +size_t getFilesize(const char* filename) { struct stat st; stat(filename, &st); @@ -71,7 +71,7 @@ UnusedMethodsRemove::~UnusedMethodsRemove() close(mmapFD); } -static std::string niceName(const CXXMethodDecl* functionDecl) +std::string niceName(const CXXMethodDecl* functionDecl) { std::string s = compat::getReturnType(*functionDecl).getCanonicalType().getAsString() |