[Libreoffice-commits] dev-tools.git: clang/find-unprefixed-members.cxx
Miklos Vajna
vmiklos at collabora.co.uk
Fri Oct 21 13:12:04 UTC 2016
clang/find-unprefixed-members.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit c2be00ee85d2abdf3fbe4bba0eba741f1d636d75
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Oct 21 15:11:30 2016 +0200
clang: skip empty names in find-unprefixed-members
WW8Fib in core.git has this:
sal_uInt8 :2;
It makes little sense to try to rename '' to 'm_'.
diff --git a/clang/find-unprefixed-members.cxx b/clang/find-unprefixed-members.cxx
index 11049dc..605b1b0 100644
--- a/clang/find-unprefixed-members.cxx
+++ b/clang/find-unprefixed-members.cxx
@@ -72,6 +72,9 @@ public:
/// Checks if a non-static member has an expected name
bool checkNonStatic(const std::string& rName) const
{
+ if (rName.empty())
+ return true;
+
if (m_bPoco)
return rName.find("_") == 0;
else
@@ -81,6 +84,9 @@ public:
/// Checks if a static member has an expected name
bool checkStatic(const std::string& rName) const
{
+ if (rName.empty())
+ return true;
+
if (m_bPoco)
return !rName.empty() && rName[0] >= 'A' && rName[0] <= 'Z';
else
More information about the Libreoffice-commits
mailing list