Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package cvise for openSUSE:Factory checked in at 2022-12-13 18:57:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cvise (Old) and /work/SRC/openSUSE:Factory/.cvise.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cvise" Tue Dec 13 18:57:27 2022 rev:62 rq:1042718 version:2.6.0+git.20221213.c01d287 Changes: -------- --- /work/SRC/openSUSE:Factory/cvise/cvise.changes 2022-11-30 15:01:22.521847828 +0100 +++ /work/SRC/openSUSE:Factory/.cvise.new.1835/cvise.changes 2022-12-13 18:57:48.087950691 +0100 @@ -1,0 +2,18 @@ +Tue Dec 13 15:44:44 UTC 2022 - mli...@suse.cz + +- Update to version 2.6.0+git.20221213.c01d287: + * Transformation instantiate-template-param did not support replacement of all types (e.g. pointer, reference, arrays were not working) + * Bugfix: instantiate-template-param transformation used always the type of the first template parameter + * LLVM 16: stop using deprecated llvm::None. + * Remove LGTM badges as it will be closed. + +------------------------------------------------------------------- +Fri Dec 09 08:32:00 UTC 2022 - mli...@suse.cz + +- Update to version 2.6.0+git.20221209.b337b9a: + * Use ubuntu:rolling container + * Use ubuntu-latest. + * Improve error message for bad value of `--start-with-pass`. + * Use -Wno-error=mismatched-new-delete conditionally. + +------------------------------------------------------------------- Old: ---- cvise-2.6.0+git.20221130.702f9d5.tar.xz New: ---- cvise-2.6.0+git.20221213.c01d287.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cvise.spec ++++++ --- /var/tmp/diff_new_pack.cDRbsK/_old 2022-12-13 18:57:48.635953615 +0100 +++ /var/tmp/diff_new_pack.cDRbsK/_new 2022-12-13 18:57:48.639953637 +0100 @@ -17,7 +17,7 @@ Name: cvise -Version: 2.6.0+git.20221130.702f9d5 +Version: 2.6.0+git.20221213.c01d287 Release: 0 Summary: Super-parallel Python port of the C-Reduce License: BSD-3-Clause ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.cDRbsK/_old 2022-12-13 18:57:48.691953914 +0100 +++ /var/tmp/diff_new_pack.cDRbsK/_new 2022-12-13 18:57:48.695953935 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/marxin/cvise</param> - <param name="changesrevision">702f9d5a106b314e534139732888d0da0205ec5e</param></service></servicedata> + <param name="changesrevision">c01d287a694750859960e3c9834b4af2db15ef5b</param></service></servicedata> (No newline at EOF) ++++++ cvise-2.6.0+git.20221130.702f9d5.tar.xz -> cvise-2.6.0+git.20221213.c01d287.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/.github/workflows/build-llvm-nightly.yml new/cvise-2.6.0+git.20221213.c01d287/.github/workflows/build-llvm-nightly.yml --- old/cvise-2.6.0+git.20221130.702f9d5/.github/workflows/build-llvm-nightly.yml 2022-11-30 13:13:04.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/.github/workflows/build-llvm-nightly.yml 2022-12-13 16:43:50.000000000 +0100 @@ -13,7 +13,7 @@ CI-LLVM-nightly: runs-on: ubuntu-22.04 container: - image: ubuntu:devel + image: ubuntu:rolling steps: - run: apt-get update - run: apt-get -qq install -y gcc g++ wget lsb-release wget software-properties-common gnupg git cmake flex python3-pebble python3-psutil python3-chardet python3-pytest vim unifdef diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/CMakeLists.txt new/cvise-2.6.0+git.20221213.c01d287/CMakeLists.txt --- old/cvise-2.6.0+git.20221130.702f9d5/CMakeLists.txt 2022-11-30 13:13:04.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/CMakeLists.txt 2022-12-13 16:43:50.000000000 +0100 @@ -140,17 +140,26 @@ check_cxx_compiler_flag( "-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - ) +) + +check_cxx_compiler_flag( + "-Wno-error=mismatched-new-delete" + SUPPORTS_WMISMATCHED_NEW_DELETE +) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # XXX figure out how to get "-std=c++17 -fno-rtti" from LLVM. That's how we # get those options in the Automake path... set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wno-error=maybe-uninitialized") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fno-rtti -fno-strict-aliasing -Wall -Wextra -Wno-unused-parameter -Werror -Wno-error=maybe-uninitialized -Wno-error=mismatched-new-delete") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fno-rtti -fno-strict-aliasing -Wall -Wextra -Wno-unused-parameter -Werror -Wno-error=maybe-uninitialized") if(SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") endif() + if(SUPPORTS_WMISMATCHED_NEW_DELETE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=mismatched-new-delete") + endif() + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} -O3") endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/README.md new/cvise-2.6.0+git.20221213.c01d287/README.md --- old/cvise-2.6.0+git.20221130.702f9d5/README.md 2022-11-30 13:13:04.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/README.md 2022-12-13 16:43:50.000000000 +0100 @@ -2,9 +2,6 @@ [](https://github.com/marxin/cvise/actions/workflows/build.yml) [](https://github.com/marxin/cvise/actions/workflows/build-llvm-nightly.yml) -[](https://lgtm.com/projects/g/marxin/cvise/alerts/) -[](https://lgtm.com/projects/g/marxin/cvise/context:python) -[](https://lgtm.com/projects/g/marxin/cvise/context:cpp) ## About diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/CMakeLists.txt new/cvise-2.6.0+git.20221213.c01d287/clang_delta/CMakeLists.txt --- old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/CMakeLists.txt 2022-11-30 13:13:04.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/clang_delta/CMakeLists.txt 2022-12-13 16:43:50.000000000 +0100 @@ -92,6 +92,12 @@ "/tests/instantiate-template-param/test3.cc" "/tests/instantiate-template-param/test4.cc" "/tests/instantiate-template-param/test4.output" + "/tests/instantiate-template-param/test5.cc" + "/tests/instantiate-template-param/test5.output" + "/tests/instantiate-template-param/test6.cc" + "/tests/instantiate-template-param/test6.output" + "/tests/instantiate-template-param/test7.cc" + "/tests/instantiate-template-param/test7.output" "/tests/local-to-global/macro.c" "/tests/local-to-global/macro.output" "/tests/local-to-global/unnamed_1.c" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/InstantiateTemplateParam.cpp new/cvise-2.6.0+git.20221213.c01d287/clang_delta/InstantiateTemplateParam.cpp --- old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/InstantiateTemplateParam.cpp 2022-11-30 13:13:04.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/clang_delta/InstantiateTemplateParam.cpp 2022-12-13 16:43:50.000000000 +0100 @@ -158,6 +158,21 @@ return true; } +class InstantiateTemplateParam::FindForwardDeclVisitor : public RecursiveASTVisitor<FindForwardDeclVisitor> { + InstantiateTemplateParam* ConsumerInstance; + std::string& ForwardStr; + RecordDeclSet TempAvailableRecordDecls; +public: + explicit FindForwardDeclVisitor(InstantiateTemplateParam* ConsumerInstance, std::string& ForwardStr) + : ConsumerInstance(ConsumerInstance), ForwardStr(ForwardStr) + { } + + bool VisitRecordType(RecordType* RT) { + ConsumerInstance->getForwardDeclStr(RT, ForwardStr, TempAvailableRecordDecls); + return true; + } +}; + void InstantiateTemplateParam::Initialize(ASTContext &context) { Transformation::Initialize(context); @@ -297,39 +312,10 @@ bool InstantiateTemplateParam::getTypeString( const QualType &QT, std::string &Str, std::string &ForwardStr) { - const Type *Ty = QT.getTypePtr(); - Type::TypeClass TC = Ty->getTypeClass(); - - switch (TC) { - case Type::Elaborated: { - const ElaboratedType *ETy = dyn_cast<ElaboratedType>(Ty); - return getTypeString(ETy->getNamedType(), Str, ForwardStr); - } - - case Type::Typedef: { - const TypedefType *TdefTy = dyn_cast<TypedefType>(Ty); - const TypedefNameDecl *TdefD = TdefTy->getDecl(); - return getTypeString(TdefD->getUnderlyingType(), Str, ForwardStr); - } - - case Type::Record: { - RecordDeclSet TempAvailableRecordDecls; - getForwardDeclStr(Ty, ForwardStr, TempAvailableRecordDecls); - QT.getAsStringInternal(Str, getPrintingPolicy()); - return true; - } - - case Type::Builtin: { - QT.getAsStringInternal(Str, getPrintingPolicy()); - return true; - } - - default: - return false; - } - - TransAssert(0 && "Unreachable code!"); - return false; + llvm::raw_string_ostream Strm(Str); + QT.print(Strm, getPrintingPolicy(), ForwardStr); + FindForwardDeclVisitor(this, ForwardStr).TraverseType(QT); + return true; } bool @@ -360,19 +346,16 @@ return; unsigned NumArgs = ArgList.size(); (void)NumArgs; - unsigned Idx = 0; + unsigned Idx = -1; TemplateParameterList *TPList = D->getTemplateParameters(); - for (TemplateParameterList::const_iterator I = TPList->begin(), - E = TPList->end(); I != E; ++I) { - const NamedDecl *ND = (*I); + for (NamedDecl* ND : *TPList) { + ++Idx; // make it simple, skip NonTypeTemplateParmDecl and // TemplateTemplateParmDecl for now const TemplateTypeParmDecl *TyParmDecl = dyn_cast<TemplateTypeParmDecl>(ND); - if (!TyParmDecl || TyParmDecl->isParameterPack() || !ParamsSet.count(ND)) { - Idx++; + if (!TyParmDecl || TyParmDecl->isParameterPack() || !ParamsSet.count(ND)) continue; - } TransAssert((Idx < NumArgs) && "Invalid Idx!"); const TemplateArgument &Arg = ArgList.get(Idx); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/InstantiateTemplateParam.h new/cvise-2.6.0+git.20221213.c01d287/clang_delta/InstantiateTemplateParam.h --- old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/InstantiateTemplateParam.h 2022-11-30 13:13:04.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/clang_delta/InstantiateTemplateParam.h 2022-12-13 16:43:50.000000000 +0100 @@ -32,8 +32,10 @@ class InstantiateTemplateParamRewriteVisitor; class InstantiateTemplateParam : public Transformation { -friend class InstantiateTemplateParamASTVisitor; -friend class InstantiateTemplateParamRewriteVisitor; + friend class InstantiateTemplateParamASTVisitor; + friend class InstantiateTemplateParamRewriteVisitor; + + class FindForwardDeclVisitor; public: InstantiateTemplateParam(const char *TransName, const char *Desc) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/ReturnVoid.cpp new/cvise-2.6.0+git.20221213.c01d287/clang_delta/ReturnVoid.cpp --- old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/ReturnVoid.cpp 2022-11-30 13:13:04.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/clang_delta/ReturnVoid.cpp 2022-12-13 16:43:50.000000000 +0100 @@ -281,7 +281,11 @@ // If the Token/Macro contains more than one type of tokens, we would need // to split the macro in order to move parts to the trailing return type. if (ContainsQualifiers + ContainsSpecifiers + ContainsSomethingElse > 1) +#if LLVM_VERSION_MAJOR >= 16 + return std::nullopt; +#else return llvm::None; +#endif return CT; } @@ -311,7 +315,11 @@ if (!MI || MI->isFunctionLike()) { // Cannot handle function style macros. //diag(F.getLocation(), Message); +#if LLVM_VERSION_MAJOR >= 16 + return std::nullopt; +#else return llvm::None; +#endif } } T.setIdentifierInfo(&Info); @@ -321,7 +329,11 @@ ClassifiedTokens.push_back(*CT); else { //diag(F.getLocation(), Message); +#if LLVM_VERSION_MAJOR >= 16 + return std::nullopt; +#else return llvm::None; +#endif } } return ClassifiedTokens; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/ReturnVoid.h new/cvise-2.6.0+git.20221213.c01d287/clang_delta/ReturnVoid.h --- old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/ReturnVoid.h 2022-11-30 13:13:04.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/clang_delta/ReturnVoid.h 2022-12-13 16:43:50.000000000 +0100 @@ -11,6 +11,7 @@ #ifndef VOID_RETURN_H #define VOID_RETURN_H +#include <optional> #include <string> #include "llvm/ADT/SmallVector.h" #include "Transformation.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/instantiate-template-param/test5.cc new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/instantiate-template-param/test5.cc --- old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/instantiate-template-param/test5.cc 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/instantiate-template-param/test5.cc 2022-12-13 16:43:50.000000000 +0100 @@ -0,0 +1,13 @@ +template <class a> a b(); +template <class a> struct c { + template <class f> c(f) : d(b<f>()) {} + a d; +}; +template <class e> struct i : c<e> { + template <class g, class h> i(g, h) : c<e>(g()) {} +}; +struct j { + i<int *> k; + j(); +}; +j::j() : k(nullptr, int()) {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/instantiate-template-param/test5.output new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/instantiate-template-param/test5.output --- old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/instantiate-template-param/test5.output 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/instantiate-template-param/test5.output 2022-12-13 16:43:50.000000000 +0100 @@ -0,0 +1,13 @@ +template <class a> a b(); +template <class a> struct c { + template <class f> c(f) : d(b<f>()) {} + int * d; +}; +template <class e> struct i : c<e> { + template <class g, class h> i(g, h) : c<e>(g()) {} +}; +struct j { + i<int *> k; + j(); +}; +j::j() : k(nullptr, int()) {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/instantiate-template-param/test6.cc new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/instantiate-template-param/test6.cc --- old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/instantiate-template-param/test6.cc 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/instantiate-template-param/test6.cc 2022-12-13 16:43:50.000000000 +0100 @@ -0,0 +1,5 @@ +template <class f, class g> void C(f, g) {} + +void f() { + C<int, double>(10, 1.0); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/instantiate-template-param/test6.output new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/instantiate-template-param/test6.output --- old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/instantiate-template-param/test6.output 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/instantiate-template-param/test6.output 2022-12-13 16:43:50.000000000 +0100 @@ -0,0 +1,5 @@ +template <class f, class g> void C(f, double) {} + +void f() { + C<int, double>(10, 1.0); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/instantiate-template-param/test7.cc new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/instantiate-template-param/test7.cc --- old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/instantiate-template-param/test7.cc 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/instantiate-template-param/test7.cc 2022-12-13 16:43:50.000000000 +0100 @@ -0,0 +1,12 @@ +// Check that a forward declaration is inserted + +template <class a> void b(a&) { +} + +struct S { +}; + +void f() { + S s; + b(s); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/instantiate-template-param/test7.output new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/instantiate-template-param/test7.output --- old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/instantiate-template-param/test7.output 1970-01-01 01:00:00.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/instantiate-template-param/test7.output 2022-12-13 16:43:50.000000000 +0100 @@ -0,0 +1,13 @@ +// Check that a forward declaration is inserted + +struct S; + void b(S&) { +} + +struct S { +}; + +void f() { + S s; + b(s); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/test_clang_delta.py new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/test_clang_delta.py --- old/cvise-2.6.0+git.20221130.702f9d5/clang_delta/tests/test_clang_delta.py 2022-11-30 13:13:04.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/clang_delta/tests/test_clang_delta.py 2022-12-13 16:43:50.000000000 +0100 @@ -123,6 +123,15 @@ def test_instantiate_template_param_default_test4(self): self.check_clang_delta('instantiate-template-param/test4.cc', '--transformation=instantiate-template-param --counter=1') + def test_instantiate_template_param_default_test5(self): + self.check_clang_delta('instantiate-template-param/test5.cc', '--transformation=instantiate-template-param --counter=1') + + def test_instantiate_template_param_default_test6(self): + self.check_clang_delta('instantiate-template-param/test6.cc', '--transformation=instantiate-template-param --counter=2') + + def test_instantiate_template_param_default_test7(self): + self.check_clang_delta('instantiate-template-param/test7.cc', '--transformation=instantiate-template-param --counter=1') + def test_local_to_global_macro(self): self.check_clang_delta('local-to-global/macro.c', '--transformation=local-to-global --counter=1') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-2.6.0+git.20221130.702f9d5/cvise.py new/cvise-2.6.0+git.20221213.c01d287/cvise.py --- old/cvise-2.6.0+git.20221130.702f9d5/cvise.py 2022-11-30 13:13:04.000000000 +0100 +++ new/cvise-2.6.0+git.20221213.c01d287/cvise.py 2022-12-13 16:43:50.000000000 +0100 @@ -3,6 +3,7 @@ import argparse import datetime import importlib.util +from itertools import chain import logging import os import os.path @@ -256,15 +257,20 @@ logging.info('CLEANUP PASSES') for p in pass_group['last']: logging.info(str(p)) - sys.exit(0) - logging.shutdown() pass_statistic = statistics.PassStatistic() + if args.start_with_pass: + pass_names = [str(p) for p in chain(*pass_group.values())] + if args.start_with_pass not in pass_names: + print(f'Cannot find pass called "{args.start_with_pass}". ' + 'Please use --list-passes to get a list of available passes.') + sys.exit(1) + if not args.interestingness_test and not args.commands: print('Either INTERESTINGNESS_TEST or --commands must be used!') - exit(1) + sys.exit(1) # shift interestingness_test if --commands is used if args.interestingness_test and args.commands: