[clang] 383bd69 - [clang][bytecode][test] Enable a few tests in const-eval.c (#160034)

2025-09-21 Thread via cfe-commits
Author: Timm Baeder Date: 2025-09-22T08:47:28+02:00 New Revision: 383bd691285114563ebf396e765ba4dee8037379 URL: https://github.com/llvm/llvm-project/commit/383bd691285114563ebf396e765ba4dee8037379 DIFF: https://github.com/llvm/llvm-project/commit/383bd691285114563ebf396e765ba4dee8037379.diff L

[clang] [clang][bytecode][test] Enable a few tests in const-eval.c (PR #160034)

2025-09-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/160034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Fix ctest failures after 7f3661128b1e: adjust external check and make shuffle helpers static (PR #160036)

2025-09-21 Thread Wenju He via cfe-commits
https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/160036 >From 47eb95442b6a72f06e3d611ebf7d8fa0006c2063 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Mon, 22 Sep 2025 07:22:18 +0200 Subject: [PATCH 1/2] [libclc] Fix ctest failures after 7f3661128b1e: adjust external

[clang] [clang][test] Add test for comma operator rejection in preprocessor conditionals (PR #155570)

2025-09-21 Thread via cfe-commits
Sirraide wrote: > Should I move this to clang/test/CXX/drs/cwg1436.cpp and format it according > to the DR test conventions? Something like that yeah; I think there might already be a file that contains some of the 14XX tests somewhere but I’m not sure; I’ve tagged Vlad about this who should

[libclc] [libclc] Remove __attribute__((always_inline)) (PR #158791)

2025-09-21 Thread Wenju He via cfe-commits
wenju-he wrote: @mgorny thank you for the testing. Sorry I didn't run the tests for this PR. The test failures will be fixed by https://github.com/llvm/llvm-project/pull/160036 https://github.com/llvm/llvm-project/pull/158791 ___ cfe-commits mailing

[libclc] [libclc] Fix ctest failures after 7f3661128b1e: adjust external check and make shuffle helpers static (PR #160036)

2025-09-21 Thread Wenju He via cfe-commits
https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/160036 * Replace call-site check with external declaration scan (grep declare) to avoid false positives for not-inlined __clc_* functions. * _clc_get_el* helpers are defined as inline in clc_shuffle2.cl, so they have

[clang] [clang][test] Add test for comma operator rejection in preprocessor conditionals (PR #155570)

2025-09-21 Thread NohHyeon Kwon via cfe-commits
swote-git wrote: @Sirraide Thanks for your review! Should I move this to clang/test/CXX/drs/cwg1436.cpp and format it according to the DR test conventions? https://github.com/llvm/llvm-project/pull/155570 ___ cfe-commits mailing list cfe-commits@lis

[clang] [llvm] [Clang] Rewrite tests using subshells to set env variables (PR #158446)

2025-09-21 Thread Mikael Holmen via cfe-commits
@@ -1,13 +1,14 @@ // Some assertions in this test use Linux style (/) file paths. // UNSUPPORTED: system-windows +// RUN: bash -c env | grep LD_LIBRARY_PATH | tr -d '\n' > /tmp/ld_library_path mikaelholmen wrote: Thanks! https://github.com/llvm/llvm-project/pu

[clang] [clang][test] Add test for comma operator rejection in preprocessor conditionals (PR #155570)

2025-09-21 Thread via cfe-commits
https://github.com/Sirraide commented: LGTM, though I wonder if it should be part of the DR tests instead. CC @Endilll https://github.com/llvm/llvm-project/pull/155570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang][bytecode][test] Enable a few tests in const-eval.c (PR #160034)

2025-09-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes They didn't use to work but do now. --- Full diff: https://github.com/llvm/llvm-project/pull/160034.diff 1 Files Affected: - (modified) clang/test/AST/ByteCode/const-eval.c (+1-11) ``diff diff -

[clang] [clang][bytecode][test] Enable a few tests in const-eval.c (PR #160034)

2025-09-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/160034 They didn't use to work but do now. >From e2a9bc7543be873f65af9ed40a244a4d429301b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 22 Sep 2025 08:21:19 +0200 Subject: [PATCH] [clang][by

[clang] [clang-format] Add SpaceBeforeUnderscoreParens option for GNU gettext… (PR #159925)

2025-09-21 Thread via cfe-commits
@@ -17852,6 +17852,59 @@ TEST_F(FormatTest, ConfigurableSpacesInParens) { Spaces); } +TEST_F(FormatTest, SpaceBeforeUnderscoreParens) { + // Test with SpaceBeforeParens = Always to clearly show the difference kgerlich wrote: all dropped. http

[clang] [llvm] [Driver][Hurd] Add AArch64 and RISCV64 support (PR #157212)

2025-09-21 Thread Brad Smith via cfe-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/157212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add SpaceBeforeUnderscoreParens option for GNU gettext… (PR #159925)

2025-09-21 Thread via cfe-commits
@@ -4901,6 +4901,12 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, // Handle builtins like identifiers. if (Line.Type != LT_PreprocessorDirective && (Left.Tok.getIdentifierInfo() || Left.is(tok::r_paren))) { + // Check for special

[clang] [clang-format] Add SpaceBeforeUnderscoreParens option for GNU gettext… (PR #159925)

2025-09-21 Thread via cfe-commits
@@ -4901,6 +4901,12 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, // Handle builtins like identifiers. if (Line.Type != LT_PreprocessorDirective && (Left.Tok.getIdentifierInfo() || Left.is(tok::r_paren))) { + // Check for special

[clang] [clang-format] Add SpaceBeforeUnderscoreParens option for GNU gettext… (PR #159925)

2025-09-21 Thread via cfe-commits
@@ -4667,6 +4667,16 @@ struct FormatStyle { /// \version 7 bool SpaceBeforeInheritanceColon; + /// If ``false``, spaces will be removed between underscore and an opening + /// parenthesis. This is specifically for the gettext macro ``_()`` commonly + /// used in GNU pro

[clang] [clang-format] Add SpaceBeforeUnderscoreParens option for GNU gettext… (PR #159925)

2025-09-21 Thread via cfe-commits
https://github.com/kgerlich updated https://github.com/llvm/llvm-project/pull/159925 >From 2d82763fe54b1ce589340cdd0ad4d8bcf31b83db Mon Sep 17 00:00:00 2001 From: Klaus Gerlicher Date: Sat, 20 Sep 2025 15:13:10 +0200 Subject: [PATCH] [clang-format] Add SpaceBetweenUnderscoreParens option for G

[clang] [X86] Add MMX/SSE/AVX PHADD/SUB & HADDPS/D intrinsics to be used in constexpr (PR #156822)

2025-09-21 Thread via cfe-commits
@@ -3453,6 +3592,30 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call, case Builtin::BI__builtin_elementwise_min: return interp__builtin_elementwise_maxmin(S, OpPC, Call, BuiltinID); + case clang::X86::BI__builtin_ia32_phaddw128: + case clang

[clang] 4efbbe1 - [Clang] Make env.c test use proper file substitutions

2025-09-21 Thread Aiden Grossman via cfe-commits
Author: Aiden Grossman Date: 2025-09-22T05:22:02Z New Revision: 4efbbe1d35fe2666225b2989ea80d3af4d827f84 URL: https://github.com/llvm/llvm-project/commit/4efbbe1d35fe2666225b2989ea80d3af4d827f84 DIFF: https://github.com/llvm/llvm-project/commit/4efbbe1d35fe2666225b2989ea80d3af4d827f84.diff LOG

[clang] [llvm] [Clang] Rewrite tests using subshells to set env variables (PR #158446)

2025-09-21 Thread Mikael Holmen via cfe-commits
@@ -1,13 +1,14 @@ // Some assertions in this test use Linux style (/) file paths. // UNSUPPORTED: system-windows +// RUN: bash -c env | grep LD_LIBRARY_PATH | tr -d '\n' > /tmp/ld_library_path mikaelholmen wrote: What if several users run this lit test at the s

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 Thread Tomáš Slanina via cfe-commits
itzexpoexpo wrote: > It's hard for me to review your patch if you keep doing that. Right, sorry, I didn't know it affects how you see the commits - I'll avoid merging from now on. Should I not rebase either, even for conflicts? https://github.com/llvm/llvm-project/pull/154580 _

[clang-tools-extra] [clangd] Fix off-by-one error in CommandMangler (PR #160029)

2025-09-21 Thread Nathan Ridge via cfe-commits
@@ -526,6 +526,16 @@ TEST(CommandMangler, RespectsOriginalSysroot) { Not(HasSubstr(testPath("fake/sysroot"; } } + +TEST(CommandMangler, StdLatestFlag) { HighCommander4 wrote: As mentioned in the original PR, I'm not sure if this is the be

[clang-tools-extra] [clangd] Fix off-by-one error in CommandMangler (PR #156593)

2025-09-21 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Resubmitted as https://github.com/llvm/llvm-project/pull/160029. Will close this one. https://github.com/llvm/llvm-project/pull/156593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang-tools-extra] [clangd] Fix off-by-one error in CommandMangler (PR #156593)

2025-09-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/156593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Fix off-by-one error in CommandMangler (PR #160029)

2025-09-21 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (Originally submitted as https://github.com/llvm/llvm-project/pull/156593. I'm resubmitting it now on a user branch so I can stack the other part of the fix for https://github.com/clangd/clangd/issues/1850 on top of it.) https://github.com/llvm/llvm-project/pull/160029 __

[clang-tools-extra] [clangd] Fix off-by-one error in CommandMangler (PR #160029)

2025-09-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nathan Ridge (HighCommander4) Changes SawInput() is intended to be called for every argument after a `--`, but it was mistakenly being called for the `--` itself. Partially fixes https://github.com/clangd/clangd/issues/1850 -

[clang-tools-extra] [clangd] Fix off-by-one error in CommandMangler (PR #160029)

2025-09-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/160029 SawInput() is intended to be called for every argument after a `--`, but it was mistakenly being called for the `--` itself. Partially fixes https://github.com/clangd/clangd/issues/1850 >From 9ed89b7037

[clang] [Headers][X86] VectorExprEvaluator::VisitCallExpr - allow SSE/AVX2/AVX512 pack intrinsics to be used in constexpr (PR #156003)

2025-09-21 Thread Timm Baeder via cfe-commits
@@ -7,6 +7,7 @@ //===--===// #include "../ExprConstShared.h" #include "Boolean.h" +#include "ByteCode/FixedPoint.h" tbaederr wrote: This look unneeded. https://github.com/llvm/llvm-project/p

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 Thread via cfe-commits
=?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= S

[clang] cafc064 - [clang] NFC: small formatting and stray whitespace cleanup

2025-09-21 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2025-09-21T20:06:20-03:00 New Revision: cafc064fc7a96b3979a023ddae1da2b499d6c954 URL: https://github.com/llvm/llvm-project/commit/cafc064fc7a96b3979a023ddae1da2b499d6c954 DIFF: https://github.com/llvm/llvm-project/commit/cafc064fc7a96b3979a023ddae1da2b499d6c954.dif

[clang-tools-extra] [clang-tidy] add readability-redundant-parentheses (PR #159911)

2025-09-21 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,31 @@ + +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Headers][X86] VectorExprEvaluator::VisitCallExpr - allow SSE/AVX2/AVX512 pack intrinsics to be used in constexpr (PR #156003)

2025-09-21 Thread via cfe-commits
@@ -3477,6 +3523,30 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call, } return LHS.lshr(RHS.getZExtValue()); }); + case clang::X86::BI__builtin_ia32_packsswb128: + case clang::X86::BI__builtin_ia32_packsswb256: + case c

[clang] [Headers][X86] VectorExprEvaluator::VisitCallExpr - allow SSE/AVX2/AVX512 pack intrinsics to be used in constexpr (PR #156003)

2025-09-21 Thread via cfe-commits
@@ -7,6 +7,7 @@ //===--===// #include "../ExprConstShared.h" #include "Boolean.h" +#include "ByteCode/FixedPoint.h" woruyu wrote: Fixed! https://github.com/llvm/llvm-project/pull/156003

[clang] [Headers][X86] VectorExprEvaluator::VisitCallExpr - allow SSE/AVX2/AVX512 pack intrinsics to be used in constexpr (PR #156003)

2025-09-21 Thread via cfe-commits
https://github.com/woruyu updated https://github.com/llvm/llvm-project/pull/156003 >From 751b39b15014e148ac0ea245b4f5163a3d1fad2a Mon Sep 17 00:00:00 2001 From: woruyu <1214539...@qq.com> Date: Fri, 19 Sep 2025 00:21:36 -0900 Subject: [PATCH 1/3] [Headers][X86] VectorExprEvaluator::VisitCallExpr

[clang] [Headers][X86] VectorExprEvaluator::VisitCallExpr - allow SSE/AVX2/AVX512 pack intrinsics to be used in constexpr (PR #156003)

2025-09-21 Thread via cfe-commits
https://github.com/woruyu updated https://github.com/llvm/llvm-project/pull/156003 >From 751b39b15014e148ac0ea245b4f5163a3d1fad2a Mon Sep 17 00:00:00 2001 From: woruyu <1214539...@qq.com> Date: Fri, 19 Sep 2025 00:21:36 -0900 Subject: [PATCH 1/2] [Headers][X86] VectorExprEvaluator::VisitCallExpr

[clang] [clang-format] Correctly handle backward compatibility of C headers (PR #159908)

2025-09-21 Thread via cfe-commits
@@ -1294,11 +1294,14 @@ TEST(ConfigParseTest, HandleNonCppDotHFile) { Style = {}; Style.Language = FormatStyle::LK_Cpp; - EXPECT_EQ(parseConfiguration("Language: ObjC", &Style, owenca wrote: I've added the explanation in the commit message. Please see h

[clang] [clang-format] Correctly handle backward compatibility of C headers (PR #159908)

2025-09-21 Thread via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/159908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `modernize-use-nullptr` crash on 32-bit Windows (PR #160023)

2025-09-21 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/160023 >From 4071d5e2e717d03810ec8d0f7476253d1bb72ee1 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Sun, 21 Sep 2025 19:15:46 -0700 Subject: [PATCH 1/3] [clang-tidy] Fix `modernize-use-nullptr` crash on 32-

[clang-tools-extra] [clang-tidy] Fix `modernize-use-nullptr` crash on 32-bit Windows (PR #160023)

2025-09-21 Thread via cfe-commits
@@ -257,6 +257,10 @@ Changes in existing checks ` check to suggest using designated initializers for aliased aggregate types. +- Improved :doc:`modernize-use-nullptr + ` check by fixing a crash + on Windows when the check was enabled with a 32-bit clang-tidy binary.

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread via cfe-commits
https://github.com/zeyi2 updated https://github.com/llvm/llvm-project/pull/159813 >From 414975e7cb52c6cbe0bf3a8304c0661489de63ee Mon Sep 17 00:00:00 2001 From: mtx Date: Sat, 20 Sep 2025 00:44:22 +0800 Subject: [PATCH 1/2] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp'

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread via cfe-commits
https://github.com/zeyi2 edited https://github.com/llvm/llvm-project/pull/159813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread via cfe-commits
zeyi2 wrote: > After looking at the rule, I think we should place in "modernize" category: > `modernize-avoud-setjmp-longjmp`. "bugprone" checks in general are expected > to give only warnings for real problems: `setjmp` can be perfectly fine but > it's not how exceptions should be modelled in

[clang-tools-extra] [clang-tidy] add readability-redundant-parentheses (PR #159911)

2025-09-21 Thread Victor Chernyakin via cfe-commits
localspook wrote: > > Clang-format has [an option like > > this](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#removeparentheses) > > already. Unlike clang-format, we have full semantic information, so this > > check has the potential to be more reliable, but I’m concerned about >

[clang] [clang][bytecode] Load value of non-lvalue ArraySubscriptExpr (PR #160024)

2025-09-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes As happens in C. Fixes #158482 --- Full diff: https://github.com/llvm/llvm-project/pull/160024.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+6-1) - (modified) clang/test/AST/B

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-21 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [clang][bytecode] Load value of non-lvalue ArraySubscriptExpr (PR #160024)

2025-09-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/160024 As happens in C. Fixes #158482 >From a00eb5e8b9b1267b8614c6fc8d0dfa419fb6f867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 22 Sep 2025 05:01:46 +0200 Subject: [PATCH] [clang][byteco

[clang-tools-extra] [clang-tidy] Fix `modernize-use-nullptr` crash on 32-bit Windows (PR #160023)

2025-09-21 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/160023 >From 4071d5e2e717d03810ec8d0f7476253d1bb72ee1 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Sun, 21 Sep 2025 19:15:46 -0700 Subject: [PATCH 1/2] [clang-tidy] Fix `modernize-use-nullptr` crash on 32-

[clang-tools-extra] [clang-tidy] Fix `modernize-use-nullptr` crash on 32-bit Windows (PR #160023)

2025-09-21 Thread Victor Chernyakin via cfe-commits
localspook wrote: I keep forgetting to do that >_< https://github.com/llvm/llvm-project/pull/160023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `modernize-use-nullptr` crash on 32-bit Windows (PR #160023)

2025-09-21 Thread via cfe-commits
EugeneZelenko wrote: Will be good idea to mention fix in Release Notes. https://github.com/llvm/llvm-project/pull/160023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `modernize-use-nullptr` crash on 32-bit Windows (PR #160023)

2025-09-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Victor Chernyakin (localspook) Changes Fixes #53778. See that issue for an explanation of the problem. --- Full diff: https://github.com/llvm/llvm-project/pull/160023.diff 1 Files Affected: - (modified) clang-tools-extra/cla

[clang] [Headers][X86] VectorExprEvaluator::VisitCallExpr - allow SSE/AVX2/AVX512 pack intrinsics to be used in constexpr (PR #156003)

2025-09-21 Thread via cfe-commits
@@ -11575,6 +11575,43 @@ static bool handleVectorElementCast(EvalInfo &Info, const FPOptions FPO, return false; } +static bool +evalPackBuiltin(const CallExpr *E, EvalInfo &Info, APValue &Result, +llvm::function_ref narrowElement) { woruyu w

[clang] [Headers][X86] VectorExprEvaluator::VisitCallExpr - allow SSE/AVX2/AVX512 pack intrinsics to be used in constexpr (PR #156003)

2025-09-21 Thread via cfe-commits
@@ -2604,6 +2605,51 @@ static bool interp__builtin_elementwise_int_binop( return true; } +static bool interp__builtin_x86_pack( +InterpState &S, CodePtr, const CallExpr *E, +llvm::function_ref narrowElement) { woruyu wrote: Done! https://github.com

[clang-tools-extra] [clang-tidy][NFC] let multi-line string first line does not wrap (PR #160019)

2025-09-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/160019 ___ 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 readability-redundant-parentheses (PR #159911)

2025-09-21 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,54 @@ + HerrCai0907 wrote: fix script in #160019 https://github.com/llvm/llvm-project/pull/159911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang-tools-extra] [clang-tidy][NFC] let multi-line string first line does not wrap (PR #160019)

2025-09-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/160019 add \ to avoid a blank first line >From f75f6e96538e8de5b639a9416ee979b0f4de0de8 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 22 Sep 2025 10:00:30 +0800 Subject: [PATCH] [clang-tidy][NFC] let mul

[clang-tools-extra] [clang-tidy] add readability-redundant-parentheses (PR #159911)

2025-09-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/159911 >From ad8fc039e1aea131c56c356e88c8c1a4c9afe737 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 19 Sep 2025 23:28:30 +0800 Subject: [PATCH 1/2] [clang-tidy] add readability-redundant-parentheses This

[clang-tools-extra] [clang-tidy] add readability-redundant-parentheses (PR #159911)

2025-09-21 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: %check_clang_tidy %s readability-redundant-parentheses %t HerrCai0907 wrote: Not sure if this is necessary, since it seems that this check has no standard-related content. https://github.com/llvm/llvm-project/pull/159911 __

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-21 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-21 Thread via cfe-commits
Sirraide wrote: > Before this PR, all three initializations give the warning. After this PR, > `d0` and `d1` give the warning but `d2` doesn't. Yeah, imo those should all warn and if you don’t want a warning you have to write e.g. `double d3{double(f)}`, which, sure, is rather verbose, but I’d

[clang] [clang] WIP: implement ConstantTemplateParamCastExpr (PR #160018)

2025-09-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/160018 This fixes a bunch of bugs with how non-type template parameters are transformed and used in template argument deduction. >From a0db4a10c306786d3ab689c4094a2676c18f2c53 Mon Sep 17 00:00:00 2001 From: Matheus I

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-21 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > > We don't need check `tok::string_literal`, just check `tok::header_name` is > > enouth. > > I agree in principle. I think the standard has a defect: the wording makes it > necessary to check `tok::string_literal` because `u8"string"` is a > _string-literal_ b

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 Thread via cfe-commits
=?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= S

[clang] [analyzer] Correct crash in Z3 wrapper (PR #158276)

2025-09-21 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/158276 >From f96f8e27968a5dfd74b97441b6d8182a46a5c6fe Mon Sep 17 00:00:00 2001 From: Vince Bridgers Date: Fri, 12 Sep 2025 13:19:40 +0200 Subject: [PATCH] [analyzer] Correct crash in Z3 wrapper If a UnarySymExpr wi

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 Thread via cfe-commits
=?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= S

[clang] [analyzer] Correct crash in Z3 wrapper (PR #158276)

2025-09-21 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 origin/main HEAD --extensions h,c -- clang/include/clang/StaticAnalyzer/Core/PathSens

[clang] [analyzer] Correct crash in Z3 wrapper (PR #158276)

2025-09-21 Thread via cfe-commits
vabridgers wrote: Thanks for the comments @NagyDonat . I believe all comments have been resolved. https://github.com/llvm/llvm-project/pull/158276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] fix clang linker selection (PR #160017)

2025-09-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Un1q32) Changes Makes more sense to choose the linker based on binary format instead of OS --- Full diff: https://github.com/llvm/llvm-project/pull/160017.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChain.cpp (+1-1)

[clang] fix clang linker selection (PR #160017)

2025-09-21 Thread via cfe-commits
https://github.com/Un1q32 created https://github.com/llvm/llvm-project/pull/160017 Makes more sense to choose the linker based on binary format instead of OS >From ac387e0f77ff905280b21b77b6b67c39bf562b5a Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Sun, 21 Sep 2025 18:16:32 -0400 Subject: [PAT

[clang] [clang-format] Add AllowBreakBeforeQtProperty option (PR #159909)

2025-09-21 Thread via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/159909 >From 813bbca2a229dfcf381e4795775a82d7ec6a1ff2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 19 Sep 2025 22:40:35 -0700 Subject: [PATCH 1/2] [clang-format] Add AllowBreakBeforeQtProperty option Test cases a

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-21 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/107168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Correct crash in Z3 wrapper (PR #158276)

2025-09-21 Thread via cfe-commits
vabridgers wrote: Thank you for the comments, @NagyDonat . I'll update the PR accordingly, and respond to the comments. https://github.com/llvm/llvm-project/pull/158276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-21 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast commented: Macro expansion is supposed to be allowed in a module directive. ```cpp export module m ATTR(); // expected-no-diagnostics ``` ``` $ clang -cc1 -verify -std=c++26 moduleattrib.cc -D'ATTR(X)=[[X]]' error: 'expected-error' diagnostics seen but

[clang] [clang][bytecode] Fix unknown size arrays crash in clang bytecode (PR #160015)

2025-09-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Osama Abdelkader (osamakader) Changes This fixes issue #153948 where clang crashes with assertion failure 'Array of unknown size' when evaluating strlen() on external const char[] declarations. The issue was in evaluateStrlen() which cal

[clang] [clang][bytecode] Fix unknown size arrays crash in clang bytecode (PR #160015)

2025-09-21 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][bytecode] Fix unknown size arrays crash in clang bytecode (PR #160015)

2025-09-21 Thread Osama Abdelkader via cfe-commits
https://github.com/osamakader created https://github.com/llvm/llvm-project/pull/160015 This fixes issue #153948 where clang crashes with assertion failure 'Array of unknown size' when evaluating strlen() on external const char[] declarations. The issue was in evaluateStrlen() which called getN

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: After looking at the rule, I think we should place in "modernize" category: `modernize-avoud-setjmp-longjmp`. "bugprone" checks in general are expected to give only warnings for real problems: `setjmp` can be perfectly fine but it's not how exceptions sho

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/159813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -3,8 +3,6 @@ cert-err52-cpp == -This check flags all call expressions involving ``setjmp()`` and ``longjmp()``. - -This check corresponds to the CERT C++ Coding Standard rule -`ERR52-CPP. Do not use setjmp() or longjmp() -

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/159813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/157737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 2bcccdd - [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (#157737)

2025-09-21 Thread via cfe-commits
Author: Baranov Victor Date: 2025-09-22T00:41:55+03:00 New Revision: 2bcccdddc8cb98fd7d126be85273f66d436428d9 URL: https://github.com/llvm/llvm-project/commit/2bcccdddc8cb98fd7d126be85273f66d436428d9 DIFF: https://github.com/llvm/llvm-project/commit/2bcccdddc8cb98fd7d126be85273f66d436428d9.diff

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-21 Thread Marcel Jacobse via cfe-commits
mjacobse wrote: Thanks, your `struct B` example raises a very good point, because with this PR no warning would be thrown anymore for the promotion of `f` to `double` in the initialization of member `B::d`. Using parantheses ```c++ B(float f) : d(f) {} ``` would bring back the warning. Somethin

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-21 Thread Baranov Victor via cfe-commits
vbvictor wrote: code-lint failure would be fixed in https://github.com/llvm/llvm-project/pull/160014. https://github.com/llvm/llvm-project/pull/157737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang-tools-extra] 096c62c - [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-static-initialization' (#158151)

2025-09-21 Thread via cfe-commits
Author: Baranov Victor Date: 2025-09-22T00:37:27+03:00 New Revision: 096c62cf21adcfae73dfcb5a39ab2f10c14b595a URL: https://github.com/llvm/llvm-project/commit/096c62cf21adcfae73dfcb5a39ab2f10c14b595a DIFF: https://github.com/llvm/llvm-project/commit/096c62cf21adcfae73dfcb5a39ab2f10c14b595a.diff

[clang-tools-extra] [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-static-initialization' (PR #158151)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/158151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-static-initialization' (PR #158151)

2025-09-21 Thread Baranov Victor via cfe-commits
vbvictor wrote: code-lint failure would be fixed in https://github.com/llvm/llvm-project/pull/160014. https://github.com/llvm/llvm-project/pull/158151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157737 >From a6dd8c9b21422404c690f14453b100bc762173c8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 9 Sep 2025 22:26:21 +0300 Subject: [PATCH 1/3] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-v

[clang] [NFC][Clang][OpenMP] Add helper functions/utils for finding/comparing attach base-ptrs. (PR #155625)

2025-09-21 Thread Abhinav Gaba via cfe-commits
@@ -6765,12 +6765,255 @@ llvm::Value *CGOpenMPRuntime::emitNumThreadsForTargetDirective( namespace { LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); +/// Utility to compare expression locations. +/// Returns true if expr-loc of LHS is less-than that of RHS. +/// This function asser

[clang-tools-extra] [llvm] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157737 >From a6dd8c9b21422404c690f14453b100bc762173c8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 9 Sep 2025 22:26:21 +0300 Subject: [PATCH 1/4] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-v

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-21 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > > There is a related problem that preprocessing the file first would > > (naturally) generate different behaviour for such a case. > > Do you have any suggestion about this? @Bigcheese The warning I suggested earlier is one approach (i.e., leave it as a problem

[clang-tools-extra] [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-static-initialization' (PR #158151)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/158151 >From f24956299044d7278fa9de634fdd436d357fff1f Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 11 Sep 2025 23:29:55 +0300 Subject: [PATCH] [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-st

[clang-tools-extra] [clang-tidy] Remove 'clang-analyzer-*' checks from default checks. (PR #157306)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157306 >From 4ab549990f3dc3f59a6346b32687e5ecbd495586 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 22:54:31 +0300 Subject: [PATCH] [clang-tidy] Remove 'clang-analyzer-*' checks from default che

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157737 >From a6dd8c9b21422404c690f14453b100bc762173c8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 9 Sep 2025 22:26:21 +0300 Subject: [PATCH 1/3] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-v

[clang-tools-extra] [llvm] [clang-tidy] Remove 'clang-analyzer-*' checks from default checks. (PR #157306)

2025-09-21 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 origin/main HEAD --extensions cpp -- clang-tools-extra/test/clang-tidy/infrastructure

[clang-tools-extra] [llvm] [clang-tidy] Remove 'clang-analyzer-*' checks from default checks. (PR #157306)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157306 >From 4ab549990f3dc3f59a6346b32687e5ecbd495586 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 22:54:31 +0300 Subject: [PATCH 1/2] [clang-tidy] Remove 'clang-analyzer-*' checks from default

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-21 Thread via cfe-commits
Sirraide wrote: Also, it’d probably also be a good idea to add a test like ```c++ struct A { A(double f) {} }; float f; A a{f}; ``` to make sure we only suppress the diagnostic if the type we’re list-initialising is actually `double`/`long double`. https://github.com/llvm/llvm-project/pull/

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-21 Thread via cfe-commits
https://github.com/Sirraide commented: The implementation lgtm, but I think we can do some deduplication in the tests by adding a second `RUN` line to the `.c` file that specifies `-x c++` and then only adding tests for truly C++-specific constructs in the `.cpp` file. Also, while you’re at it

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-21 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Developer Policy](https://llvm.org/docs/DeveloperPol

[clang] [llvm] [FMV][AArch64] Allow user to override version priority. (PR #150267)

2025-09-21 Thread Alexandros Lamprineas via cfe-commits
@@ -348,6 +350,76 @@ entry: ret i32 %call } +declare i32 @test_explicit_priority._Mmops() #18 +declare i32 @test_explicit_priority._Msve2() #19 +declare i32 @test_explicit_priority._Msve() #20 +declare i32 @test_explicit_priority.default() #0 + +define weak_odr ptr @test_exp

[clang-tools-extra] [clang-tidy] add readability-redundant-parentheses (PR #159911)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,54 @@ + +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

  1   2   3   >