aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2019-10-03 22:58:22 +0100
committerSergio Martins <smartins@kde.org>2019-10-03 23:00:19 +0100
commit532e308a69f18424d89f895b0d050d4fe8390b65 (patch)
tree61bc42a38e1fcbc4f1807afd98d6dee12d6357d6 /src
parent81a1fe1c5837ad9c4590953ba555bc959c63b7d7 (diff)
qproperty-without-notify: Fix false-positives with llvm-9
Before llvm-9 the last character was missing.
Diffstat (limited to 'src')
-rw-r--r--src/checks/level1/qproperty-without-notify.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/checks/level1/qproperty-without-notify.cpp b/src/checks/level1/qproperty-without-notify.cpp
index d755c7c9..e1d6db4a 100644
--- a/src/checks/level1/qproperty-without-notify.cpp
+++ b/src/checks/level1/qproperty-without-notify.cpp
@@ -70,6 +70,9 @@ void QPropertyWithoutNotify::VisitMacroExpands(const clang::Token &MacroNameTok,
CharSourceRange crange = Lexer::getAsCharRange(range, sm(), lo());
string text = Lexer::getSourceText(crange, sm(), lo());
+ if (text.back() == ')')
+ text.pop_back();
+
vector<string> split = clazy::splitString(text, ' ');
bool found_read = false;