[clang] [alpha.webkit.NoUnretainedMemberChecker] Recognize NS_REQUIRES_PROPERTY_DEFINITIONS (PR #141293)

2025-06-05 Thread Ziqing Luo via cfe-commits
@@ -174,7 +175,15 @@ class RawPtrRefMemberChecker if (!PropType) return; -auto IsUnsafePtr = isUnsafePtr(QT); +if (const ObjCInterfaceDecl *ID = dyn_cast(CD)) { + if (!RTC || !RTC->defaultSynthProperties() || + ID->isObjCRequiresPropertyDefs())

[clang] [clang-format] Fix Microsoft calling convensions preventing function names from being marked TT_StartOfName (PR #143047)

2025-06-05 Thread Owen Pan via cfe-commits
owenca wrote: See #143083. https://github.com/llvm/llvm-project/pull/143047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle function decls with MS calling conventions (PR #143083)

2025-06-05 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/143083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle function decls with MS calling conventions (PR #143083)

2025-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/143083.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+9-1) - (modified) clang/unittests/Format/TokenAnnotatorTest.cpp

[clang] [clang-format] Handle function decls with MS calling conventions (PR #143083)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/143083 None >From 6f319be22826718c82b027c605885d6b95ed5689 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 5 Jun 2025 23:48:47 -0700 Subject: [PATCH] [clang-format] Handle function decls with MS calling conventions

[clang-tools-extra] [clang-tidy] Add support for lambda-expression in `use-trailing-return-type` check (PR #135383)

2025-06-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/135383 >From cd0c0aba2d5da7c24fb64dd1a0ed25760ba57c4d Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 5 Jun 2025 21:51:41 +0300 Subject: [PATCH] [clang-tidy] add support for lambdas in use-trailing-return-ty

[clang] [clang-format] Handle requires clause following a pointer type (PR #142893)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/142893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit checkers] Add an annotation for pointer conversion. (PR #141277)

2025-06-05 Thread Ziqing Luo via cfe-commits
@@ -44,6 +43,12 @@ inline Target* uncheckedDowncast(Source* source) return static_cast(source); } +template +Target* [[clang::annotate_type("webkit.pointerconversion")]] newCastFunction(Source*); ziqingluo-90 wrote: If this function is a member function,

[clang] [WebKit checkers] Treat passing of a member variable which is capable of CheckedPtr as safe. (PR #142485)

2025-06-05 Thread Ziqing Luo via cfe-commits
@@ -32,6 +32,22 @@ static void baz() { } // namespace call_args_checked +namespace call_args_member { + +void consume(CheckedObj&); + +struct WrapperObj { + CheckedObj checked; + CheckedObj& checkedRef; + void foo() { +consume(checked); ziqingluo-90 wr

[clang] [clang-format] More consumeToken() cleanup similar to #142104 (PR #143063)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/143063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] More consumeToken() cleanup (PR #143063)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/143063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] More consumeToken() cleanup similar to #142104 (PR #143063)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/143063 >From 9c2e7a25245259af7ecdf5815fb0b6314b23a7d4 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 5 Jun 2025 21:39:49 -0700 Subject: [PATCH] [clang-format] More consumeToken() cleanup similar to #142104 --- cla

[clang] [Clang] Fix name lookup of conversion operators (PR #142945)

2025-06-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/142945 >From cdd6868879abf4b6c991c7f2b3e9cf9673b0570a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 5 Jun 2025 18:52:01 +0800 Subject: [PATCH 1/3] [Clang] Fix name lookup of conversion operators (TODO: Add ex

[clang] [llvm] [RISCV] Add support for -mtune=andes-45-series (PR #142900)

2025-06-05 Thread Jim Lin via cfe-commits
tclin914 wrote: > LLVM Buildbot has detected a new failure on builder `arc-builder` running on > `arc-worker` while building `clang,llvm` at step 6 > "test-build-unified-tree-check-all". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/3/builds/17084 > > Here is

[clang] [clang-format] More consumeToken() cleanup similar to #142104 (PR #143063)

2025-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/143063.diff 1 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+15-20) ``diff diff --git a/clang/lib/Format/TokenAnno

[clang] [llvm] [LoongArch][BF16] Add support for the __bf16 type (PR #142548)

2025-06-05 Thread via cfe-commits
https://github.com/heiher approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/142548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] More consumeToken() cleanup similar to #142104 (PR #143063)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/143063 None >From af43a40d33dd7af17b852cfd60df3c9cd1594935 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 5 Jun 2025 21:39:49 -0700 Subject: [PATCH] [clang-format] More consumeToken() cleanup similar to #142104 --

[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

2025-06-05 Thread Oliver Hunt via cfe-commits
@@ -605,6 +605,11 @@ KEYWORD(__private_extern__ , KEYALL) KEYWORD(__module_private__ , KEYALL) UNARY_EXPR_OR_TYPE_TRAIT(__builtin_ptrauth_type_discriminator, PtrAuthTypeDiscriminator, KEYALL) +UNARY_EXPR_OR_TYPE_TRAIT(__builtin_ptrauth_has_authentication, P

[clang] [llvm][RISCV] Handle required features of intrinsic correctly (PR #143062)

2025-06-05 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/143062 Current approach generates intrinsic records when users specify corresponding required features by using command line option. However it's not able to handle features passed by using target attributes correctly w

[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

2025-06-05 Thread Oliver Hunt via cfe-commits
@@ -9619,6 +9620,65 @@ ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl() const { return ObjCProtocolClassDecl; } +std::optional +ASTContext::getExplicitOrImplicitPointerAuth(QualType T) { + auto ExplicitQualifier = T.getPointerAuth(); ojhunt wrote: god

[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

2025-06-05 Thread Oliver Hunt via cfe-commits
@@ -9619,6 +9620,65 @@ ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl() const { return ObjCProtocolClassDecl; } +std::optional +ASTContext::getExplicitOrImplicitPointerAuth(QualType T) { + auto ExplicitQualifier = T.getPointerAuth(); ojhunt wrote: - [

[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

2025-06-05 Thread Oliver Hunt via cfe-commits
@@ -3981,7 +3981,9 @@ class Parser : public CodeCompletionHandler { ExprResult ParseArrayTypeTrait(); ExprResult ParseExpressionTrait(); + ExprResult ParseBuiltinUnaryExprOrTypeTrait(UnaryExprOrTypeTrait ExprKind); ojhunt wrote: ... if something like `Pa

[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

2025-06-05 Thread Oliver Hunt via cfe-commits
@@ -9619,6 +9620,65 @@ ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl() const { return ObjCProtocolClassDecl; } +std::optional +ASTContext::getExplicitOrImplicitPointerAuth(QualType T) { + auto ExplicitQualifier = T.getPointerAuth(); + if (ExplicitQualifier.isPresent(

[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

2025-06-05 Thread Oliver Hunt via cfe-commits
@@ -3981,7 +3981,9 @@ class Parser : public CodeCompletionHandler { ExprResult ParseArrayTypeTrait(); ExprResult ParseExpressionTrait(); + ExprResult ParseBuiltinUnaryExprOrTypeTrait(UnaryExprOrTypeTrait ExprKind); ojhunt wrote: @cor3ntin @AaronBallman

[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

2025-06-05 Thread Oliver Hunt via cfe-commits
@@ -9619,6 +9620,65 @@ ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl() const { return ObjCProtocolClassDecl; } +std::optional +ASTContext::getExplicitOrImplicitPointerAuth(QualType T) { + auto ExplicitQualifier = T.getPointerAuth(); + if (ExplicitQualifier.isPresent(

[clang] [PAuth] Use different discriminators for __int128_t / __uint128_t / _BitInt(n) (PR #140276)

2025-06-05 Thread Oliver Hunt via cfe-commits
@@ -1883,6 +1883,9 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args, Args.addOptInFlag( CmdArgs, options::OPT_fptrauth_function_pointer_type_discrimination, options::OPT_fno_ptrauth_function_pointer_type_discrimination); + Args.addOptInFlag( --

[clang] [llvm] [RISCV] Add support for -mtune=andes-45-series (PR #142900)

2025-06-05 Thread Jim Lin via cfe-commits
https://github.com/tclin914 closed https://github.com/llvm/llvm-project/pull/142900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2a8c7d3 - [RISCV] Add support for -mtune=andes-45-series (#142900)

2025-06-05 Thread via cfe-commits
Author: Jim Lin Date: 2025-06-06T11:34:19+08:00 New Revision: 2a8c7d3c693b2e54bee89ee98b3e844cbb97ff6a URL: https://github.com/llvm/llvm-project/commit/2a8c7d3c693b2e54bee89ee98b3e844cbb97ff6a DIFF: https://github.com/llvm/llvm-project/commit/2a8c7d3c693b2e54bee89ee98b3e844cbb97ff6a.diff LOG:

[clang] [clang] Diagnose [[nodiscard]] return types in Objective-C++ (PR #142541)

2025-06-05 Thread via cfe-commits
https://github.com/halbi2 updated https://github.com/llvm/llvm-project/pull/142541 >From c683b2aa84cba1b7057592e50c542cd5645adde5 Mon Sep 17 00:00:00 2001 From: halbi2 Date: Mon, 26 May 2025 15:35:13 -0400 Subject: [PATCH 1/3] [clang] [test] More coverage of [[nodiscard]] --- clang/test/SemaC

[clang] [llvm] [LoongArch][BF16] Add support for the __bf16 type (PR #142548)

2025-06-05 Thread via cfe-commits
@@ -0,0 +1,19 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// RUN: %clang_cc1 -triple loongarch64 -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK-LA64 +// RUN: %clang_cc1 -triple loongarch32 -emit-llvm -o - %s

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/142273 >From f75d81cacf455477fe9bc6cb498fb2f76bebcfe2 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 31 May 2025 10:05:52 -0400 Subject: [PATCH 01/12] [clang-doc] Refactor CommentInfo.Kind to use CommentK

[clang] [llvm] [llvm][RISCV] Make zvknhb imply zvknha (PR #142896)

2025-06-05 Thread Brandon Wu via cfe-commits
4vtomat wrote: > @4vtomat you did the opposite of this in > [65dc96c](https://github.com/llvm/llvm-project/commit/65dc96c2cfa480b070c7913ac5e313c98ca96520). > What changed now? > > It was explicitly stated by one of the crypto authors here that Zvknhb does > not imply Zvknha [riscv/riscv-cryp

[clang] [llvm] [llvm][RISCV] Make zvknhb imply zvknha (PR #142896)

2025-06-05 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat closed https://github.com/llvm/llvm-project/pull/142896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LoongArch][BF16] Add support for the __bf16 type (PR #142548)

2025-06-05 Thread via cfe-commits
https://github.com/Ami-zhang updated https://github.com/llvm/llvm-project/pull/142548 >From fef9547a6f55debadbba0b893c017a21ed5d1886 Mon Sep 17 00:00:00 2001 From: Ami-zhang Date: Mon, 28 Apr 2025 14:48:58 +0800 Subject: [PATCH] [LoongArch][BF16] Add support for the __bf16 type The LoongArch p

[clang] [llvm] [LoongArch][BF16] Add support for the __bf16 type (PR #142548)

2025-06-05 Thread via cfe-commits
@@ -0,0 +1,611 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// RUN: %clang_cc1 -triple loongarch64 -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK-LA64 +// RUN: %clang_cc1 -triple loongarch32 -emit-llvm %s -o -

[clang] 05c12b2 - [clang-format] Handle requires clause following a pointer type (#142893)

2025-06-05 Thread via cfe-commits
Author: Owen Pan Date: 2025-06-05T19:55:37-07:00 New Revision: 05c12b228434fea560e6edb25289095b5aa5e10a URL: https://github.com/llvm/llvm-project/commit/05c12b228434fea560e6edb25289095b5aa5e10a DIFF: https://github.com/llvm/llvm-project/commit/05c12b228434fea560e6edb25289095b5aa5e10a.diff LOG:

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Samarth Narang via cfe-commits
snarang181 wrote: > Oh, lets updated the PR description with a more complete description of the > change. It can also be marked as `Fixes #NNN` since this basically implements > everything outlined in the issues, unless I'm forgetting something. Done. https://github.com/llvm/llvm-project/pull

[clang] [clang] Diagnose [[nodiscard]] return types in Objective-C++ (PR #142541)

2025-06-05 Thread via cfe-commits
@@ -272,6 +273,26 @@ QualType ObjCMessageExpr::getCallReturnType(ASTContext &Ctx) const { return Ctx.getReferenceQualifiedType(this); } +std::pair halbi2 wrote: It is this way in CallExpr::getUnusedResultAttr too. I would change it in both places? Maybe i

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 edited https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Diagnose [[nodiscard]] return types in Objective-C++ (PR #142541)

2025-06-05 Thread via cfe-commits
@@ -272,6 +273,26 @@ QualType ObjCMessageExpr::getCallReturnType(ASTContext &Ctx) const { return Ctx.getReferenceQualifiedType(this); } +std::pair +ObjCMessageExpr::getUnusedResultAttr(ASTContext &Ctx) const { + // If the callee is marked nodiscard, return that attribute +

[clang] [flang] [llvm] Fix and reapply IR PGO support for Flang (PR #142892)

2025-06-05 Thread via cfe-commits
fanju110 wrote: > Thanks for the fix and the explanation. I will try this PR out, but it might > take me a day or two. Do you have merge access? If not, I will merge it if > everything passes for me. I don’t have merge access. I’ve run `check-clang`, `check-flang`, and `check-llvm` locally,

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
ilovepi wrote: Oh, lets updated the PR description with a more complete description of the change. It can also be marked as `Fixes #NNN` since this basically implements everything outlined in the issues, unless I'm forgetting something. https://github.com/llvm/llvm-project/pull/142273

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
@@ -208,37 +208,107 @@ static json::Value extractValue(const TypedefInfo &I) { } static json::Value extractValue(const CommentInfo &I) { - assert((I.Kind == "BlockCommandComment" || I.Kind == "FullComment" || - I.Kind == "ParagraphComment" || I.Kind == "TextComment")

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: Getting pretty close. I think once the remaining comments are addressed it will probably be ready to land. https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

2025-06-05 Thread Jordan Rupprecht via cfe-commits
rupprecht wrote: I bisected a build failure to this commit. I can't figure out if it's expected or not. I minimized it to this: ```c++ #include enum class KindEnum { Unknown = 0, Foo = 1, }; template concept KnownKind = T::kind() != KindEnum::Unknown; template struct KnownType; s

[clang] [llvm] Global string alignment (PR #142346)

2025-06-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The clang patch was written the way it was because it was necessary to comply with the ABI rules. Strings passed to printf don't have any sort of alignment requirement, so you can't really appeal to the ABI rules here, I think? The problem with copying the alignment is th

[clang-tools-extra] [clangd] [Modules] Fix to correctly handle module dependencies (PR #142828)

2025-06-05 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/142828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 93b0bf6 - [clangd] [Modules] Fix to correctly handle module dependencies (#142828)

2025-06-05 Thread via cfe-commits
Author: fleeting-xx Date: 2025-06-06T09:33:11+08:00 New Revision: 93b0bf635a287aac55f6da39f38c1cf257efa824 URL: https://github.com/llvm/llvm-project/commit/93b0bf635a287aac55f6da39f38c1cf257efa824 DIFF: https://github.com/llvm/llvm-project/commit/93b0bf635a287aac55f6da39f38c1cf257efa824.diff L

[clang-tools-extra] [clangd] [Modules] Fix to correctly handle module dependencies (PR #142828)

2025-06-05 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM then. Thanks. BTW, clangd prefer unittests than lit test. So you'd better to use unittests next time. https://github.com/llvm/llvm-project/pull/142828 ___ cfe-commits mailing list cfe-com

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-05 Thread Ziqing Luo via cfe-commits
@@ -1261,6 +1261,28 @@ class CFGBuilder { L2Result.Val.getKind() == APValue::Float) { llvm::APFloat L1 = L1Result.Val.getFloat(); llvm::APFloat L2 = L2Result.Val.getFloat(); + // Note that L1 and L2 do not necessarily have the same type. For example +

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-05 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: Thanks for merging it for me. Buildbots failures seems irrelevant: ``` TEST 'lldb-api :: tools/lldb-dap/launch/TestDAP_launch.py' FAILED or FAILED: libc/src/math/amdgpu/CMakeFiles/libc.src.math.amdgpu.acosh.dir/acosh.cpp.o ``` https://github.com/llvm/llvm-project/pull/14272

[clang] [clang][dep-scan] Resolve lexer crash from a permutation of invalid tokens (PR #142452)

2025-06-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/142452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dep-scan] Resolve lexer crash from a permutation of invalid tokens (PR #142452)

2025-06-05 Thread Cyndy Ishida via cfe-commits
@@ -503,6 +503,10 @@ bool Scanner::lexModuleDirectiveBody(DirectiveKind Kind, const char *&First, diag::err_dep_source_scanner_missing_semi_after_at_import); if (Tok.is(tok::semi)) break; +if (Tok.is(tok::hash) || Tok.is(tok::at)) + return reportEr

[clang] [clang][dep-scan] Resolve lexer crash from a permutation of invalid tokens (PR #142452)

2025-06-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/142452 >From 6b403ac7fab68feef8f1a72d8e4ab67ee2ef3c57 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 5 Jun 2025 17:51:53 -0700 Subject: [PATCH] [clang][dep-scan] Resolve lexer crash from a permutation of i

[clang] [clang] Check constexpr int->enum conversions consistently. (PR #143034)

2025-06-05 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/143034 >From 818f2cfd1558a4ee22bd1c3b8ce339eb82a06536 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 4 Jun 2025 19:40:37 -0700 Subject: [PATCH 1/2] [clang] Check constexpr int->enum conversions consisten

[clang-tools-extra] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-05 Thread via cfe-commits
EugeneZelenko wrote: Please run Clang-Format over code. https://github.com/llvm/llvm-project/pull/142324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-05 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 HEAD~1 HEAD --extensions cpp,c,h -- clang-tools-extra/clang-tidy/performance/BoolBitw

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-06-05 Thread Bill Wendling via cfe-commits
bwendling wrote: @erichkeane If the Arm attribute code were merged into `ExtraAttributeInfo`, it would save us a bit in `FunctionTypeExtraBitfields`. I can add more testing I suppose, but the tests I have here are a copy of the current CFI tests, which test all of the ways CFI is used. So I'm

[libclc] de3a9ea - [NFC][libclc] Simplify clc_dot and dot implementation (#142922)

2025-06-05 Thread via cfe-commits
Author: Wenju He Date: 2025-06-06T08:09:53+08:00 New Revision: de3a9ea510fecd501b4dd57534cf300d1c9622c9 URL: https://github.com/llvm/llvm-project/commit/de3a9ea510fecd501b4dd57534cf300d1c9622c9 DIFF: https://github.com/llvm/llvm-project/commit/de3a9ea510fecd501b4dd57534cf300d1c9622c9.diff LOG:

[libclc] [NFC][libclc] Simplify clc_dot and dot implementation (PR #142922)

2025-06-05 Thread Wenju He via cfe-commits
https://github.com/wenju-he closed https://github.com/llvm/llvm-project/pull/142922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add decl case for template specialization (PR #143029)

2025-06-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/143029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6c1ca07 - [CIR] Add decl case for template specialization (#143029)

2025-06-05 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-06-05T16:50:36-07:00 New Revision: 6c1ca07586196c5a693f720d35a9a4be6e76d7d2 URL: https://github.com/llvm/llvm-project/commit/6c1ca07586196c5a693f720d35a9a4be6e76d7d2 DIFF: https://github.com/llvm/llvm-project/commit/6c1ca07586196c5a693f720d35a9a4be6e76d7d2.diff L

[clang] [CIR ] Add DLTI dialect support to module attributes (PR #142241)

2025-06-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64-aix` running on `aix-ppc64` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/4061 Here is the relevant piece

[clang] [clang-format] Fix Microsoft calling convensions preventing function names from being marked TT_StartOfName (PR #143047)

2025-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Ben Dunkin (bdunkin) Changes This fixes the `SpaceBeforeParensOptions.AfterFunctionDeclarationName` and `SpaceBeforeParensOptions.AfterFunctionDefinitionName` options not adding spaces when the function has an explicit Microsoft ca

[clang] [clang-format] Fix Microsoft calling convensions preventing function names from being marked TT_StartOfName (PR #143047)

2025-06-05 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang-format] Fix Microsoft calling convensions preventing function names from being marked TT_StartOfName (PR #143047)

2025-06-05 Thread Ben Dunkin via cfe-commits
https://github.com/bdunkin created https://github.com/llvm/llvm-project/pull/143047 This fixes the `SpaceBeforeParensOptions.AfterFunctionDeclarationName` and `SpaceBeforeParensOptions.AfterFunctionDefinitionName` options not adding spaces when the function has an explicit Microsoft calling co

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-05 Thread Paul Kirth via cfe-commits
ilovepi wrote: > > This sounds promising. I'm fine w/ adding a field to track this. BTW, what > > does clang do? I'm wondering if we should track more than 1-bit of info > > here. > > As far as I can tell, inside the AST Clang makes use of the `isa<>` > mechanisms (which we could also leverag

[clang] [CIR] Add empty handlers for Using and UsingShadow decls (PR #143032)

2025-06-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/143032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e2ae39d - [CIR] Add empty handlers for Using and UsingShadow decls (#143032)

2025-06-05 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-06-05T16:05:01-07:00 New Revision: e2ae39d0dfb072642c9943eb1ed7fe2a100d9ad0 URL: https://github.com/llvm/llvm-project/commit/e2ae39d0dfb072642c9943eb1ed7fe2a100d9ad0 DIFF: https://github.com/llvm/llvm-project/commit/e2ae39d0dfb072642c9943eb1ed7fe2a100d9ad0.diff L

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-05 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/142236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-05 Thread Matthias Braun via cfe-commits
@@ -1831,6 +1831,22 @@ TEST_P(AArch64ExtensionDependenciesBaseCPUTestFixture, } } +TEST(TargetParserTest, testAArch64ReconstructFromParsedFeatures) { + AArch64::ExtensionSet Extensions; + std::vector FeatureOptions = { + "-sve2", "-Baz", "+sve", "+FooBar", "+sve2", "+

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-05 Thread Matthias Braun via cfe-commits
@@ -60,7 +60,7 @@ uint64_t AArch64::getFMVPriority(ArrayRef Features) { ExtensionSet FeatureBits; for (const StringRef Feature : Features) { std::optional FMV = parseFMVExtension(Feature); -if (!FMV) { +if (!FMV && Feature.starts_with('+')) { M

[clang] [llvm] [NFC][HLSL][DXIL] Move D3D12.h enums and flags to DXILABI (PR #143041)

2025-06-05 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/143041 >From e9d782af7335af47b83db3bffcc6b91a6465ee6f Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Thu, 5 Jun 2025 18:40:36 + Subject: [PATCH 1/4] move defs to DXILABI --- .../llvm/Frontend/HLSL/HLSLRootSign

[clang] [llvm] [NFC][HLSL][DXIL] Move D3D12.h enums and flags to DXILABI (PR #143041)

2025-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx Author: Finn Plummer (inbelic) Changes The `DXILABI.h` is intended to contain definitions of constants and enums that are required to remain stable for the sake of interpreting or constructing DXIL binaries. The enums and flags corresp

[clang] [llvm] [NFC][HLSL][DXIL] Move D3D12.h enums and flags to DXILABI (PR #143041)

2025-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Finn Plummer (inbelic) Changes The `DXILABI.h` is intended to contain definitions of constants and enums that are required to remain stable for the sake of interpreting or constructing DXIL binaries. The enums and flags corresponding to

[clang] [llvm] [NFC][HLSL][DXIL] Move D3D12.h enums and flags to DXILABI (PR #143041)

2025-06-05 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/143041 The `DXILABI.h` is intended to contain definitions of constants and enums that are required to remain stable for the sake of interpreting or constructing DXIL binaries. The enums and flags corresponding to tho

[clang] [Clang] add fix-it hints for unknown attributes (PR #141305)

2025-06-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/141305 >From 77641f88c5047c990df649658b6bd5fba0d395cd Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Sat, 31 May 2025 15:59:59 +0300 Subject: [PATCH 1/2] [Clang] add fix-it hints for unknown attributes ---

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-05 Thread Tarun Prabhu via cfe-commits
@@ -3167,3 +3167,29 @@ void tools::handleInterchangeLoopsArgs(const ArgList &Args, options::OPT_fno_loop_interchange, EnableInterchange)) CmdArgs.push_back("-floop-interchange"); } + +std::optional tools::ParseMPreferVectorWidthOption( +clang::Diagno

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-05 Thread Tarun Prabhu via cfe-commits
@@ -3167,3 +3167,29 @@ void tools::handleInterchangeLoopsArgs(const ArgList &Args, options::OPT_fno_loop_interchange, EnableInterchange)) CmdArgs.push_back("-floop-interchange"); } + +std::optional tools::ParseMPreferVectorWidthOption( +clang::Diagno

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-05 Thread Tarun Prabhu via cfe-commits
@@ -270,6 +270,11 @@ void handleVectorizeLoopsArgs(const llvm::opt::ArgList &Args, /// Enable -fslp-vectorize based on the optimization level selected. void handleVectorizeSLPArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs); +

[clang] [clang] Remove separate evaluation step for static class member init. (PR #142713)

2025-06-05 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/142713 >From 9bc16d5c3b3c540ca3058e181b509f4122a2073b Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 3 Jun 2025 18:53:14 -0700 Subject: [PATCH 1/3] [clang] Remove separate evaluation step for static class

[clang] [OpenACC][CIR] Implement member exprs for 'copy' lowering (PR #142998)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -754,12 +754,351 @@ void acc_compute(int parmVar) { // CHECK-NEXT: %[[ZERO_CONST:.*]] = arith.constant 0 : i64 // CHECK-NEXT: %[[ONE_CONST2:.*]] = arith.constant 1 : i64 // CHECK-NEXT: %[[BOUNDS3:.*]] = acc.bounds lowerbound(%[[ONE_CAST]] : si32) extent(%[[ONE_CAST2]]

[clang] [llvm] Reland "[HLSL][RootSignature] Implement serialization of RootConstants and RootFlags" (PR #143019)

2025-06-05 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/143019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-05 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/142483 >From fa8b80f9bfe2b7faf765ed4cf60fb8cec30e1d48 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Mon, 2 Jun 2025 12:53:36 -0700 Subject: [PATCH 1/3] [clang-doc] add a JSON generator --- clang-tools-extra/clang-

[clang] [OpenACC][CIR] Implement member exprs for 'copy' lowering (PR #142998)

2025-06-05 Thread Erich Keane via cfe-commits
erichkeane wrote: > Nice job with the testing! I had a moment of panic seeing the size of this > change, only to find that it's mostly test cases. I have a couple of > questions, but it looks good. Honestly you're not wrong :) I wrote all of these tests in advance expecting this to be 6-7 di

[clang] [llvm] Reland "[HLSL][RootSignature] Implement serialization of RootConstants and RootFlags" (PR #143019)

2025-06-05 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/143019 >From 2f7da28354a3c892ea11d1e2136a2a965996631a Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Thu, 29 May 2025 10:31:08 -0700 Subject: [PATCH 1/3] [HLSL][RootSignature] Implement serialization of `RootConsta

[clang] [OpenACC][CIR] Implement member exprs for 'copy' lowering (PR #142998)

2025-06-05 Thread Erich Keane via cfe-commits
@@ -754,12 +754,320 @@ void acc_compute(int parmVar) { // CHECK-NEXT: %[[ZERO_CONST:.*]] = arith.constant 0 : i64 // CHECK-NEXT: %[[ONE_CONST2:.*]] = arith.constant 1 : i64 // CHECK-NEXT: %[[BOUNDS3:.*]] = acc.bounds lowerbound(%[[ONE_CAST]] : si32) extent(%[[ONE_CAST2]]

[clang] [CIR] Implement folder for VecTernaryOp (PR #142946)

2025-06-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/142946 >From ac8277b48d0affa78f5e5e943e0179c27dd033ec Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 5 Jun 2025 13:08:57 +0200 Subject: [PATCH 1/3] [CIR] Implement folder for VecTernaryOp --- clang/inclu

[clang] [clang] Fixed Constant Evaluation don't Call Destructor (PR #140278)

2025-06-05 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/140278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 49386f4 - [Clang] Run destructors of variables declared in the second part of a `for` loop during constant evaluation (#140278)

2025-06-05 Thread via cfe-commits
Author: Vincent Date: 2025-06-05T23:50:20+02:00 New Revision: 49386f40dd66ababe9bfde64c14cf3bfba5774c1 URL: https://github.com/llvm/llvm-project/commit/49386f40dd66ababe9bfde64c14cf3bfba5774c1 DIFF: https://github.com/llvm/llvm-project/commit/49386f40dd66ababe9bfde64c14cf3bfba5774c1.diff LOG:

[clang] [CIR] Implement folder for VecTernaryOp (PR #142946)

2025-06-05 Thread Amr Hesham via cfe-commits
@@ -138,10 +138,10 @@ void CIRCanonicalizePass::runOnOperation() { assert(!cir::MissingFeatures::complexRealOp()); assert(!cir::MissingFeatures::complexImagOp()); assert(!cir::MissingFeatures::callOp()); -// CastOp, UnaryOp, VecExtractOp and VecShuffleDynamicOp

[clang] [OpenACC][CIR] Implement member exprs for 'copy' lowering (PR #142998)

2025-06-05 Thread Erich Keane via cfe-commits
@@ -754,12 +754,320 @@ void acc_compute(int parmVar) { // CHECK-NEXT: %[[ZERO_CONST:.*]] = arith.constant 0 : i64 // CHECK-NEXT: %[[ONE_CONST2:.*]] = arith.constant 1 : i64 // CHECK-NEXT: %[[BOUNDS3:.*]] = acc.bounds lowerbound(%[[ONE_CAST]] : si32) extent(%[[ONE_CAST2]]

[clang] [OpenACC][CIR] Implement member exprs for 'copy' lowering (PR #142998)

2025-06-05 Thread Erich Keane via cfe-commits
@@ -226,6 +228,10 @@ class OpenACCClauseCIREmitter final mlir::Location exprLoc = cgf.cgm.getLoc(curVarExpr->getBeginLoc()); llvm::SmallVector bounds; +std::string exprString; +llvm::raw_string_ostream os(exprString); +e->printPretty(os, nullptr, cgf.getCon

[clang] [CIR] Implement folder for VecTernaryOp (PR #142946)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -138,10 +138,10 @@ void CIRCanonicalizePass::runOnOperation() { assert(!cir::MissingFeatures::complexRealOp()); assert(!cir::MissingFeatures::complexImagOp()); assert(!cir::MissingFeatures::callOp()); -// CastOp, UnaryOp, VecExtractOp and VecShuffleDynamicOp

[clang] [OpenACC][CIR] Implement member exprs for 'copy' lowering (PR #142998)

2025-06-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/142998 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC][CIR] Implement member exprs for 'copy' lowering (PR #142998)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -754,12 +754,320 @@ void acc_compute(int parmVar) { // CHECK-NEXT: %[[ZERO_CONST:.*]] = arith.constant 0 : i64 // CHECK-NEXT: %[[ONE_CONST2:.*]] = arith.constant 1 : i64 // CHECK-NEXT: %[[BOUNDS3:.*]] = acc.bounds lowerbound(%[[ONE_CAST]] : si32) extent(%[[ONE_CAST2]]

[clang] [OpenACC][CIR] Implement member exprs for 'copy' lowering (PR #142998)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -226,6 +228,10 @@ class OpenACCClauseCIREmitter final mlir::Location exprLoc = cgf.cgm.getLoc(curVarExpr->getBeginLoc()); llvm::SmallVector bounds; +std::string exprString; +llvm::raw_string_ostream os(exprString); +e->printPretty(os, nullptr, cgf.getCon

[clang] [OpenACC][CIR] Implement member exprs for 'copy' lowering (PR #142998)

2025-06-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. Nice job with the testing! I had a moment of panic seeing the size of this change, only to find that it's mostly test cases. I have a couple of questions, but it looks good. https://github.com/llvm/llvm-project/pull/142998 _

[clang] [OpenACC][CIR] Implement member exprs for 'copy' lowering (PR #142998)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -754,12 +754,320 @@ void acc_compute(int parmVar) { // CHECK-NEXT: %[[ZERO_CONST:.*]] = arith.constant 0 : i64 // CHECK-NEXT: %[[ONE_CONST2:.*]] = arith.constant 1 : i64 // CHECK-NEXT: %[[BOUNDS3:.*]] = acc.bounds lowerbound(%[[ONE_CAST]] : si32) extent(%[[ONE_CAST2]]

  1   2   3   4   5   6   >