diff -pruN 18.1.0-2/.github/workflows/on-push-verification.yml 18.1.1-1/.github/workflows/on-push-verification.yml
--- 18.1.0-2/.github/workflows/on-push-verification.yml	2024-03-26 12:07:24.000000000 +0000
+++ 18.1.1-1/.github/workflows/on-push-verification.yml	2024-08-26 08:33:56.000000000 +0000
@@ -4,7 +4,7 @@
 #   to choose correct dependencies revisions
 # ===---
 
-name: On push & pull-request verification
+name: In-tree build
 run-name: '${{ github.event_name }}: ${{ github.base_ref }} ${{ github.ref_name }}' # github.base_ref null for 'on: push'
 
 on:
@@ -24,29 +24,10 @@ on:
 
 jobs:
 
-  verify_default_branch:
-    name: Verify for `main` branch
-    # ref_name for 'on: push'
-    # base_ref for 'on: pull_request'
-    if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || (github.event_name == 'pull_request' && github.base_ref == 'main') }}
-    runs-on: ubuntu-22.04
-    steps:
-
-      - name: Checkout opencl-clang sources for action files
-        uses: actions/checkout@v3
-
-      - name: Run build-opencl-clang action
-        uses: ./.github/actions/build-opencl-clang
-        with:
-          ref_llvm: main
-          ref_translator: main
-          ref_opencl-clang: ${{ github.ref }}
-
   verify_release_branch:
-    name: Verify for `ocl-open-*` release branch
+    name: Linux
     # ref_name for 'on: push'
     # base_ref for 'on: pull_request'
-    if: ${{ github.ref_name != 'main' && github.base_ref != 'main' }}
     runs-on: ubuntu-22.04
     steps:
 
diff -pruN 18.1.0-2/CMakeLists.txt 18.1.1-1/CMakeLists.txt
--- 18.1.0-2/CMakeLists.txt	2024-03-26 12:07:24.000000000 +0000
+++ 18.1.1-1/CMakeLists.txt	2024-08-26 08:33:56.000000000 +0000
@@ -38,6 +38,10 @@ if(CMAKE_CROSSCOMPILING AND OPENCL_CLANG
   llvm_create_cross_target(${PROJECT_NAME} NATIVE "" Release)
 endif()
 
+option(LLVMSPIRV_INCLUDED_IN_LLVM
+  "Set to ON if libLLVMSPIRVLib is linked into libLLVM" ON)
+option(APPLY_PATCHES "Apply local patches" ON)
+
 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
     set(USE_PREBUILT_LLVM ON)
 
@@ -59,8 +63,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRE
     set(CMAKE_CXX_STANDARD 17)
     set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
-    option(LLVMSPIRV_INCLUDED_IN_LLVM
-      "Set to ON if libLLVMSPIRVLib is linked into libLLVM" ON)
     if(LLVMSPIRV_INCLUDED_IN_LLVM)
         message(STATUS "[OPENCL-CLANG] Assuming that libLLVMSPIRVLib is linked into libLLVM")
     else(LLVMSPIRV_INCLUDED_IN_LLVM)
@@ -157,18 +159,25 @@ if(NOT USE_PREBUILT_LLVM)
         )
     endif()
 
-    set(CLANG_BASE_REVISION release/18.x)
+    set(LLVM_BASE_REVISION release/18.x)
     set(SPIRV_BASE_REVISION llvm_release_180)
     set(TARGET_BRANCH "ocl-open-180")
