Hello community, here is the log from the commit of package cvise for openSUSE:Factory checked in at 2020-04-27 23:37:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cvise (Old) and /work/SRC/openSUSE:Factory/.cvise.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cvise" Mon Apr 27 23:37:57 2020 rev:2 rq:798063 version:1.0.0+git.20200426.be575d6 Changes: -------- --- /work/SRC/openSUSE:Factory/cvise/cvise.changes 2020-04-25 20:29:45.398199252 +0200 +++ /work/SRC/openSUSE:Factory/.cvise.new.2738/cvise.changes 2020-04-27 23:38:04.963488645 +0200 @@ -1,0 +2,15 @@ +Sun Apr 26 19:38:54 UTC 2020 - mli...@suse.cz + +- Update to version 1.0.0+git.20200426.be575d6: + * Update build matrix. + * Test both LLVM 9 and LLVM 10. + * Enable non-type-temp-arg.cpp test (csmith-project/creduce#212). + * handle DREs coming from template instantiations + * don't call EvaluateAsInt on dependent expressions + * Update documentation for latest FreeBSD. + * Change logic deciding which clang libs to link with clang_delta + * Switch to lib names exported from ClangConfig.cmake + * Support multiple passes for --remove-pass option. + * Add 2 tests for clang_delta's try-catch pass. + +------------------------------------------------------------------- Old: ---- cvise-1.0.0+git.20200423.15ffa09.tar.xz New: ---- cvise-1.0.0+git.20200426.be575d6.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cvise.spec ++++++ --- /var/tmp/diff_new_pack.Ei5WCm/_old 2020-04-27 23:38:06.647491933 +0200 +++ /var/tmp/diff_new_pack.Ei5WCm/_new 2020-04-27 23:38:06.651491940 +0200 @@ -17,7 +17,7 @@ Name: cvise -Version: 1.0.0+git.20200423.15ffa09 +Version: 1.0.0+git.20200426.be575d6 Release: 0 Summary: Super-parallel Python port of the C-Reduce License: BSD-3-Clause @@ -27,15 +27,15 @@ BuildRequires: astyle BuildRequires: clang9-devel BuildRequires: cmake -BuildRequires: ninja BuildRequires: delta BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: indent BuildRequires: llvm9-devel BuildRequires: ncurses-devel -BuildRequires: python3-pytest4 +BuildRequires: ninja BuildRequires: python3-Pebble +BuildRequires: python3-pytest4 BuildRequires: unifdef Requires: astyle Requires: clang9 ++++++ cvise-1.0.0+git.20200423.15ffa09.tar.xz -> cvise-1.0.0+git.20200426.be575d6.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/.travis.yml new/cvise-1.0.0+git.20200426.be575d6/.travis.yml --- old/cvise-1.0.0+git.20200423.15ffa09/.travis.yml 2020-04-23 16:48:03.000000000 +0200 +++ new/cvise-1.0.0+git.20200426.be575d6/.travis.yml 2020-04-26 21:32:34.000000000 +0200 @@ -16,10 +16,6 @@ stages: - build -env: - global: - - DIST=opensusetw - # podman is currently not in Ubuntu addons: apt: @@ -31,17 +27,29 @@ matrix: - include: - - name: DEBUG build + - name: DEBUG build (LLVM 9) + stage: build + env: + - BUILD_TYPE=DEBUG + - DIST=opensusetw-llvm9 + + - name: DEBUG build (LLVM 10) stage: build - env: BUILD_TYPE=DEBUG + env: + - BUILD_TYPE=DEBUG + - DIST=opensusetw-llvm10 - - name: UBSAN build + - name: UBSAN build (LLVM 10) stage: build - env: BUILD_TYPE=UBSAN + env: + - BUILD_TYPE=UBSAN + - DIST=opensusetw-llvm10 - - name: ASAN build + - name: ASAN build (LLVM 10) stage: build - env: BUILD_TYPE=ASAN + env: + - BUILD_TYPE=ASAN + - DIST=opensusetw-llvm10 before_install: # podman needs a basic register set up (packaging bug in the ppa) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/Dockerfile-opensusetw new/cvise-1.0.0+git.20200426.be575d6/Dockerfile-opensusetw --- old/cvise-1.0.0+git.20200423.15ffa09/Dockerfile-opensusetw 2020-04-23 16:48:03.000000000 +0200 +++ new/cvise-1.0.0+git.20200426.be575d6/Dockerfile-opensusetw 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -FROM opensuse/tumbleweed - -RUN zypper -n install \ - binutils clang9-devel cmake flex gcc-c++ llvm9-devel python3-Pebble python3-pytest unifdef -ENV LSAN_OPTIONS="detect_leaks=0" - -WORKDIR /usr/src/cvise -VOLUME /usr/src/cvise diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/Dockerfile-opensusetw-llvm10 new/cvise-1.0.0+git.20200426.be575d6/Dockerfile-opensusetw-llvm10 --- old/cvise-1.0.0+git.20200423.15ffa09/Dockerfile-opensusetw-llvm10 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-1.0.0+git.20200426.be575d6/Dockerfile-opensusetw-llvm10 2020-04-26 21:32:34.000000000 +0200 @@ -0,0 +1,8 @@ +FROM opensuse/tumbleweed + +RUN zypper -n install \ + binutils clang10-devel cmake flex gcc-c++ llvm10-devel python3-Pebble python3-pytest unifdef +ENV LSAN_OPTIONS="detect_leaks=0" + +WORKDIR /usr/src/cvise +VOLUME /usr/src/cvise diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/Dockerfile-opensusetw-llvm9 new/cvise-1.0.0+git.20200426.be575d6/Dockerfile-opensusetw-llvm9 --- old/cvise-1.0.0+git.20200423.15ffa09/Dockerfile-opensusetw-llvm9 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-1.0.0+git.20200426.be575d6/Dockerfile-opensusetw-llvm9 2020-04-26 21:32:34.000000000 +0200 @@ -0,0 +1,8 @@ +FROM opensuse/tumbleweed + +RUN zypper -n install \ + binutils clang9-devel cmake flex gcc-c++ llvm9-devel python3-Pebble python3-pytest unifdef +ENV LSAN_OPTIONS="detect_leaks=0" + +WORKDIR /usr/src/cvise +VOLUME /usr/src/cvise diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/INSTALL.md new/cvise-1.0.0+git.20200426.be575d6/INSTALL.md --- old/cvise-1.0.0+git.20200423.15ffa09/INSTALL.md 2020-04-23 16:48:03.000000000 +0200 +++ new/cvise-1.0.0+git.20200426.be575d6/INSTALL.md 2020-04-26 21:32:34.000000000 +0200 @@ -29,7 +29,7 @@ flex build-essential ``` -On FreeBSD 11.2, the prerequisites can be installed like this: +On FreeBSD 12.1, the prerequisites can be installed like this: ``` sudo pkg install \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/CMakeLists.txt new/cvise-1.0.0+git.20200426.be575d6/clang_delta/CMakeLists.txt --- old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/CMakeLists.txt 2020-04-23 16:48:03.000000000 +0200 +++ new/cvise-1.0.0+git.20200426.be575d6/clang_delta/CMakeLists.txt 2020-04-26 21:32:34.000000000 +0200 @@ -423,6 +423,30 @@ ) configure_file( + "${clang_delta_SOURCE_DIR}/tests/remove-try-catch/try-catch-1.cpp" + "${clang_delta_BINARY_DIR}/tests/remove-try-catch/try-catch-1.cpp" + COPYONLY +) + +configure_file( + "${clang_delta_SOURCE_DIR}/tests/remove-try-catch/try-catch-1.output" + "${clang_delta_BINARY_DIR}/tests/remove-try-catch/try-catch-1.output" + COPYONLY +) + +configure_file( + "${clang_delta_SOURCE_DIR}/tests/remove-try-catch/try-catch-2.cpp" + "${clang_delta_BINARY_DIR}/tests/remove-try-catch/try-catch-2.cpp" + COPYONLY +) + +configure_file( + "${clang_delta_SOURCE_DIR}/tests/remove-try-catch/try-catch-2.output" + "${clang_delta_BINARY_DIR}/tests/remove-try-catch/try-catch-2.output" + COPYONLY +) + +configure_file( "${clang_delta_SOURCE_DIR}/tests/remove-unused-field/designated1.c" "${clang_delta_BINARY_DIR}/tests/remove-unused-field/designated1.c" COPYONLY @@ -1047,6 +1071,18 @@ ) configure_file( + "${clang_delta_SOURCE_DIR}/tests/rename-fun/func_templ.cc" + "${clang_delta_BINARY_DIR}/tests/rename-fun/func_templ.cc" + COPYONLY +) + +configure_file( + "${clang_delta_SOURCE_DIR}/tests/rename-fun/func_templ.output" + "${clang_delta_BINARY_DIR}/tests/rename-fun/func_templ.output" + COPYONLY +) + +configure_file( "${clang_delta_SOURCE_DIR}/tests/rename-fun/overloaded.cc" "${clang_delta_BINARY_DIR}/tests/rename-fun/overloaded.cc" COPYONLY @@ -1387,10 +1423,21 @@ support ) -set(CLANG_LIBS - clang-cpp - LLVM -) +if (${LLVM_LINK_LLVM_DYLIB}) + set(CLANG_LIBS + clang-cpp + LLVM + ) +else() + set(CLANG_LIBS + clangAST + clangBasic + clangFrontend + clangParse + clangLex + clangRewrite + ) +endif() add_executable(clang_delta ${CMAKE_BINARY_DIR}/config.h @@ -1461,6 +1508,8 @@ RemovePointer.h RemoveTrivialBaseTemplate.cpp RemoveTrivialBaseTemplate.h + RemoveTryCatch.cpp + RemoveTryCatch.h RemoveUnresolvedBase.cpp RemoveUnresolvedBase.h RemoveUnusedEnumMember.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/ReduceArrayDim.cpp new/cvise-1.0.0+git.20200426.be575d6/clang_delta/ReduceArrayDim.cpp --- old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/ReduceArrayDim.cpp 2020-04-23 16:48:03.000000000 +0200 +++ new/cvise-1.0.0+git.20200426.be575d6/clang_delta/ReduceArrayDim.cpp 2020-04-26 21:32:34.000000000 +0200 @@ -246,16 +246,6 @@ return getConstArraySize(CstArrayTy); } - if (const DependentSizedArrayType *DepArrayTy = - dyn_cast<DependentSizedArrayType>(ATy)) { - const Expr *E = DepArrayTy->getSizeExpr(); - Expr::EvalResult Result; - if (E->EvaluateAsInt(Result, *Context)) { - llvm::APSInt IVal = Result.Val.getInt(); - return (unsigned)(*IVal.getRawData()); - } - } - return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/RemoveTryCatch.cpp new/cvise-1.0.0+git.20200426.be575d6/clang_delta/RemoveTryCatch.cpp --- old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/RemoveTryCatch.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-1.0.0+git.20200426.be575d6/clang_delta/RemoveTryCatch.cpp 2020-04-26 21:32:34.000000000 +0200 @@ -0,0 +1,136 @@ +//===----------------------------------------------------------------------===// +// +// Copyright (c) 2012, 2013, 2015 The University of Utah +// Copyright (c) 2012 Konstantin Tokarev <annu...@yandex.ru> +// All rights reserved. +// +// This file is distributed under the University of Illinois Open Source +// License. See the file COPYING for details. +// +//===----------------------------------------------------------------------===// + +#if HAVE_CONFIG_H +# include <config.h> +#endif + +#include "RemoveTryCatch.h" + +#include <cctype> +#include "clang/AST/RecursiveASTVisitor.h" +#include "clang/AST/ASTContext.h" +#include "clang/Basic/SourceManager.h" + +#include "TransformationManager.h" + +using namespace clang; + +static const char *DescriptionMsg = +"Remove catch blocks and if not present the try block as well. \n"; + +static RegisterTransformation<RemoveTryCatch> + Trans("remove-try-catch", DescriptionMsg); + +class RemoveTryCatchAnalysisVisitor : public + RecursiveASTVisitor<RemoveTryCatchAnalysisVisitor> { +public: + + explicit RemoveTryCatchAnalysisVisitor(RemoveTryCatch *Instance) + : ConsumerInstance(Instance) + { } + + bool VisitCXXTryStmt(CXXTryStmt *CTS); + +private: + + RemoveTryCatch *ConsumerInstance; +}; + +bool RemoveTryCatchAnalysisVisitor::VisitCXXTryStmt( + CXXTryStmt *CTS) +{ + if (ConsumerInstance->isInIncludedFile(CTS)) { + return true; + } + + // Count try block + ++ConsumerInstance->ValidInstanceNum; + + if (ConsumerInstance->TransformationCounter == + ConsumerInstance->ValidInstanceNum) { + ConsumerInstance->TheTryCatchStmt = CTS; + } + + int TmpInstanceNum = ConsumerInstance->ValidInstanceNum; + + // Count all catch blocks + ConsumerInstance->ValidInstanceNum += CTS->getNumHandlers(); + + // Early exit if the transformation counter is less than the index of any + // catch block + if (ConsumerInstance->TransformationCounter <= TmpInstanceNum) { + return true; + } + + // Early exit if the transformation counter is higher than the index of any + // catch block + if (ConsumerInstance->TransformationCounter > + ConsumerInstance->ValidInstanceNum) { + return true; + } + + TransAssert(ConsumerInstance->TransformationCounter > TmpInstanceNum); + + int CatchIdx = ConsumerInstance->TransformationCounter - TmpInstanceNum - 1; + ConsumerInstance->TheTryCatchStmt = CTS->getHandler(CatchIdx); + + // If the last catch block is removed the "try" has to be removed as well + if (CTS->getNumHandlers() == 1) { + ConsumerInstance->RewriteTryStmt = CTS; + } + + return true; +} + +void RemoveTryCatch::Initialize(ASTContext &context) +{ + Transformation::Initialize(context); + AnalysisVisitor = new RemoveTryCatchAnalysisVisitor(this); +} + +void RemoveTryCatch::HandleTranslationUnit(ASTContext &Ctx) +{ + AnalysisVisitor->TraverseDecl(Ctx.getTranslationUnitDecl()); + + if (QueryInstanceOnly) + return; + + if (TransformationCounter > ValidInstanceNum) { + TransError = TransMaxInstanceError; + return; + } + + Ctx.getDiagnostics().setSuppressAllDiagnostics(false); + + TransAssert(TheTryCatchStmt && "NULL TheTryCatchStmt!"); + + removeStmt(); + + if (Ctx.getDiagnostics().hasErrorOccurred() || + Ctx.getDiagnostics().hasFatalErrorOccurred()) + TransError = TransInternalError; +} + +void RemoveTryCatch::removeStmt() +{ + SourceRange Range = TheTryCatchStmt->getSourceRange(); + TheRewriter.RemoveText(Range); + + if (RewriteTryStmt != nullptr) { + TheRewriter.RemoveText(RewriteTryStmt->getBeginLoc(), 3); + } +} + +RemoveTryCatch::~RemoveTryCatch() +{ + delete AnalysisVisitor; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/RemoveTryCatch.h new/cvise-1.0.0+git.20200426.be575d6/clang_delta/RemoveTryCatch.h --- old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/RemoveTryCatch.h 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-1.0.0+git.20200426.be575d6/clang_delta/RemoveTryCatch.h 2020-04-26 21:32:34.000000000 +0200 @@ -0,0 +1,59 @@ +//===----------------------------------------------------------------------===// +// +// Copyright (c) 2012 The University of Utah +// Copyright (c) 2012 Konstantin Tokarev <annu...@yandex.ru> +// All rights reserved. +// +// This file is distributed under the University of Illinois Open Source +// License. See the file COPYING for details. +// +//===----------------------------------------------------------------------===// + +#ifndef REMOVE_TRY_CATCH_H +#define REMOVE_TRY_CATCH_H + +#include <string> +#include "llvm/ADT/DenseMap.h" +#include "Transformation.h" + +namespace clang { + class Stmt; +} + +class RemoveTryCatchAnalysisVisitor; + +class RemoveTryCatch : public Transformation { +friend class RemoveTryCatchAnalysisVisitor; + +public: + + RemoveTryCatch(const char *TransName, const char *Desc) + : Transformation(TransName, Desc), + AnalysisVisitor(0), + RewriteTryStmt(0), + TheTryCatchStmt(0) + { } + + ~RemoveTryCatch(); + +private: + + virtual void Initialize(clang::ASTContext &context); + + virtual void HandleTranslationUnit(clang::ASTContext &Ctx); + + void removeStmt(); + + RemoveTryCatchAnalysisVisitor *AnalysisVisitor; + + clang::Stmt *RewriteTryStmt; + clang::Stmt *TheTryCatchStmt; + + // Unimplemented + RemoveTryCatch(); + + RemoveTryCatch(const RemoveTryCatch &); + + void operator=(const RemoveTryCatch &); +}; +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/RenameFun.cpp new/cvise-1.0.0+git.20200426.be575d6/clang_delta/RenameFun.cpp --- old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/RenameFun.cpp 2020-04-23 16:48:03.000000000 +0200 +++ new/cvise-1.0.0+git.20200426.be575d6/clang_delta/RenameFun.cpp 2020-04-26 21:32:34.000000000 +0200 @@ -140,6 +140,10 @@ ConsumerInstance->isInIncludedFile(FD)) return true; + if (FD->isTemplateInstantiation()) { + FD = FD->getTemplateInstantiationPattern(); + } + FunctionDecl *CanonicalDecl = FD->getCanonicalDecl(); llvm::DenseMap<const FunctionDecl *, std::string>::iterator I = ConsumerInstance->FunToNameMap.find(CanonicalDecl); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/remove-try-catch/try-catch-1.cpp new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/remove-try-catch/try-catch-1.cpp --- old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/remove-try-catch/try-catch-1.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/remove-try-catch/try-catch-1.cpp 2020-04-26 21:32:34.000000000 +0200 @@ -0,0 +1,31 @@ +#include <exception> +#include <iostream> + +int main() +{ + try + { + int a = 6; + std::cerr << "a = " << a << "\n"; + } + catch(const std::exception &ex) + { + std::cerr << "Foo"; + } + catch(const std::exception &ex) + { + std::cerr << "Bar"; + } + + try + { + int a = 6; + std::cerr << "a = " << a << "\n"; + } + catch(const std::exception &ex) + { + std::cerr << "FooBar"; + } + + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/remove-try-catch/try-catch-1.output new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/remove-try-catch/try-catch-1.output --- old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/remove-try-catch/try-catch-1.output 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/remove-try-catch/try-catch-1.output 2020-04-26 21:32:34.000000000 +0200 @@ -0,0 +1,19 @@ +#include <exception> +#include <iostream> + +int main() +{ + + + try + { + int a = 6; + std::cerr << "a = " << a << "\n"; + } + catch(const std::exception &ex) + { + std::cerr << "FooBar"; + } + + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/remove-try-catch/try-catch-2.cpp new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/remove-try-catch/try-catch-2.cpp --- old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/remove-try-catch/try-catch-2.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/remove-try-catch/try-catch-2.cpp 2020-04-26 21:32:34.000000000 +0200 @@ -0,0 +1,31 @@ +#include <exception> +#include <iostream> + +int main() +{ + try + { + int a = 6; + std::cerr << "a = " << a << "\n"; + } + catch(const std::exception &ex) + { + std::cerr << "Foo"; + } + catch(const std::exception &ex) + { + std::cerr << "Bar"; + } + + try + { + int a = 6; + std::cerr << "a = " << a << "\n"; + } + catch(const std::exception &ex) + { + std::cerr << "FooBar"; + } + + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/remove-try-catch/try-catch-2.output new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/remove-try-catch/try-catch-2.output --- old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/remove-try-catch/try-catch-2.output 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/remove-try-catch/try-catch-2.output 2020-04-26 21:32:34.000000000 +0200 @@ -0,0 +1,28 @@ +#include <exception> +#include <iostream> + +int main() +{ + try + { + int a = 6; + std::cerr << "a = " << a << "\n"; + } + + catch(const std::exception &ex) + { + std::cerr << "Bar"; + } + + try + { + int a = 6; + std::cerr << "a = " << a << "\n"; + } + catch(const std::exception &ex) + { + std::cerr << "FooBar"; + } + + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/rename-fun/func_templ.cc new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/rename-fun/func_templ.cc --- old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/rename-fun/func_templ.cc 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/rename-fun/func_templ.cc 2020-04-26 21:32:34.000000000 +0200 @@ -0,0 +1,11 @@ +template <typename> struct S1 { + typedef S1 b; + void operator<<(b ()); +}; + +template <typename T> S1<T> fun(); +S1<char> s; + +int foo() { + s << fun; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/rename-fun/func_templ.output new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/rename-fun/func_templ.output --- old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/rename-fun/func_templ.output 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/rename-fun/func_templ.output 2020-04-26 21:32:34.000000000 +0200 @@ -0,0 +1,11 @@ +template <typename> struct S1 { + typedef S1 b; + void operator<<(b ()); +}; + +template <typename T> S1<T> fn1(); +S1<char> s; + +int fn2() { + s << fn1; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/test_clang_delta.py new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/test_clang_delta.py --- old/cvise-1.0.0+git.20200423.15ffa09/clang_delta/tests/test_clang_delta.py 2020-04-23 16:48:03.000000000 +0200 +++ new/cvise-1.0.0+git.20200426.be575d6/clang_delta/tests/test_clang_delta.py 2020-04-26 21:32:34.000000000 +0200 @@ -109,7 +109,6 @@ def test_param_to_global_macro(self): self.check_clang_delta('param-to-global/macro.c', '--transformation=param-to-global --counter=1') - @unittest.skip(reason='i586 assert: csmith-project/creduce#212') def test_reduce_array_dim_non_type_temp_arg(self): self.check_clang_delta('reduce-array-dim/non-type-temp-arg.cpp', '--transformation=reduce-array-dim --counter=1') @@ -122,6 +121,12 @@ def test_remove_nested_function_remove_nested_func1(self): self.check_clang_delta('remove-nested-function/remove_nested_func1.cc', '--transformation=remove-nested-function --counter=1') + def test_remove_try_catch_1(self): + self.check_clang_delta('remove-try-catch/try-catch-1.cpp', '--transformation=remove-try-catch --counter=1') + + def test_remove_try_catch_2(self): + self.check_clang_delta('remove-try-catch/try-catch-2.cpp', '--transformation=remove-try-catch --counter=2') + def test_remove_unused_field_designated1(self): self.check_clang_delta('remove-unused-field/designated1.c', '--transformation=remove-unused-field --counter=1') @@ -279,6 +284,9 @@ def test_rename_cxx_method_test3(self): self.check_clang_delta('rename-cxx-method/test3.cc', '--transformation=rename-cxx-method --counter=1') + def test_rename_fun_templ(self): + self.check_clang_delta('rename-fun/func_templ.cc', '--transformation=rename-fun --counter=1') + @unittest.skip(reason='Missing rename for last function') def test_rename_fun_multi(self): self.check_clang_delta('rename-fun/multi.c', '--transformation=rename-fun --counter=1') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/cvise/cvise.py new/cvise-1.0.0+git.20200426.be575d6/cvise/cvise.py --- old/cvise-1.0.0+git.20200423.15ffa09/cvise/cvise.py 2020-04-23 16:48:03.000000000 +0200 +++ new/cvise-1.0.0+git.20200426.be575d6/cvise/cvise.py 2020-04-26 21:32:34.000000000 +0200 @@ -61,6 +61,7 @@ def parse_pass_group_dict(cls, pass_group_dict, pass_options, external_programs, remove_pass, clang_delta_std, not_c): pass_group = {} + removed_passes = set(remove_pass.split(",")) if remove_pass else set() def parse_options(options): valid_options = set() @@ -96,7 +97,7 @@ raise CViseError("Unkown pass {}".format(pass_dict["pass"])) pass_instance = pass_class(pass_dict.get("arg"), external_programs) - if str(pass_instance) == remove_pass: + if str(pass_instance) in removed_passes: continue if not_c and "c" in pass_dict and pass_dict["c"]: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/cvise/pass_groups/all.json new/cvise-1.0.0+git.20200426.be575d6/cvise/pass_groups/all.json --- old/cvise-1.0.0+git.20200423.15ffa09/cvise/pass_groups/all.json 2020-04-23 16:48:03.000000000 +0200 +++ new/cvise-1.0.0+git.20200426.be575d6/cvise/pass_groups/all.json 2020-04-26 21:32:34.000000000 +0200 @@ -103,6 +103,7 @@ {"pass": "clang", "arg": "replace-dependent-name", "c": true }, {"pass": "clang", "arg": "simplify-recursive-template-instantiation", "c": true }, {"pass": "clang", "arg": "vector-to-array", "c": true }, + {"pass": "clang", "arg": "remove-try-catch", "c": true }, {"pass": "lines", "arg": "0"}, {"pass": "lines", "arg": "1"}, {"pass": "lines", "arg": "2"}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.0.0+git.20200423.15ffa09/cvise.py new/cvise-1.0.0+git.20200426.be575d6/cvise.py --- old/cvise-1.0.0+git.20200423.15ffa09/cvise.py 2020-04-23 16:48:03.000000000 +0200 +++ new/cvise-1.0.0+git.20200426.be575d6/cvise.py 2020-04-26 21:32:34.000000000 +0200 @@ -134,7 +134,7 @@ parser.add_argument("--print-diff", action="store_true", default=False, help="Show changes made by transformations, for debugging") parser.add_argument("--save-temps", action="store_true", default=False, help="Don't delete /tmp/cvise-xxxxxx directories on termination") parser.add_argument("--skip-initial-passes", action="store_true", default=False, help="Skip initial passes (useful if input is already partially reduced)") - parser.add_argument("--remove-pass", help="Remove all instances of the specified pass from the schedule") + parser.add_argument("--remove-pass", help="Remove all instances of the specified passes from the schedule (comma-separated)") parser.add_argument("--timing", action="store_true", default=False, help="Print timestamps about reduction progress") parser.add_argument("--timing-since-start", action="store_true", default=False, help="Print timestamps since the start of a reduction") parser.add_argument("--timeout", type=int, nargs="?", const=300, help="Interestingness test timeout in seconds")