diff options
author | Sergio Martins <iamsergio@gmail.com> | 2019-10-05 16:22:01 +0100 |
---|---|---|
committer | Sergio Martins <iamsergio@gmail.com> | 2019-10-05 16:25:15 +0100 |
commit | cf04280bab651decbc3f608ac09dc07aafa6b402 (patch) | |
tree | 0207af73f6aad2571d77ca882efa356429662952 | |
parent | b4b6d5303eacf68dde8f2ab5cab0d20e38d31392 (diff) |
qproperty-type-mismatch: Fix unit-tests with llvm-9
Prior to version 9 the last character was missing in the macro
-rw-r--r-- | src/checks/manuallevel/qproperty-type-mismatch.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/checks/manuallevel/qproperty-type-mismatch.cpp b/src/checks/manuallevel/qproperty-type-mismatch.cpp index ae2f7153..b9f45c3f 100644 --- a/src/checks/manuallevel/qproperty-type-mismatch.cpp +++ b/src/checks/manuallevel/qproperty-type-mismatch.cpp @@ -238,6 +238,9 @@ void QPropertyTypeMismatch::VisitMacroExpands(const clang::Token &MacroNameTok, CharSourceRange crange = Lexer::getAsCharRange(range, sm(), lo()); string text = Lexer::getSourceText(crange, sm(), lo()); + if (!text.empty() && text.back() == ')') + text.pop_back(); + std::vector<std::string> split = clazy::splitString(text, ' '); if(split.size() < 2) return; |