-
-    apply_patches(${CLANG_SOURCE_DIR}
-                  ${CMAKE_CURRENT_SOURCE_DIR}/patches/clang
-                  ${CLANG_BASE_REVISION}
-                  ${TARGET_BRANCH})
-    apply_patches(${SPIRV_SOURCE_DIR}
-                  ${CMAKE_CURRENT_SOURCE_DIR}/patches/spirv
-                  ${SPIRV_BASE_REVISION}
-                  ${TARGET_BRANCH})
+    get_filename_component(LLVM_MONOREPO_DIR ${LLVM_SOURCE_DIR} DIRECTORY)
+    set(LLVM_PATCHES_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm
+                          ${CMAKE_CURRENT_SOURCE_DIR}/patches/clang)
+    if(APPLY_PATCHES)
+      message(STATUS "APPLY_PATCHES is enabled.")
+      apply_patches(${LLVM_MONOREPO_DIR}
+                    "${LLVM_PATCHES_DIRS}"
+                    ${LLVM_BASE_REVISION}
+                    ${TARGET_BRANCH})
+      apply_patches(${SPIRV_SOURCE_DIR}
+                    ${CMAKE_CURRENT_SOURCE_DIR}/patches/spirv
+                    ${SPIRV_BASE_REVISION}
+                    ${TARGET_BRANCH})
+    else()
+      message(STATUS "APPLY_PATCHES is disabled, skip patch apply process.")
+    endif()
 endif(NOT USE_PREBUILT_LLVM)
 
 #
diff -pruN 18.1.0-2/cmake/modules/CMakeFunctions.cmake 18.1.1-1/cmake/modules/CMakeFunctions.cmake
--- 18.1.0-2/cmake/modules/CMakeFunctions.cmake	2024-03-26 12:07:24.000000000 +0000
+++ 18.1.1-1/cmake/modules/CMakeFunctions.cmake	2024-08-26 08:33:56.000000000 +0000
@@ -56,7 +56,6 @@ function(is_backport_patch_present patch
         WORKING_DIRECTORY ${repo_dir}
         RESULT_VARIABLE patch_not_in_branches
         OUTPUT_QUIET
-        ERROR_QUIET
         )
     if(patch_not_in_branches)
         set(patch_in_branch False PARENT_SCOPE) # The patch is not present in local branch
@@ -73,7 +72,6 @@ function(is_valid_revision repo_dir revi
         COMMAND ${GIT_EXECUTABLE} log -1 ${revision}
         WORKING_DIRECTORY ${repo_dir}
         RESULT_VARIABLE output_var
-        ERROR_QUIET
         OUTPUT_QUIET
         )
     if(${output_var} EQUAL 0)
