aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2018-12-03 11:28:12 +0000
committerSergio Martins <iamsergio@gmail.com>2018-12-03 11:29:34 +0000
commitddfb80b7de992ebd77e9635bafba95ba5d7900f9 (patch)
tree3d87f1382e5b15322a774759067bdb0228cd3e80
parentd2a006d1dee119fd0449b3cfdc30d89a91a18f0d (diff)
ifndef-define-typo: Blacklist Q_CONSTRUCTOR_FUNCTION
As it defines Q_CONSTRUCTOR_FUNCTION0 CCMAIL: dfaure@kde.org
-rw-r--r--src/checks/manuallevel/ifndef-define-typo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/checks/manuallevel/ifndef-define-typo.cpp b/src/checks/manuallevel/ifndef-define-typo.cpp
index d655bfe8..1e7030e8 100644
--- a/src/checks/manuallevel/ifndef-define-typo.cpp
+++ b/src/checks/manuallevel/ifndef-define-typo.cpp
@@ -91,6 +91,9 @@ void IfndefDefineTypo::VisitEndif(SourceLocation, SourceLocation)
void IfndefDefineTypo::maybeWarn(const string &define, SourceLocation loc)
{
+ if (m_lastIfndef == "Q_CONSTRUCTOR_FUNCTION") // Transform into a list if more false-positives need to be added
+ return;
+
if (define == m_lastIfndef) {
m_lastIfndef.clear();
return;