summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-10-21 15:11:30 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-10-21 15:11:41 +0200
commitc2be00ee85d2abdf3fbe4bba0eba741f1d636d75 (patch)
tree3630794e1e844e631bd1af9dbbbf13e1dbbc145a
parent14471950f1c5b99ceb86491ac6006a30178f3467 (diff)
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_'.
-rw-r--r--clang/find-unprefixed-members.cxx6
1 files changed, 6 insertions, 0 deletions
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