[clang] [clang-format] Fix crashes when the macro expansion is empty (PR #119428)

2024-12-20 Thread Owen Pan via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: grep -Ev "// *[A-Z-]+:" %s | clang-format -style="{Macros: [A(x)=x]}" \ +// RUN: | FileCheck -strict-whitespace %s + +// CHECK: A() +A() owenca wrote: Don't add a lit test. Instead, add a unittest similar to the one you already added

[clang] [clang] Fix crashes when passing VLA to va_arg (PR #119563)

2024-12-20 Thread via cfe-commits
https://github.com/amane-ame updated https://github.com/llvm/llvm-project/pull/119563 From 659eda3ec76b63418f8b621b004728d9d7bf26ad Mon Sep 17 00:00:00 2001 From: amane-ame Date: Wed, 11 Dec 2024 22:17:51 +0800 Subject: [PATCH 01/10] [clang] Fix crashes when passing VLA to va_arg --- clang/li

[clang] [clang-format] Fix crashes when the macro expansion is empty (PR #119428)

2024-12-20 Thread via cfe-commits
https://github.com/amane-ame updated https://github.com/llvm/llvm-project/pull/119428 From 3a4c1a924faef3a7a09126694fcb943bd7083451 Mon Sep 17 00:00:00 2001 From: amane-ame Date: Wed, 11 Dec 2024 02:13:43 +0800 Subject: [PATCH 1/6] Fix crashes when the macro expansion is empty --- clang/lib/F

[clang] [clang-format] Fix a crash in `QualifierAlignment: Right` (PR #120821)

2024-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #120793. --- Full diff: https://github.com/llvm/llvm-project/pull/120821.diff 2 Files Affected: - (modified) clang/lib/Format/QualifierAlignmentFixer.cpp (+1-1) - (modified) clang/unittests/Format

[clang] [clang-format] Fix a crash in `QualifierAlignment: Right` (PR #120821)

2024-12-20 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/120821 Fixes #120793. >From 9a2a33fe4568f0b344e9093b99c87ad1a0f7e8a4 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 20 Dec 2024 20:02:26 -0800 Subject: [PATCH] [clang-format] Fix a crash in `QualifierAlignment: Rig

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-12-20 Thread via cfe-commits
@@ -463,6 +471,13 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { return true; mxms0 wrote: I changed the code and tests still pass, it looks like you're correct. :) https://github.com/llvm/llvm-project/pull/117370 _

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-12-20 Thread via cfe-commits
@@ -439,8 +439,16 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { dyn_cast(Node.getBase()->IgnoreParenImpCasts()); mxms0 wrote: I think ultimately going to the Sema code is probably the better place to be, but I'm not sure who's working on that

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-12-20 Thread via cfe-commits
mxms0 wrote: > I think there's a policy question here of how much trust we want to put into > the type system. Clearly, we've already put some trust into it to reduce > false positives, but we could decide to trust any old constant array type > bounds, and that would be a good code simplificat

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-12-20 Thread via cfe-commits
https://github.com/mxms0 updated https://github.com/llvm/llvm-project/pull/117370 >From 8fed333cf4221dbf1826351da80164db5d209c21 Mon Sep 17 00:00:00 2001 From: mxms Date: Fri, 22 Nov 2024 15:09:07 -0500 Subject: [PATCH 1/6] [Wunsafe-buffer-usage] Fix false positives in handling enums Do not w

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Erich Keane via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { + if (const TagDecl *TD = T->getAsTagDecl()) +return TD->hasAttr(); + if (const TypedefType *TDT = T->getAs())

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Erich Keane via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { + if (const TagDecl *TD = T->getAsTagDecl()) +return TD->hasAttr(); + if (const TypedefType *TDT = T->getAs())

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Erich Keane via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { erichkeane wrote: Huh, that commit seems to be intentionally NO warning on unused private fields.

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Erich Keane via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { + if (const TagDecl *TD = T->getAsTagDecl()) +return TD->hasAttr(); + if (const TypedefType *TDT = T->getAs())

[clang] [clang-format] Fix crashes when the macro expansion is empty (PR #119428)

2024-12-20 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: Please add a test case for https://github.com/llvm/llvm-project/issues/119258#issue-2728126922. https://github.com/llvm/llvm-project/pull/119428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [llvm] [HLSL] Root Signature Parser (PR #120811)

2024-12-20 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 3769fcb3e78eba5f3e34d1c2dfa994625edb005a 75f9b4d8deaa5bc4f9b8c07ae79f8539f43c0304 --e

[clang] [llvm] [HLSL] Root Signature Parser (PR #120811)

2024-12-20 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/120811 None >From 2b73435826c02577398fe96efc89d9efb4df0ef6 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 20 Dec 2024 01:22:06 + Subject: [PATCH 1/4] [HLSL] Define in-memory structure of RootElements ---

[clang] [Static analysis] Encodes a filename before inserting it into a URL. (PR #120810)

2024-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes This fixes a bug where report links generated from files such as StylePrimitiveNumericTypes+Conversions.h in WebKit result in an error. --- Full diff: https://github.com/llvm/llvm-project/pull/120810.diff 1

[clang] [Static analysis] Encodes a filename before inserting it into a URL. (PR #120810)

2024-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes This fixes a bug where report links generated from files such as StylePrimitiveNumericTypes+Conversions.h in WebKit result in an error. --- Full diff: https://github.com/llvm/llvm-project/pul

[clang] [Static analysis] Encodes a filename before inserting it into a URL. (PR #120810)

2024-12-20 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/120810 This fixes a bug where report links generated from files such as StylePrimitiveNumericTypes+Conversions.h in WebKit result in an error. >From 7da85184e77da5a6d44a8f14ebd3d38d7af493bb Mon Sep 17 00:00:00 2001 From

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Oleksandr T. via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { + if (const TagDecl *TD = T->getAsTagDecl()) +return TD->hasAttr(); + if (const TypedefType *TDT = T->getAs())

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Oleksandr T. via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { + if (const TagDecl *TD = T->getAsTagDecl()) +return TD->hasAttr(); + if (const TypedefType *TDT = T->getAs())

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 commented: . https://github.com/llvm/llvm-project/pull/117953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/21] Update SemaL

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/20] Update SemaL

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Oleksandr T. via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { + if (const TagDecl *TD = T->getAsTagDecl()) +return TD->hasAttr(); + if (const TypedefType *TDT = T->getAs())

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/19] Update SemaL

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/18] Update SemaL

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 commented: . https://github.com/llvm/llvm-project/pull/117953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [NVPTX] Switch front-ends and tests to ptx_kernel cc (PR #120806)

2024-12-20 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean edited https://github.com/llvm/llvm-project/pull/120806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/17] Update SemaL

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/16] Update SemaL

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/15] Update SemaL

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/14] Update SemaL

[clang] [llvm] [NVPTX] Auto-Upgrade some nvvm.annotations to attributes (PR #119261)

2024-12-20 Thread Alex MacLean via cfe-commits
@@ -1270,77 +1270,21 @@ exit: ; MODULE: attributes #[[ATTR1:[0-9]+]] = { convergent nocallback nounwind } ; MODULE: attributes #[[ATTR2:[0-9]+]] = { convergent nocallback nofree nounwind willreturn } ; MODULE: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nosync nounwind

[clang] [clang] Introduce a new UEFI target predefine. (PR #111719)

2024-12-20 Thread via cfe-commits
Prabhuk wrote: > Can you include a test for this change? I'll add the test. https://github.com/llvm/llvm-project/pull/111719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [NVPTX] Switch front-ends and tests to ptx_kernel cc (PR #120806)

2024-12-20 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean edited https://github.com/llvm/llvm-project/pull/120806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [NVPTX] Switch front-ends and tests to ptx_kernel cc (PR #120806)

2024-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir Author: Alex MacLean (AlexMaclean) Changes the `ptx_kernel` calling convention is a more idiomatic and standard way of specifying a NVPTX kernel than using the metadata which is not supposed to change the meaning of the program. Further, the check

[clang] [llvm] [mlir] [NVPTX] Switch front-ends and tests to ptx_kernel cc (PR #120806)

2024-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alex MacLean (AlexMaclean) Changes the `ptx_kernel` calling convention is a more idiomatic and standard way of specifying a NVPTX kernel than using the metadata which is not supposed to change the meaning of the program. Further, the chec

[clang] [llvm] [mlir] [NVPTX] Switch front-ends and tests to ptx_kernel cc (PR #120806)

2024-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-nvptx @llvm/pr-subscribers-clang-codegen Author: Alex MacLean (AlexMaclean) Changes the `ptx_kernel` calling convention is a more idiomatic and standard way of specifying a NVPTX kernel than using the metadata which is not supposed to change th

[clang] [llvm] [mlir] [NVPTX] Switch front-ends and tests to ptx_kernel cc (PR #120806)

2024-12-20 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean ready_for_review https://github.com/llvm/llvm-project/pull/120806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [NVPTX] Switch front-ends and tests to ptx_kernel cc (PR #120806)

2024-12-20 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean edited https://github.com/llvm/llvm-project/pull/120806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/95474 >From 69b09ea5b0f0a1c5419c488ade29b6fedc6de773 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 13 Jun 2024 14:20:50 -0700 Subject: [PATCH 01/12] [Clang] Implement P2280R4 Using unknown pointers and refe

[clang-tools-extra] [clang-tidy][NFC] extract options verify to separately function (PR #120768)

2024-12-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/120768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] e5de2a2 - [clang-tidy][NFC] extract options verify to separately function (#120768)

2024-12-20 Thread via cfe-commits
Author: Congcong Cai Date: 2024-12-21T07:07:19+08:00 New Revision: e5de2a2df4f983e1db83deaaa1d21457c922404f URL: https://github.com/llvm/llvm-project/commit/e5de2a2df4f983e1db83deaaa1d21457c922404f DIFF: https://github.com/llvm/llvm-project/commit/e5de2a2df4f983e1db83deaaa1d21457c922404f.diff

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-12-20 Thread Scott Constable via cfe-commits
https://github.com/scottconstable updated https://github.com/llvm/llvm-project/pull/117121 >From b787d6d7a9c0904c5e47e32556103b8a5220a7d1 Mon Sep 17 00:00:00 2001 From: Scott D Constable Date: Tue, 19 Nov 2024 15:51:05 -0800 Subject: [PATCH] Enhance KCFI type IDs with a 3-bit arity indicator.

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-20 Thread via cfe-commits
4m4n-x-B4w4ne wrote: Thanks ,I am working on it and also on clean PR build. https://github.com/llvm/llvm-project/pull/120087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-12-20 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert closed https://github.com/llvm/llvm-project/pull/110523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-12-20 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: Submitted as c1e7e4500c6e3b921f5e0cda8ba8d8d66e086db6. https://github.com/llvm/llvm-project/pull/110523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c1e7e45 - Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (#110523)

2024-12-20 Thread Aaron Puchert via cfe-commits
Author: Malek Ben Slimane Date: 2024-12-20T23:49:03+01:00 New Revision: c1e7e4500c6e3b921f5e0cda8ba8d8d66e086db6 URL: https://github.com/llvm/llvm-project/commit/c1e7e4500c6e3b921f5e0cda8ba8d8d66e086db6 DIFF: https://github.com/llvm/llvm-project/commit/c1e7e4500c6e3b921f5e0cda8ba8d8d66e086db6.d

[clang] [HLSL] Codegen for `cbuffer` declarations without embedded arrays or structs (PR #119755)

2024-12-20 Thread Helena Kotas via cfe-commits
https://github.com/hekota converted_to_draft https://github.com/llvm/llvm-project/pull/119755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ExtractAPI] merge anon declarators even if they're array types (PR #120801)

2024-12-20 Thread via cfe-commits
https://github.com/QuietMisdreavus created https://github.com/llvm/llvm-project/pull/120801 Resolves rdar://140210765 ExtractAPI currently checks declarator decls for embedded tag decls so that it can fold in anonymous tag decls as necessary. However, this check appears to be tricked when the

[clang] [ExtractAPI] merge anon declarators even if they're array types (PR #120801)

2024-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: QuietMisdreavus (QuietMisdreavus) Changes Resolves rdar://140210765 ExtractAPI currently checks declarator decls for embedded tag decls so that it can fold in anonymous tag decls as necessary. However, this check appears to be tricked wh

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,43 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Unlike the Darwin driver, the MachO driver doesn't add any framework search paths, +// only the normal header ones. +// RUN: %clang -x c -t

[clang] 994457f - [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and clang-dxc (#120644)

2024-12-20 Thread via cfe-commits
Author: Chris White Date: 2024-12-20T23:12:25+01:00 New Revision: 994457f81ffd95531eff07e08a0fea42397b80d2 URL: https://github.com/llvm/llvm-project/commit/994457f81ffd95531eff07e08a0fea42397b80d2 DIFF: https://github.com/llvm/llvm-project/commit/994457f81ffd95531eff07e08a0fea42397b80d2.diff L

[clang] [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and clang-dxc (PR #120644)

2024-12-20 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis closed https://github.com/llvm/llvm-project/pull/120644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and clang-dxc (PR #120644)

2024-12-20 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis approved this pull request. Great work, Thank you very much! https://github.com/llvm/llvm-project/pull/120644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 commented: added few test cases https://github.com/llvm/llvm-project/pull/117953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/13] Update SemaL

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/12] Update SemaL

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/11] Update SemaL

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/10] Update SemaL

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
@@ -0,0 +1,43 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Unlike the Darwin driver, the MachO driver doesn't add any framework search paths, +// only the normal header ones. +// RUN: %clang -x c -t

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/120734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Oleksandr T. via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { a-tarasyuk wrote: @erichkeane Thanks for the detailed feedback. I just extracted this helper https

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/120734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix crashes when the macro expansion is empty (PR #119428)

2024-12-20 Thread Björn Schäpers via cfe-commits
@@ -233,6 +233,10 @@ MacroExpander::expand(FormatToken *ID, if (Result.size() > 1) { ++Result[0]->MacroCtx->StartOfExpansion; ++Result[Result.size() - 2]->MacroCtx->EndOfExpansion; + } else { +// If the macro expansion is empty, mark the start and end ---

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Oleksandr T. via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { a-tarasyuk wrote: @erichkeane Thanks for the detailed feedback. I just extracted this helper https

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/120507 >From 7aecf682c1d620d1b4f9480315f614df7473f40f Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Wed, 18 Dec 2024 16:31:19 -0800 Subject: [PATCH] [Darwin][Driver][clang] apple-none-macho orders the res

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2024-12-20 Thread Ilia Kuklin via cfe-commits
@@ -8544,7 +8524,8 @@ clang::EnumConstantDecl *TypeSystemClang::AddEnumerationValueToEnumerationType( bool is_signed = false; underlying_type.IsIntegerType(is_signed); - llvm::APSInt value(enum_value_bit_size, is_signed); + // APSInt constructor's sign argument is isUns

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
@@ -312,7 +312,8 @@ bool InitHeaderSearch::ShouldAddDefaultIncludePaths( break; case llvm::Triple::UnknownOS: -if (triple.isWasm()) +if (triple.isWasm() || ((triple.getVendor() == llvm::Triple::Apple) && +triple.isOSBinFormatMachO()))

[clang] [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and clang-dxc (PR #120644)

2024-12-20 Thread Chris White via cfe-commits
https://github.com/whiteio updated https://github.com/llvm/llvm-project/pull/120644 >From 2d6d43abf0dfaa64a5cdd7bff3a3ecbef01635c2 Mon Sep 17 00:00:00 2001 From: Chris White Date: Thu, 19 Dec 2024 22:02:47 + Subject: [PATCH 1/2] [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and cl

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. LGTM once @jroelofs is happy with the test. https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
@@ -312,7 +312,8 @@ bool InitHeaderSearch::ShouldAddDefaultIncludePaths( break; case llvm::Triple::UnknownOS: -if (triple.isWasm()) +if (triple.isWasm() || ((triple.getVendor() == llvm::Triple::Apple) && +triple.isOSBinFormatMachO()))

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,43 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Unlike the Darwin driver, the MachO driver doesn't add any framework search paths, +// only the normal header ones. +// RUN: %clang -x c -t

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-20 Thread Helmut Januschka via cfe-commits
hjanuschka wrote: feedback addressed, you were right about the template case, it is really broken, adding: ``` std::optional getCheckTraversalKind() const override { return TK_IgnoreUnlessSpelledInSource; } ``` fixes it, but now templates seem to be skipped completely. and existing

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
@@ -0,0 +1,43 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Unlike the Darwin driver, the MachO driver doesn't add any framework search paths, +// only the normal header ones. +// RUN: %clang -x c -t

[clang] 7a4b3b4 - [HLSL] Add Load(int) method on structured buffers (#120663)

2024-12-20 Thread via cfe-commits
Author: Helena Kotas Date: 2024-12-20T12:52:38-08:00 New Revision: 7a4b3b4927bd92e8494dca9dffaf5aeeca4658ba URL: https://github.com/llvm/llvm-project/commit/7a4b3b4927bd92e8494dca9dffaf5aeeca4658ba DIFF: https://github.com/llvm/llvm-project/commit/7a4b3b4927bd92e8494dca9dffaf5aeeca4658ba.diff

[clang] [HLSL] Add Load(int) method on structured buffers (PR #120663)

2024-12-20 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/120663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/120507 >From 8a08bbd37f0350179b812d24ec686f06bcc9c152 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Wed, 18 Dec 2024 16:31:19 -0800 Subject: [PATCH] [Darwin][Driver][clang] apple-none-macho orders the res

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2024-12-20 Thread Ilia Kuklin via cfe-commits
@@ -2299,11 +2301,103 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_va

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2024-12-20 Thread Ilia Kuklin via cfe-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/115005 >From 5290832b802d98b9d293b6910c0837911ec490c4 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Mon, 4 Nov 2024 14:33:45 +0500 Subject: [PATCH 1/6] [lldb] Analyze enum promotion type during parsing --- clang/in

[clang] [clang] Introduce a new UEFI target predefine. (PR #111719)

2024-12-20 Thread Petr Hosek via cfe-commits
petrhosek wrote: Can you include a test for this change? https://github.com/llvm/llvm-project/pull/111719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce a new UEFI target predefine. (PR #111719)

2024-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Prabhuk (Prabhuk) Changes Add a `__UEFI__` predefine for UEFI target. --- Full diff: https://github.com/llvm/llvm-project/pull/111719.diff 1 Files Affected: - (modified) clang/lib/Basic/Targets/OSTargets.h (+3-1) ``diff diff

[clang] [clang] Introduce a new UEFI target predefine. (PR #111719)

2024-12-20 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/111719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce a new UEFI target predefine. (PR #111719)

2024-12-20 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek ready_for_review https://github.com/llvm/llvm-project/pull/111719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix uefi target for aarch64 & x86_64 (PR #120632)

2024-12-20 Thread Petr Hosek via cfe-commits
@@ -790,7 +790,9 @@ template class LLVM_LIBRARY_VISIBILITY UEFITargetInfo : public OSTargetInfo { protected: void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple, -MacroBuilder &Builder) const override {} +MacroBuilder

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/120507 >From 7b549f36fb8a26360e9f69b114ddae80b2bbabc7 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Wed, 18 Dec 2024 16:31:19 -0800 Subject: [PATCH] [Darwin][Driver][clang] apple-none-macho orders the res

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
@@ -0,0 +1,43 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Unlike the Darwin driver, the MachO driver doesn't add any framework search paths, +// only the normal header ones. +// RUN: %clang -x c -t

[clang] 131acb0 - [clang][NFC] Move static assert on StmtClass bounds from header to source

2024-12-20 Thread Ziqing Luo via cfe-commits
Author: Ziqing Luo Date: 2024-12-20T12:42:21-08:00 New Revision: 131acb07d814fabcc969dcaa63f4f352cd529267 URL: https://github.com/llvm/llvm-project/commit/131acb07d814fabcc969dcaa63f4f352cd529267 DIFF: https://github.com/llvm/llvm-project/commit/131acb07d814fabcc969dcaa63f4f352cd529267.diff LO

[clang] [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and clang-dxc (PR #120644)

2024-12-20 Thread Chris White via cfe-commits
whiteio wrote: Thanks @Maetveis, I've addressed the comments. https://github.com/llvm/llvm-project/pull/120644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2024-12-20 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. LGTM! @Endilll did you want to take a look at this as well? https://github.com/llvm/llvm-project/pull/120494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and clang-dxc (PR #120644)

2024-12-20 Thread Chris White via cfe-commits
https://github.com/whiteio updated https://github.com/llvm/llvm-project/pull/120644 >From 770dec5aec1b879bafbc6c69b12a2e43c9497f7f Mon Sep 17 00:00:00 2001 From: Chris White Date: Thu, 19 Dec 2024 22:02:47 + Subject: [PATCH 1/2] [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and cl

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-20 Thread Jannick Kremer via cfe-commits
@@ -2663,6 +2671,21 @@ def visitor(field, children): conf.lib.clang_Type_visitFields(self, fields_visit_callback(visitor), fields) return iter(fields) +def get_bases(self): +"""Return an iterator for accessing the base classes of this type.""" + +

[clang] [clang] fix uefi target for aarch64 & x86_64 (PR #120632)

2024-12-20 Thread Tristan Ross via cfe-commits
@@ -788,16 +789,28 @@ class LLVM_LIBRARY_VISIBILITY ZOSTargetInfo : public OSTargetInfo { // UEFI target template class LLVM_LIBRARY_VISIBILITY UEFITargetInfo : public OSTargetInfo { + llvm::Triple Triple; + protected: void getOSDefines(const LangOptions &Opts, const llv

[clang] [libcxx] [clang][driver] Cleanup UEFI toolchain driver (PR #111473)

2024-12-20 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy approved this pull request. Looks good to me. https://github.com/llvm/llvm-project/pull/111473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   >