@@ -95,16 +93,21 @@ function(apply_patches repo_dir patches_
         return()
     endif()
 
-    message(STATUS "[OPENCL-CLANG] Patching repository ${repo_dir}")
+    # Check if it's a git repo
+    if(EXISTS "${repo_dir}/.git")
+      message(STATUS "[OPENCL-CLANG] Patching repository ${repo_dir}")
+    else()
+      message(STATUS "[OPENCL-CLANG][Warning] ${repo_dir} is not a git repository, therefore, local patches are not applied")
+      return()
+    endif()
     # Check if the target branch already exists
     execute_process(
         COMMAND ${GIT_EXECUTABLE} rev-parse --verify --no-revs -q ${target_branch}
         WORKING_DIRECTORY ${repo_dir}
         RESULT_VARIABLE patches_needed
-        ERROR_QUIET
         OUTPUT_QUIET
     )
-    if(patches_needed) # The target branch doesn't exist
+    if(patches_needed EQUAL 1) # The target branch doesn't exist
         list(SORT patches)
         is_valid_revision(${repo_dir} ${base_revision} exists_base_rev)
 
@@ -114,7 +117,6 @@ function(apply_patches repo_dir patches_
                 WORKING_DIRECTORY ${repo_dir}
                 OUTPUT_VARIABLE repo_head
                 OUTPUT_STRIP_TRAILING_WHITESPACE
-                ERROR_QUIET
                 )
             message(STATUS "[OPENCL-CLANG] ref ${base_revision} not exists in repository, using current HEAD:${repo_head}")
             set(base_revision ${repo_head})
@@ -134,22 +136,25 @@ function(apply_patches repo_dir patches_
                 message(STATUS "[OPENCL-CLANG] Patch ${patch} is already in local branch - ignore patching")
             else()
                 execute_process( # Apply the patch
-                    COMMAND ${GIT_EXECUTABLE} am --3way --ignore-whitespace ${patch}
+                    COMMAND ${GIT_EXECUTABLE} am --3way --ignore-whitespace -C0 ${patch}
                     WORKING_DIRECTORY ${repo_dir}
                     OUTPUT_VARIABLE patching_log
-                    ERROR_QUIET
                 )
                 message(STATUS "[OPENCL-CLANG] Not present - ${patching_log}")
             endif()
         endforeach(patch)
-    else() # The target branch already exists
+    elseif(patches_needed EQUAL 0) # The target branch already exists
         execute_process( # Check it out
             COMMAND ${GIT_EXECUTABLE} checkout ${target_branch}
             WORKING_DIRECTORY ${repo_dir}
-            ERROR_QUIET
             OUTPUT_QUIET
         )
     endif()
+    if (NOT (ret_check_out OR ret_apply_patch))
+        message(STATUS "[OPENCL-CLANG] Applied patch successfully!")
+    else()
+        message(FATAL_ERROR "[OPENCL-CLANG] Failed to apply patch!")
+    endif()
 endfunction()
 
 # Usage
diff -pruN 18.1.0-2/debian/changelog 18.1.1-1/debian/changelog
--- 18.1.0-2/debian/changelog	2024-09-20 22:45:33.000000000 +0000
+++ 18.1.1-1/debian/changelog	2024-12-18 08:30:56.000000000 +0000
@@ -1,3 +1,10 @@
+opencl-clang-18 (18.1.1-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Merge changes from opencl-clang-17 17.0.1-1.
+
+ -- Andreas Beckmann <anbe@debian.org>  Wed, 18 Dec 2024 09:30:56 +0100
+
 opencl-clang-18 (18.1.0-2) unstable; urgency=medium
 
   * Restrict watch file to 18.* releases.
@@ -14,6 +21,13 @@ opencl-clang-18 (18.1.0-1) unstable; urg
 
  -- Andreas Beckmann <anbe@debian.org>  Thu, 28 Mar 2024 20:36:38 +0100
 
+opencl-clang-17 (17.0.1-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Merge changes from opencl-clang-16 16.0.1-1.
+
+ -- Andreas Beckmann <anbe@debian.org>  Wed, 18 Dec 2024 00:09:32 +0100
+
 opencl-clang-17 (17.0.0-3) unstable; urgency=medium
 
   * Restrict watch file to 17.* releases.
@@ -43,6 +57,13 @@ opencl-clang-17 (17.0.0-1) experimental;
 
  -- Andreas Beckmann <anbe@debian.org>  Mon, 30 Oct 2023 14:25:29 +0100
 
+opencl-clang-16 (16.0.1-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+  * Merge changes from opencl-clang-15 15.0.1-1.
+
+ -- Andreas Beckmann <anbe@debian.org>  Tue, 17 Dec 2024 12:25:46 +0100
+
 opencl-clang-16 (16.0.0-3.1) unstable; urgency=medium
 
   * Non-maintainer upload.
@@ -74,6 +95,13 @@ opencl-clang-16 (16.0.0-1) experimental;
 
  -- Andreas Beckmann <anbe@debian.org>  Mon, 24 Apr 2023 15:46:58 +0200
 
+opencl-clang-15 (15.0.1-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+  * Merge changes from opencl-clang-14 14.0.1-1.
+
+ -- Andreas Beckmann <anbe@debian.org>  Tue, 17 Dec 2024 12:10:48 +0100
+
 opencl-clang-15 (15.0.0-3) unstable; urgency=medium
 
   * Restrict watch file to 15.* releases.
@@ -95,6 +123,14 @@ opencl-clang-15 (15.0.0-1) unstable; urg
 
  -- Andreas Beckmann <anbe@debian.org>  Tue, 04 Oct 2022 10:17:02 +0200
 
+opencl-clang-14 (14.0.1-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Update .symbols control file.
+  * Bump Standards-Version to 4.7.0.
+
+ -- Andreas Beckmann <anbe@debian.org>  Tue, 17 Dec 2024 01:02:54 +0100
+
 opencl-clang-14 (14.0.0-4) unstable; urgency=medium
 
   * Restrict watch file to 14.* releases.
diff -pruN 18.1.0-2/debian/gbp.conf 18.1.1-1/debian/gbp.conf
--- 18.1.0-2/debian/gbp.conf	2024-09-20 22:45:33.000000000 +0000
+++ 18.1.1-1/debian/gbp.conf	2024-12-18 08:30:56.000000000 +0000
@@ -1,3 +1,4 @@
 [DEFAULT]
 upstream-vcs-tag = v%(version)s
+upstream-branch = llvm18/upstream
 debian-branch = llvm18/main
diff -pruN 18.1.0-2/opencl_clang_options.td 18.1.1-1/opencl_clang_options.td
--- 18.1.0-2/opencl_clang_options.td	2024-03-26 12:07:24.000000000 +0000
+++ 18.1.1-1/opencl_clang_options.td	2024-08-26 08:33:56.000000000 +0000
@@ -34,6 +34,9 @@ def cl_std_CL1_1: Flag<["-"], "cl-std=CL
 def cl_std_CL1_2: Flag<["-"], "cl-std=CL1.2">;
 def cl_std_CL2_0: Flag<["-"], "cl-std=CL2.0">;
 def cl_std_CL3_0: Flag<["-"], "cl-std=CL3.0">;
+def cl_std_CLCxx: Flag<["-"], "cl-std=CLC++">;
+def cl_std_CLCxx1_0: Flag<["-"], "cl-std=CLC++1.0">;
+def cl_std_CLCxx2021: Flag<["-"], "cl-std=CLC++2021">;
 def cl_uniform_work_group_size: Flag<["-"], "cl-uniform-work-group-size">;
 def cl_no_subgroup_ifp: Flag<["-"], "cl-no-subgroup-ifp">;
 def triple : Separate<["-"], "triple">,  HelpText<"Specify target triple (e.g. i686-apple-darwin9)">;
diff -pruN 18.1.0-2/options_compile.cpp 18.1.1-1/options_compile.cpp
--- 18.1.0-2/options_compile.cpp	2024-03-26 12:07:24.000000000 +0000
+++ 18.1.1-1/options_compile.cpp	2024-08-26 08:33:56.000000000 +0000
@@ -71,6 +71,7 @@ std::string EffectiveOptionsFilter::proc
                                                    ArgsVector &effectiveArgs) {
   // Reset args
   int iCLStdSet = 0;
+  bool isCpp = false;
   bool fp64Enabled = false;
   std::string szTriple;
   std::string sourceName(llvm::Twine(s_progID++).str());
@@ -140,6 +141,17 @@ std::string EffectiveOptionsFilter::proc
       iCLStdSet = 300;
       effectiveArgs.push_back((*it)->getAsString(args));
       break;
+    case OPT_COMPILE_cl_std_CLCxx:
+    case OPT_COMPILE_cl_std_CLCxx1_0:
+      iCLStdSet = 200;
+      isCpp = true;
+      effectiveArgs.push_back((*it)->getAsString(args));
+      break;
+    case OPT_COMPILE_cl_std_CLCxx2021:
+      iCLStdSet = 300;
+      isCpp = true;
+      effectiveArgs.push_back((*it)->getAsString(args));
+      break;
     case OPT_COMPILE_triple:
       szTriple = (*it)->getValue();
       break;
@@ -221,7 +233,9 @@ std::string EffectiveOptionsFilter::proc
 
   // Specifying the option makes clang emit function body for functions
   // marked with inline keyword.
-  effectiveArgs.push_back("-fgnu89-inline");
+  if (!isCpp) {
+    effectiveArgs.push_back("-fgnu89-inline");
+  }
 
   // Do not support all extensions by default. Support for a particular
   // extension should be enabled by passing a '-cl-ext' option in pszOptionsEx.
