Hello community,

here is the log from the commit of package cvise for openSUSE:Factory checked 
in at 2020-07-01 14:27:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cvise (Old)
 and      /work/SRC/openSUSE:Factory/.cvise.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cvise"

Wed Jul  1 14:27:39 2020 rev:12 rq:818074 version:1.4.0+git.20200701.2dbaf41

Changes:
--------
--- /work/SRC/openSUSE:Factory/cvise/cvise.changes      2020-06-30 
21:59:54.535398376 +0200
+++ /work/SRC/openSUSE:Factory/.cvise.new.3060/cvise.changes    2020-07-01 
14:27:44.622962713 +0200
@@ -1,0 +2,14 @@
+Wed Jul 01 10:38:35 UTC 2020 - mli...@suse.cz
+
+- Update to version 1.4.0+git.20200701.2dbaf41:
+  * Fix up RemoveUnusedEnumMember constructor.
+
+-------------------------------------------------------------------
+Wed Jul 01 09:42:32 UTC 2020 - mli...@suse.cz
+
+- Update to version 1.4.0+git.20200701.485b700:
+  * Add new tests for remove-unused-enum-member.
+  * Make remove-unused-enum-member clangbinarypass.
+  * Make RemoveUnusedEnumMember to accept --to-counter.
+
+-------------------------------------------------------------------

Old:
----
  cvise-1.4.0+git.20200630.58375a7.tar.xz

New:
----
  cvise-1.4.0+git.20200701.2dbaf41.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cvise.spec ++++++
--- /var/tmp/diff_new_pack.jpqkbz/_old  2020-07-01 14:27:45.422965194 +0200
+++ /var/tmp/diff_new_pack.jpqkbz/_new  2020-07-01 14:27:45.422965194 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           cvise
-Version:        1.4.0+git.20200630.58375a7
+Version:        1.4.0+git.20200701.2dbaf41
 Release:        0
 Summary:        Super-parallel Python port of the C-Reduce
 License:        BSD-3-Clause

++++++ cvise-1.4.0+git.20200630.58375a7.tar.xz -> 
cvise-1.4.0+git.20200701.2dbaf41.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cvise-1.4.0+git.20200630.58375a7/clang_delta/CMakeLists.txt 
new/cvise-1.4.0+git.20200701.2dbaf41/clang_delta/CMakeLists.txt
--- old/cvise-1.4.0+git.20200630.58375a7/clang_delta/CMakeLists.txt     
2020-06-30 13:22:59.000000000 +0200
+++ new/cvise-1.4.0+git.20200701.2dbaf41/clang_delta/CMakeLists.txt     
2020-07-01 12:38:16.000000000 +0200
@@ -149,6 +149,8 @@
   "/tests/remove-namespace/namespace15.output3"
   "/tests/remove-enum-member-value/builtin_macro.c"
   "/tests/remove-enum-member-value/builtin_macro.output"
+  "/tests/remove-unused-enum-member/range.c"
+  "/tests/remove-unused-enum-member/range.output"
   "/tests/remove-nested-function/remove_nested_func1.cc"
   "/tests/remove-nested-function/remove_nested_func1.output"
   "/tests/remove-try-catch/try-catch-1.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cvise-1.4.0+git.20200630.58375a7/clang_delta/RemoveUnusedEnumMember.cpp 
new/cvise-1.4.0+git.20200701.2dbaf41/clang_delta/RemoveUnusedEnumMember.cpp
--- old/cvise-1.4.0+git.20200630.58375a7/clang_delta/RemoveUnusedEnumMember.cpp 
2020-06-30 13:22:59.000000000 +0200
+++ new/cvise-1.4.0+git.20200701.2dbaf41/clang_delta/RemoveUnusedEnumMember.cpp 
2020-07-01 12:38:16.000000000 +0200
@@ -52,14 +52,20 @@
   if (ConsumerInstance->isInIncludedFile(ED) || ED != ED->getCanonicalDecl())
     return true;
 
+  /* Make it backward compatible where --to-counter is unset. */
+  if (ConsumerInstance->ToCounter == -1)
+    ConsumerInstance->ToCounter = ConsumerInstance->TransformationCounter;
+
   for (EnumDecl::enumerator_iterator I = ED->enumerator_begin(),
        E = ED->enumerator_end(); I != E; ++I) {
     if (!(*I)->isReferenced()) {
       ConsumerInstance->ValidInstanceNum++;
-      if (ConsumerInstance->ValidInstanceNum ==
-          ConsumerInstance->TransformationCounter) {
-        ConsumerInstance->TheEnumIterator = I;
-        ConsumerInstance->TheEnumDecl = ED;
+      if (ConsumerInstance->ValidInstanceNum >=
+          ConsumerInstance->TransformationCounter
+          && ConsumerInstance->ValidInstanceNum <=
+             ConsumerInstance->ToCounter) {
+        TransAssert(ED && "NULL TheEnumDecl!");
+        ConsumerInstance->EnumValues.push_back (I);
       }
     }
   }
@@ -79,30 +85,25 @@
   if (QueryInstanceOnly)
     return;
 
-  if (TransformationCounter > ValidInstanceNum) {
-    TransError = TransMaxInstanceError;
-    return;
-  }
-
   Ctx.getDiagnostics().setSuppressAllDiagnostics(false);
 
-  TransAssert(TheEnumDecl && "NULL TheEnumDecl!");
-
-  removeEnumConstantDecl();
+  for (auto ev : EnumValues) {
+    removeEnumConstantDecl(ev);
+  }
 
   if (Ctx.getDiagnostics().hasErrorOccurred() ||
       Ctx.getDiagnostics().hasFatalErrorOccurred())
     TransError = TransInternalError;
 }
 
