Skip to content

Commit

Permalink
Fix build with clang 3.6
Browse files Browse the repository at this point in the history
Fixits for old-style-connect are disabled anyway so it's fine.
  • Loading branch information
Sergio Martins committed Sep 15, 2015
1 parent 1750481 commit 93db7f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion checks/oldstyleconnect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ string OldStyleConnect::signalOrSlotNameFromMacro(SourceLocation macroLoc)
{
if (!macroLoc.isMacroID())
return "error";

#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 6
auto expansionRange = m_ci.getSourceManager().getImmediateExpansionRange(macroLoc);
SourceRange range = SourceRange(expansionRange.first, expansionRange.second);
auto charRange = Lexer::getAsCharRange(range, m_ci.getSourceManager(), m_ci.getLangOpts());
Expand All @@ -231,6 +231,9 @@ string OldStyleConnect::signalOrSlotNameFromMacro(SourceLocation macroLoc)
} else {
return string("regexp failed for ") + text;
}
#else
return {};
#endif
}

bool OldStyleConnect::isSignalOrSlot(SourceLocation loc, string &macroName) const
Expand Down

0 comments on commit 93db7f0

Please sign in to comment.