Hello community,

here is the log from the commit of package clazy for openSUSE:Leap:15.2 checked 
in at 2020-04-12 15:38:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/clazy (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.clazy.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "clazy"

Sun Apr 12 15:38:00 2020 rev:6 rq:790225 version:1.6

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/clazy/clazy.changes    2020-01-15 
14:50:22.661413739 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.clazy.new.3248/clazy.changes  2020-04-12 
15:38:00.793994957 +0200
@@ -1,0 +2,6 @@
+Mon Mar 30 21:10:22 UTC 2020 - Christophe Giboudeaux <[email protected]>
+
+- Add upstream patch:
+  * 0001-Fix-build-issues-using-llvm-10.0.0.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Fix-build-issues-using-llvm-10.0.0.patch

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

Other differences:
------------------
++++++ clazy.spec ++++++
--- /var/tmp/diff_new_pack.ul91rF/_old  2020-04-12 15:38:01.153995229 +0200
+++ /var/tmp/diff_new_pack.ul91rF/_new  2020-04-12 15:38:01.157995233 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package clazy
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,6 +25,7 @@
 URL:            https://www.kdab.com/clazy-video/
 Source0:        
https://download.kde.org/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz
 Patch0:         cmake-clang-cpp.patch
+Patch1:         0001-Fix-build-issues-using-llvm-10.0.0.patch
 BuildRequires:  clang
 BuildRequires:  clang-devel >= 3.9
 BuildRequires:  cmake >= 3.0

++++++ 0001-Fix-build-issues-using-llvm-10.0.0.patch ++++++
>From df41bd29433937111edca3654a7beb11ec765029 Mon Sep 17 00:00:00 2001
From: Johannes Ziegenbalg <[email protected]>
Date: Fri, 27 Mar 2020 14:18:32 +0100
Subject: [PATCH] Fix build issues using llvm 10.0.0

---
 CMakeLists.txt                    |  2 +-
 src/ClazyStandaloneMain.cpp       | 10 ++++++++++
 src/checks/level0/qstring-ref.cpp |  4 ++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f1463cf..a30813f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,7 +53,7 @@ if(MSVC)
   # disable trigger-happy warnings from Clang/LLVM headers
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4244 /wd4291 /wd4800 
/wd4141 /wd4146 /wd4251")
 elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-common 
-Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long 
-Wall -W -Wno-unused-parameter -Wwrite-strings -fno-exceptions -fno-rtti")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fno-common 
-Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long 
-Wall -W -Wno-unused-parameter -Wwrite-strings -fno-exceptions -fno-rtti")
 endif()
 
 set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} 
-Wl,-flat_namespace -Wl,-undefined -Wl,suppress")
diff --git a/src/ClazyStandaloneMain.cpp b/src/ClazyStandaloneMain.cpp
index aada189..6baae32 100644
--- a/src/ClazyStandaloneMain.cpp
+++ b/src/ClazyStandaloneMain.cpp
@@ -93,7 +93,11 @@ public:
     {
     }
 
+#if LLVM_VERSION_MAJOR >= 10
+    std::unique_ptr<FrontendAction> create() override
+#else
     FrontendAction *create() override
+#endif
     {
         ClazyContext::ClazyOptions options = ClazyContext::ClazyOption_None;
 
@@ -116,9 +120,15 @@ public:
             options |= ClazyContext::ClazyOption_IgnoreIncludedFiles;
 
         // TODO: We need to agregate the fixes with previous run
+#if LLVM_VERSION_MAJOR >= 10
+        return std::make_unique<ClazyStandaloneASTAction>(s_checks.getValue(), 
s_headerFilter.getValue(),
+                                                          
s_ignoreDirs.getValue(), s_exportFixes.getValue(),
+                                                          m_paths, options);
+#else
         return new ClazyStandaloneASTAction(s_checks.getValue(), 
s_headerFilter.getValue(),
                                             s_ignoreDirs.getValue(), 
s_exportFixes.getValue(),
                                             m_paths, options);
+#endif
     }
     std::vector<std::string> m_paths;
 };
diff --git a/src/checks/level0/qstring-ref.cpp 
b/src/checks/level0/qstring-ref.cpp
index d1d8a4e..ec9e890 100644
--- a/src/checks/level0/qstring-ref.cpp
+++ b/src/checks/level0/qstring-ref.cpp
@@ -117,7 +117,11 @@ static bool containsChild(Stmt *s, Stmt *target)
         return true;
 
     if (auto mte = dyn_cast<MaterializeTemporaryExpr>(s)) {
+#if LLVM_VERSION_MAJOR >= 10
+        return containsChild(mte->getSubExpr(), target);
+#else
         return containsChild(mte->getTemporary(), target);
+#endif
     } else if (auto ice = dyn_cast<ImplicitCastExpr>(s)) {
         return containsChild(ice->getSubExpr(), target);
     } else if (auto bte = dyn_cast<CXXBindTemporaryExpr>(s)) {
-- 
2.26.0


Reply via email to