-void RemoveUnusedEnumMember::removeEnumConstantDecl()
+void 
RemoveUnusedEnumMember::removeEnumConstantDecl(clang::EnumDecl::enumerator_iterator
 it)
 {
-  SourceLocation StartLoc = (*TheEnumIterator)->getBeginLoc();
+  SourceLocation StartLoc = it->getBeginLoc();
   if (StartLoc.isMacroID()) {
     CharSourceRange Range = SrcManager->getExpansionRange(StartLoc);
     StartLoc = Range.getBegin();
   }
-  SourceLocation EndLoc = (*TheEnumIterator)->getEndLoc();
+  SourceLocation EndLoc = it->getEndLoc();
   if (EndLoc.isMacroID()) {
     CharSourceRange Range = SrcManager->getExpansionRange(EndLoc);
     EndLoc = Range.getEnd();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cvise-1.4.0+git.20200630.58375a7/clang_delta/RemoveUnusedEnumMember.h 
new/cvise-1.4.0+git.20200701.2dbaf41/clang_delta/RemoveUnusedEnumMember.h
--- old/cvise-1.4.0+git.20200630.58375a7/clang_delta/RemoveUnusedEnumMember.h   
2020-06-30 13:22:59.000000000 +0200
+++ new/cvise-1.4.0+git.20200701.2dbaf41/clang_delta/RemoveUnusedEnumMember.h   
2020-07-01 12:38:16.000000000 +0200
@@ -25,9 +25,9 @@
 public:
 
   RemoveUnusedEnumMember(const char *TransName, const char *Desc)
-    : Transformation(TransName, Desc),
+    : Transformation(TransName, Desc, /*MultipleRewrites*/true),
       AnalysisVisitor(0),
-      TheEnumDecl(0)
+      EnumValues()
   { }
 
   ~RemoveUnusedEnumMember();
@@ -38,12 +38,11 @@
 
   virtual void HandleTranslationUnit(clang::ASTContext &Ctx);
 
-  void removeEnumConstantDecl();
+  void removeEnumConstantDecl(clang::EnumDecl::enumerator_iterator it);
 
   RemoveUnusedEnumMemberAnalysisVisitor *AnalysisVisitor;
 
-  clang::EnumDecl *TheEnumDecl;
-  clang::EnumDecl::enumerator_iterator TheEnumIterator;
+  std::vector<clang::EnumDecl::enumerator_iterator> EnumValues;
 
   // Unimplemented
   RemoveUnusedEnumMember();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cvise-1.4.0+git.20200630.58375a7/clang_delta/tests/remove-unused-enum-member/range.c
 
new/cvise-1.4.0+git.20200701.2dbaf41/clang_delta/tests/remove-unused-enum-member/range.c
--- 
old/cvise-1.4.0+git.20200630.58375a7/clang_delta/tests/remove-unused-enum-member/range.c
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/cvise-1.4.0+git.20200701.2dbaf41/clang_delta/tests/remove-unused-enum-member/range.c
    2020-07-01 12:38:16.000000000 +0200
@@ -0,0 +1,16 @@
+enum processor_type
+{
+  PROCESSOR_I386,
+  PROCESSOR_I486,
+  PROCESSOR_PENTIUM,
+  PROCESSOR_PENTIUMPRO,
+  PROCESSOR_K6,
+  PROCESSOR_ATHLON,
+  PROCESSOR_PENTIUM4,
+  PROCESSOR_max
+};
+enum fpmath_unit
+{
+  FPMATH_387 = 1,
+  FPMATH_SSE = 2
+};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cvise-1.4.0+git.20200630.58375a7/clang_delta/tests/remove-unused-enum-member/range.output
 
new/cvise-1.4.0+git.20200701.2dbaf41/clang_delta/tests/remove-unused-enum-member/range.output
--- 
old/cvise-1.4.0+git.20200630.58375a7/clang_delta/tests/remove-unused-enum-member/range.output
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/cvise-1.4.0+git.20200701.2dbaf41/clang_delta/tests/remove-unused-enum-member/range.output
       2020-07-01 12:38:16.000000000 +0200
@@ -0,0 +1,16 @@
+enum processor_type
+{
+  PROCESSOR_I386,
+  PROCESSOR_I486,
+  PROCESSOR_PENTIUM,
+  
+  
+  
+  
+  
+};
+enum fpmath_unit
+{
+  
+  FPMATH_SSE = 2
+};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cvise-1.4.0+git.20200630.58375a7/clang_delta/tests/test_clang_delta.py 
new/cvise-1.4.0+git.20200701.2dbaf41/clang_delta/tests/test_clang_delta.py
--- old/cvise-1.4.0+git.20200630.58375a7/clang_delta/tests/test_clang_delta.py  
2020-06-30 13:22:59.000000000 +0200
+++ new/cvise-1.4.0+git.20200701.2dbaf41/clang_delta/tests/test_clang_delta.py  
2020-07-01 12:38:16.000000000 +0200
@@ -130,6 +130,9 @@
     def test_remove_enum_member_value_builtin_macro(self):
         self.check_clang_delta('remove-enum-member-value/builtin_macro.c', 
'--transformation=remove-enum-member-value --counter=1')
 
+    def test_remove_unused_enum_member_value_range(self):
+        self.check_clang_delta('remove-unused-enum-member/range.c', 
'--transformation=remove-unused-enum-member --counter=4 --to-counter=9')
+
     def test_remove_namespace_macro(self):
         self.check_clang_delta('remove-namespace/macro.cpp', 
'--transformation=remove-namespace --counter=1')
         self.check_clang_delta('remove-namespace/macro.cpp', 
'--transformation=remove-namespace --counter=2',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cvise-1.4.0+git.20200630.58375a7/cvise/pass_groups/all.json 
new/cvise-1.4.0+git.20200701.2dbaf41/cvise/pass_groups/all.json
--- old/cvise-1.4.0+git.20200630.58375a7/cvise/pass_groups/all.json     
2020-06-30 13:22:59.000000000 +0200
+++ new/cvise-1.4.0+git.20200701.2dbaf41/cvise/pass_groups/all.json     
2020-07-01 12:38:16.000000000 +0200
@@ -25,7 +25,7 @@
     {"pass": "clang", "arg": "callexpr-to-value", "c": true },
     {"pass": "clang", "arg": "replace-callexpr", "c": true },
     {"pass": "clang", "arg": "simplify-callexpr", "c": true },
-    {"pass": "clang", "arg": "remove-unused-enum-member", "c": true },
+    {"pass": "clangbinarysearch", "arg": "remove-unused-enum-member", "c": 
true },
     {"pass": "clang", "arg": "remove-enum-member-value", "c": true },
     {"pass": "clangbinarysearch", "arg": "remove-unused-var", "c": true },
     {"pass": "special", "arg": "a", "c": true },
@@ -64,7 +64,7 @@
     {"pass": "clang", "arg": "replace-callexpr", "c": true },
     {"pass": "clang", "arg": "simplify-callexpr", "c": true },
     {"pass": "clang", "arg": "remove-unused-function", "c": true },
-    {"pass": "clang", "arg": "remove-unused-enum-member", "c": true },
+    {"pass": "clangbinarysearch", "arg": "remove-unused-enum-member", "c": 
true },
     {"pass": "clang", "arg": "remove-enum-member-value", "c": true },
     {"pass": "clangbinarysearch", "arg": "remove-unused-var", "c": true },
     {"pass": "clang", "arg": "simplify-if", "c": true },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cvise-1.4.0+git.20200630.58375a7/cvise/pass_groups/opencl-120.json 
new/cvise-1.4.0+git.20200701.2dbaf41/cvise/pass_groups/opencl-120.json
--- old/cvise-1.4.0+git.20200630.58375a7/cvise/pass_groups/opencl-120.json      
2020-06-30 13:22:59.000000000 +0200
+++ new/cvise-1.4.0+git.20200701.2dbaf41/cvise/pass_groups/opencl-120.json      
2020-07-01 12:38:16.000000000 +0200
@@ -25,7 +25,7 @@
     {"pass": "clang", "arg": "callexpr-to-value", "c": true },
     {"pass": "clang", "arg": "replace-callexpr", "c": true },
     {"pass": "clang", "arg": "simplify-callexpr", "c": true },
-    {"pass": "clang", "arg": "remove-unused-enum-member", "c": true },
+    {"pass": "clangbinarysearch", "arg": "remove-unused-enum-member", "c": 
true },
     {"pass": "clang", "arg": "remove-enum-member-value", "c": true },
     {"pass": "clangbinarysearch", "arg": "remove-unused-var", "c": true },
     {"pass": "special", "arg": "a", "c": true },
@@ -61,7 +61,7 @@
     {"pass": "clang", "arg": "replace-callexpr", "c": true },
     {"pass": "clang", "arg": "simplify-callexpr", "c": true },
     {"pass": "clang", "arg": "remove-unused-function", "c": true },
-    {"pass": "clang", "arg": "remove-unused-enum-member", "c": true },
+    {"pass": "clangbinarysearch", "arg": "remove-unused-enum-member", "c": 
true },
     {"pass": "clang", "arg": "remove-enum-member-value", "c": true },
     {"pass": "clangbinarysearch", "arg": "remove-unused-var", "c": true },
     {"pass": "clang", "arg": "simplify-if", "c": true },


Reply via email to