[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

Sharadh Rajaraman via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 6 13:33:50 PDT 2024


https://github.com/sharadhr updated https://github.com/llvm/llvm-project/pull/99300

>From 51e74869c87de8ed8b37e7a9391428f3dfc1ac1a Mon Sep 17 00:00:00 2001
From: Sharadh Rajaraman <r.sharadh at outlook.sg>
Date: Sun, 14 Jul 2024 11:05:57 +0100
Subject: [PATCH 1/2] `TY_ModuleFile` should be a 'CXX' file type

---
 clang/lib/Driver/Types.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Driver/Types.cpp b/clang/lib/Driver/Types.cpp
index a7b6b9000e1d2..c6a03f4491dd7 100644
--- a/clang/lib/Driver/Types.cpp
+++ b/clang/lib/Driver/Types.cpp
@@ -242,7 +242,7 @@ bool types::isCXX(ID Id) {
   case TY_CXXHUHeader:
   case TY_PP_CXXHeaderUnit:
   case TY_ObjCXXHeader: case TY_PP_ObjCXXHeader:
-  case TY_CXXModule: case TY_PP_CXXModule:
+  case TY_CXXModule: case TY_PP_CXXModule: case TY_ModuleFile:
   case TY_PP_CLCXX:
   case TY_CUDA: case TY_PP_CUDA: case TY_CUDA_DEVICE:
   case TY_HIP:

>From cbe5a79ca48a888917863dd807ebcfefb2385d74 Mon Sep 17 00:00:00 2001
From: Sharadh Rajaraman <3754080+sharadhr at users.noreply.github.com>
Date: Tue, 16 Jul 2024 20:10:12 +0100
Subject: [PATCH 2/2] Resolve `clang-format` issues

---
 clang/lib/Driver/Types.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Driver/Types.cpp b/clang/lib/Driver/Types.cpp
index c6a03f4491dd7..842eb59b7382d 100644
--- a/clang/lib/Driver/Types.cpp
+++ b/clang/lib/Driver/Types.cpp
@@ -242,7 +242,9 @@ bool types::isCXX(ID Id) {
   case TY_CXXHUHeader:
   case TY_PP_CXXHeaderUnit:
   case TY_ObjCXXHeader: case TY_PP_ObjCXXHeader:
-  case TY_CXXModule: case TY_PP_CXXModule: case TY_ModuleFile:
+  case TY_CXXModule: 
+  case TY_PP_CXXModule:
+  case TY_ModuleFile:
   case TY_PP_CLCXX:
   case TY_CUDA: case TY_PP_CUDA: case TY_CUDA_DEVICE:
   case TY_HIP:



More information about the cfe-commits mailing list