[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[creduce-bugs] [PATCH] creduce doesn't compile with current (3.7svn) llvm/clang
Hi,
creduce (both 2.3.0 and current git) doesn't compile with current
llvm/clang svn.
Patch attached.
ttyl
bero
--- creduce-2.3.0/clang_delta/RemoveNamespace.cpp.omv~ 2015-05-26 23:37:08.490099302 +0200
+++ creduce-2.3.0/clang_delta/RemoveNamespace.cpp 2015-05-26 23:37:14.026145032 +0200
@@ -742,7 +742,7 @@ bool RemoveNamespace::hasNameConflict(co
return false;
DeclarationName Name = ND->getDeclName();
- DeclContext::lookup_const_result Result = ParentCtx->lookup(Name);
+ DeclContext::lookup_result Result = ParentCtx->lookup(Name);
return !Result.empty();
}
--- creduce-2.3.0/clang_delta/RemoveNestedFunction.cpp.omv~ 2015-05-26 23:41:25.304220680 +0200
+++ creduce-2.3.0/clang_delta/RemoveNestedFunction.cpp 2015-05-26 23:43:15.281129119 +0200
@@ -427,7 +427,7 @@ bool RemoveNestedFunction::addNewTmpVari
return RewriteHelper->addLocalVarToFunc(VarStr, TheFuncDecl);
}
// return writeNewIntTmpVariable(VarStr);
- QT = TheCallExpr->getCallReturnType();
+ QT = TheCallExpr->getCallReturnType(ASTCtx);
return writeNewTmpVariable(QT, VarStr);
}
--- creduce-2.3.0/clang_delta/RemoveUnusedFunction.cpp.omv~ 2015-05-26 23:43:43.969366092 +0200
+++ creduce-2.3.0/clang_delta/RemoveUnusedFunction.cpp 2015-05-26 23:43:52.028432661 +0200
@@ -639,8 +639,8 @@ RemoveUnusedFunction::lookupFunctionDecl
{
if (dyn_cast<LinkageSpecDecl>(Ctx))
return NULL;
- DeclContext::lookup_const_result Result = Ctx->lookup(DName);
- for (DeclContext::lookup_const_iterator I = Result.begin(), E = Result.end();
+ DeclContext::lookup_result Result = Ctx->lookup(DName);
+ for (DeclContext::lookup_iterator I = Result.begin(), E = Result.end();
I != E; ++I) {
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I))
return FD;
--- creduce-2.3.0/clang_delta/ReplaceCallExpr.cpp.omv~ 2015-05-26 23:46:02.021506437 +0200
+++ creduce-2.3.0/clang_delta/ReplaceCallExpr.cpp 2015-05-26 23:56:10.746559147 +0200
@@ -153,7 +153,7 @@ bool ReplaceCallExprVisitor::VisitCallEx
if (FD->getBuiltinID())
T = FD->getReturnType().getTypePtr();
else
- T = CE->getCallReturnType().getTypePtr();
+ T = CE->getCallReturnType(*ConsumerInstance->Context).getTypePtr();
if (T->isVoidType())
return true;
--- creduce-2.3.0/clang_delta/SimpleInliner.cpp.omv~ 2015-05-26 23:58:25.311677458 +0200
+++ creduce-2.3.0/clang_delta/SimpleInliner.cpp 2015-05-26 23:59:12.290067861 +0200
@@ -390,7 +390,7 @@ void SimpleInliner::createReturnVar(void
{
const Type *FDType = CurrentFD->getReturnType().getTypePtr();
const Type *CallExprType =
- TheCallExpr->getCallReturnType().getTypePtr();
+ TheCallExpr->getCallReturnType(*Context).getTypePtr();
// We don't need tmp var
if (FDType->isVoidType() && CallExprType->isVoidType()) {
--- creduce-2.3.0/clang_delta/Transformation.cpp.omv~ 2015-05-27 00:01:46.368348243 +0200
+++ creduce-2.3.0/clang_delta/Transformation.cpp 2015-05-27 00:02:19.653624832 +0200
@@ -462,8 +462,8 @@ const Type* Transformation::getBaseType(
const FunctionDecl *Transformation::lookupFunctionDeclInGlobal(
DeclarationName &DName, const DeclContext *Ctx)
{
- DeclContext::lookup_const_result Result = Ctx->lookup(DName);
- for (DeclContext::lookup_const_iterator I = Result.begin(), E = Result.end();
+ DeclContext::lookup_result Result = Ctx->lookup(DName);
+ for (DeclContext::lookup_iterator I = Result.begin(), E = Result.end();
I != E; ++I) {
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {
return FD;
@@ -534,8 +534,8 @@ const FunctionDecl *Transformation::look
{
if (dyn_cast<LinkageSpecDecl>(Ctx))
return NULL;
- DeclContext::lookup_const_result Result = Ctx->lookup(DName);
- for (DeclContext::lookup_const_iterator I = Result.begin(), E = Result.end();
+ DeclContext::lookup_result Result = Ctx->lookup(DName);
+ for (DeclContext::lookup_iterator I = Result.begin(), E = Result.end();
I != E; ++I) {
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {
return FD;