diff options
| author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-04-24 13:42:18 +0200 |
|---|---|---|
| committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-04-26 09:20:24 +0000 |
| commit | 47f19b1a8800c914b11560b86d92d25b5fe47e80 (patch) | |
| tree | 32b7bee3759313c027924a227a460c6958b73cfe | |
| parent | 6e79722cc0007c53b74a0f804767ef2565c20ef4 (diff) | |
Fix mingw libclang build
Mingw miscompiles one of the static variables
in Clang-Tidy which results in clang driver
wrong return codes. Making it a local static
variable solves the issue.
Change-Id: I438e1b8d644c742204e88e101c76fd188884089f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
| -rw-r--r-- | clang-tidy/modernize/LoopConvertCheck.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang-tidy/modernize/LoopConvertCheck.cpp b/clang-tidy/modernize/LoopConvertCheck.cpp index 54bf941f..1589c99c 100644 --- a/clang-tidy/modernize/LoopConvertCheck.cpp +++ b/clang-tidy/modernize/LoopConvertCheck.cpp @@ -44,9 +44,6 @@ static const char EndVarName[] = "endVar"; static const char DerefByValueResultName[] = "derefByValueResult"; static const char DerefByRefResultName[] = "derefByRefResult"; -// shared matchers -static const TypeMatcher AnyType = anything(); - static const StatementMatcher IntegerComparisonMatcher = expr(ignoringParenImpCasts( declRefExpr(to(varDecl(hasType(isInteger())).bind(ConditionVarName))))); @@ -174,6 +171,8 @@ StatementMatcher makeIteratorLoopMatcher() { qualType(unless(hasCanonicalType(rValueReferenceType()))) .bind(DerefByRefResultName)))))))))); + static const TypeMatcher AnyType = anything(); + return forStmt( unless(isInTemplateInstantiation()), hasLoopInit(anyOf(declStmt(declCountIs(2), |
