Remove support for Clang < 3.3

Change-Id: I185852a738bac10dc6d331afccfcbc7ae1225cb1
This commit is contained in:
Stephan Bergmann
2016-06-29 08:55:27 +02:00
parent 6439d93cbe
commit 1ce7176ba1
12 changed files with 29 additions and 155 deletions

View File

@@ -62,7 +62,7 @@ bool hasOverloads(FunctionDecl const * decl, unsigned arguments) {
ctx = ctx->getParent();
}
auto res = ctx->lookup(decl->getDeclName());
for (auto d = compat::begin(res); d != compat::end(res); ++d) {
for (auto d = res.begin(); d != res.end(); ++d) {
FunctionDecl const * f = dyn_cast<FunctionDecl>(*d);
if (f != nullptr && f->getMinRequiredArguments() <= arguments
&& f->getNumParams() >= arguments)
@@ -782,7 +782,8 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
loc = compiler.getSourceManager()
.getImmediateMacroCallerLoc(loc);
}
if (compat::isMacroBodyExpansion(compiler, loc)
if ((compiler.getSourceManager()
.isMacroBodyExpansion(loc))
&& (Lexer::getImmediateMacroName(
loc, compiler.getSourceManager(),
compiler.getLangOpts())
@@ -1119,7 +1120,7 @@ void StringConstant::reportChange(
while (compiler.getSourceManager().isMacroArgExpansion(loc)) {
loc = compiler.getSourceManager().getImmediateMacroCallerLoc(loc);
}
if (compat::isMacroBodyExpansion(compiler, loc)) {
if (compiler.getSourceManager().isMacroBodyExpansion(loc)) {
loc = compiler.getSourceManager().getSpellingLoc(loc);
}
unsigned n = Lexer::MeasureTokenLength(