[clang] [libcxx] [clang] Fix -Wuninitialized for values passed by const pointers (PR #147221)

2025-07-07 Thread Richard Smith via cfe-commits
@@ -453,7 +450,7 @@ void ClassifyRefs::VisitCallExpr(CallExpr *CE) { const auto *UO = dyn_cast(Ex); if (UO && UO->getOpcode() == UO_AddrOf) Ex = UO->getSubExpr(); - classify(Ex, Ignore); + classify(Ex, Use); zygoloid wrote: > Your

[clang] [libcxx] [clang] Fix -Wuninitialized for values passed by const pointers (PR #147221)

2025-07-07 Thread Igor Kudrin via cfe-commits
@@ -453,7 +450,7 @@ void ClassifyRefs::VisitCallExpr(CallExpr *CE) { const auto *UO = dyn_cast(Ex); if (UO && UO->getOpcode() == UO_AddrOf) Ex = UO->getSubExpr(); - classify(Ex, Ignore); + classify(Ex, Use); igorkudrin wrote: > Co

[clang] 0f48baf - [ExtractAPI] Include tilde in destructor name (#146001)

2025-07-07 Thread via cfe-commits
Author: Prajwal Nadig Date: 2025-07-07T09:14:47-06:00 New Revision: 0f48bafafc38581da6f7388b4f3cc143cdbbdede URL: https://github.com/llvm/llvm-project/commit/0f48bafafc38581da6f7388b4f3cc143cdbbdede DIFF: https://github.com/llvm/llvm-project/commit/0f48bafafc38581da6f7388b4f3cc143cdbbdede.diff

[clang] [ExtractAPI] Include tilde in destructor name (PR #146001)

2025-07-07 Thread via cfe-commits
https://github.com/QuietMisdreavus closed https://github.com/llvm/llvm-project/pull/146001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -2258,6 +2258,30 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { unsigned NumExpansions; }; + enum class PredefinedSugarKind { +/// The "size_t" type. +SizeT, + +/// The signed integer type corresponding to "size_t". +SignedSiz

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread via cfe-commits
@@ -7248,6 +7248,12 @@ QualType TreeTransform::TransformDependentBitIntType( return Result; } +template +QualType TreeTransform::TransformPredefinedSugarType( +TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) { + llvm_unreachable("This type does not need to be transfor

[clang] [clang] Refactor `CodeGenOptions` to specify compatibility as X macro arg (PR #146910)

2025-07-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/146910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] diagnose -mwavefrontsize64 for gfx10+ (PR #140185)

2025-07-07 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/140185 >From 1d8a6ceb3eb3f9e899efde6bf6e86d23dfdfc430 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Fri, 16 May 2025 00:04:12 -0400 Subject: [PATCH] [HIP] Add warning for -mwavefrontsize64 on gfx10+ architec

[clang-tools-extra] [clang-tidy] filter check options by enabled checks in '--dump-config' (PR #147142)

2025-07-07 Thread Victor Chernyakin via cfe-commits
@@ -503,6 +503,21 @@ getCheckNames(const ClangTidyOptions &Options, return Factory.getCheckNames(); } +void filterCheckOptions(ClangTidyOptions &Options, +const std::vector &EnabledChecks) { + StringSet<> EnabledChecksSet(llvm::from_range, EnabledChe

[clang] [HIP] Add warning for -mwavefrontsize64 on gfx10+ architectures (PR #140185)

2025-07-07 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/140185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146844)

2025-07-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > No idea why it blew up on that particular s390x buildbot. @AaronBallman Any > ideas? Err, I have no idea, I've never seen that sort of behavior before! https://github.com/llvm/llvm-project/pull/146844 ___ cfe-commits mailing lis

[clang] [clang-tools-extra] [Clang] [Diagnostics] Simplify filenames that contain '..' (PR #143520)

2025-07-07 Thread via cfe-commits
Sirraide wrote: Windows CI failures seem unrelated. https://github.com/llvm/llvm-project/pull/143520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b8f5cbb - [OpenACC][CIR] 'cache' construct lowering (#146915)

2025-07-07 Thread via cfe-commits
Author: Erich Keane Date: 2025-07-07T08:35:05-07:00 New Revision: b8f5cbb4ffbf3901425a6e4f5d86eb8cba5b0ddd URL: https://github.com/llvm/llvm-project/commit/b8f5cbb4ffbf3901425a6e4f5d86eb8cba5b0ddd DIFF: https://github.com/llvm/llvm-project/commit/b8f5cbb4ffbf3901425a6e4f5d86eb8cba5b0ddd.diff L

[clang] [OpenACC][CIR] 'cache' construct lowering (PR #146915)

2025-07-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/146915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Fix feature guards for SVE2p1 builtins available in SME{2}. (PR #147086)

2025-07-07 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/147086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Fix feature guards for SVE2p1 builtins available in SME{2}. (PR #147086)

2025-07-07 Thread Paul Walker via cfe-commits
@@ -569,34 +569,39 @@ static bool checkArmStreamingBuiltin(Sema &S, CallExpr *TheCall, // * When compiling for SVE only, the caller must be in non-streaming mode. // * When compiling for both SVE and SME, the caller can be in either mode. if (BuiltinType == SemaARM::Veri

[clang] [CIR] Implement functional cast to ComplexType (PR #147147)

2025-07-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/147147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3c76a05 - [CIR] Implement functional cast to ComplexType (#147147)

2025-07-07 Thread via cfe-commits
Author: Amr Hesham Date: 2025-07-07T17:48:50+02:00 New Revision: 3c76a054ac4c7c93b197f3f1aec6c9f72ece1377 URL: https://github.com/llvm/llvm-project/commit/3c76a054ac4c7c93b197f3f1aec6c9f72ece1377 DIFF: https://github.com/llvm/llvm-project/commit/3c76a054ac4c7c93b197f3f1aec6c9f72ece1377.diff LO

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #147342)

2025-07-07 Thread via cfe-commits
https://github.com/raoanag ready_for_review https://github.com/llvm/llvm-project/pull/147342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Matheus Izvekov via cfe-commits
@@ -7248,6 +7248,12 @@ QualType TreeTransform::TransformDependentBitIntType( return Result; } +template +QualType TreeTransform::TransformPredefinedSugarType( +TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) { + llvm_unreachable("This type does not need to be transfor

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/143653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Do more work at compile time (PR #147406)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Victor Chernyakin (localspook) Changes ```cpp for (std::string OptionName : { #define GET_CHECKER_OPTIONS #define CHECKER_OPTION(TYPE, CHECKER, OPTION_NAME, DESCRIPTION, DEFAULT, \ RELEASE, HIDDEN)

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -488,6 +488,13 @@ unsigned Parser::ParseAttributeArgsCommon( bool AttributeHasVariadicIdentifierArg = attributeHasVariadicIdentifierArg(*AttrName, Form.getSyntax(), ScopeName); + if (Tok.is(tok::hash) || Tok.is(tok::hashhash)) { erichkeane wrote:

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread via cfe-commits
@@ -320,6 +320,92 @@ bool clang::analyze_format_string::ParseUTF8InvalidSpecifier( // Methods on ArgType. //===--===// +static bool namedTypeToLengthModifierKind(ASTContext &Ctx, QualType QT, +

[clang] [llvm] Triple: Forward declare Twine and remove include (PR #145685)

2025-07-07 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: This commit has been identified as causing a change in Clang driver behaviour. The observed symptom is that the Clang driver is passing `unknown` to `-cc1` instead of the configured default target triple of `powerpc-ibm-aix7.3.0.0`. Investigation is ongoing but we

[clang] [clang] Refactor `LangOptions` to specify compatibility as X macro arg (PR #146766)

2025-07-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/146766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread Andrey Karlov via cfe-commits
https://github.com/negativ updated https://github.com/llvm/llvm-project/pull/146355 >From fc3b77d8c4b5dd264bd746ed997bcea6cddaf389 Mon Sep 17 00:00:00 2001 From: Andrey Karlov Date: Mon, 30 Jun 2025 17:05:41 +0300 Subject: [PATCH 1/4] Initial implementation --- .../bugprone/unchecked-optional

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread via cfe-commits
@@ -320,6 +320,92 @@ bool clang::analyze_format_string::ParseUTF8InvalidSpecifier( // Methods on ArgType. //===--===// +static bool namedTypeToLengthModifierKind(ASTContext &Ctx, QualType QT, +

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread Julian Schmidt via cfe-commits
@@ -141,6 +141,42 @@ void nullable_value_after_swap(BloombergLP::bdlb::NullableValue &opt1, Bloo } } +void assertion_handler_imp() __attribute__((analyzer_noreturn)); + +void assertion_handler() { +do { + assertion_handler_imp(); +} while(0); +} + +void functi

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-07-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/144235 >From acab11ee6a8e8041dab689c5518229e358d4f5a1 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 7 Jul 2025 20:52:33 +0200 Subject: [PATCH] [CIR] Upstream ComplexRealPtrOp for ComplexType --- clang/i

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-07 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I haven't really thought about what the right strategy is for diagnostics here, specifically, but it looks like the OpenMP diagnostic suppression isn't working correctly. If there's an error in a function, that should stop CodeGen from seeing the function at all. If it's

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-07 Thread Aaron Ballman via cfe-commits
@@ -276,6 +276,10 @@ def err_expected_while : Error<"expected 'while' in do/while loop">; def err_expected_semi_after_stmt : Error<"expected ';' after %0 statement">; def err_expected_semi_after_expr : Error<"expected ';' after expression">; +def warn_expected_stmt_before_sem

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-07 Thread Aaron Ballman via cfe-commits
@@ -747,6 +747,10 @@ Bug Fixes in This Version - Fixed an infinite recursion when checking constexpr destructors. (#GH141789) - Fixed a crash when a malformed using declaration appears in a ``constexpr`` function. (#GH144264) - Fixed a bug when use unicode character name in ma

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/147080 From c0e669a4f31702a871fce4c8c3805b322c331afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 2 Jul 2025 15:09:42 +0200 Subject: [PATCH 1/2] [analyzer] Connversion to CheckerFamily: Mal

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: There is divergence between C and C++, I sent a mail to core https://lists.isocpp.org/liaison/2025/07/1549.php https://github.com/llvm/llvm-project/pull/147308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [HIP] diagnose -mwavefrontsize64 for gfx10+ (PR #140185)

2025-07-07 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/140185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] Add warning for -mwavefrontsize64 on gfx10+ architectures (PR #140185)

2025-07-07 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: I removed the new option and changed the error into a warning. Clang will only emit a warning about wave64 for gfx10+. I will ask HIP runtime to add an option -Werror=unsupported-wave64 in cmake config files since HIP runtime does not support wave64 on gfx10+. https://github.c

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -2258,6 +2258,30 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { unsigned NumExpansions; }; + enum class PredefinedSugarKind { +/// The "size_t" type. +SizeT, + +/// The signed integer type corresponding to "size_t". --

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -7248,6 +7248,12 @@ QualType TreeTransform::TransformDependentBitIntType( return Result; } +template +QualType TreeTransform::TransformPredefinedSugarType( +TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) { + llvm_unreachable("This type does not need to be transfor

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #147342)

2025-07-07 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] Reland "[Modules] Record whether VarDecl initializers contain side effects" (PR #145447)

2025-07-07 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Here's a small repro: ```cpp export module Foo; export template struct Wrapper { double value; }; export constexpr Wrapper Compute() { return Wrapper{1.0}; } export template Wrapper ComputeInFloat() { const Wrapper a = Compute(); return a; } ``` it fails when as

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/147080 From c0e669a4f31702a871fce4c8c3805b322c331afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 2 Jul 2025 15:09:42 +0200 Subject: [PATCH 1/3] [analyzer] Connversion to CheckerFamily: Mal

[clang] [Clang] Correctly handle taking the address of an explicit object member function template (PR #147046)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147046 >From a54b4f8120460c4374422c9847c22aed0ef8665f Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 4 Jul 2025 12:16:02 +0200 Subject: [PATCH 1/2] [Clang] Correctly handle taking the address of an explicit

[clang] [clang-tools-extra] [llvm] [clang][modules] Serialize `CodeGenOptions` (PR #146422)

2025-07-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/146422 >From 69049bfcd81134f3787d1ee14ab3e5c6d91eb87d Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 3 Jul 2025 12:46:58 -0700 Subject: [PATCH 1/2] [clang][modules] Serialize `CodeGenOptions` --- clang-to

[clang] [clang-tools-extra] [llvm] [clang][modules] Serialize `CodeGenOptions` (PR #146422)

2025-07-07 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,cl,c,h -- llvm/clang/test/Modules/implicit-opt-level.c

[clang] [clang-tools-extra] [llvm] [clang][modules] Serialize `CodeGenOptions` (PR #146422)

2025-07-07 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I rebased this PR on top of https://github.com/llvm/llvm-project/pull/146766 and https://github.com/llvm/llvm-project/pull/146910. PTAL https://github.com/llvm/llvm-project/pull/146422 ___ cfe-commits mailing list cfe-commits@lists

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

2025-07-07 Thread Michael Spencer via cfe-commits
Bigcheese wrote: I'll try to review it this week. 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] Propose new ClangIR Maintainer (PR #147365)

2025-07-07 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. I strongly approve! https://github.com/llvm/llvm-project/pull/147365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-07 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: We shouldn't have invalid decls unless we've emitted an error. If we're making some decision like "this function is an error if it's used as a host function", we should probably be marking the FunctionDecl explicitly with that decision, and CodeGen shouldn't try to emit su

[clang] [CIR] Implement CXXScalarValueInitExpr for ComplexType (PR #147143)

2025-07-07 Thread Amr Hesham via cfe-commits
@@ -165,12 +165,8 @@ mlir::Value ComplexExprEmitter::VisitChooseExpr(ChooseExpr *e) { mlir::Value ComplexExprEmitter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *e) { mlir::Location loc = cgf.getLoc(e->getExprLoc()); - QualType complexElemTy = - e->getType()->c

[clang] [CIR] Implement CXXScalarValueInitExpr for ComplexType (PR #147143)

2025-07-07 Thread Henrich Lauko via cfe-commits
@@ -165,12 +165,8 @@ mlir::Value ComplexExprEmitter::VisitChooseExpr(ChooseExpr *e) { mlir::Value ComplexExprEmitter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *e) { mlir::Location loc = cgf.getLoc(e->getExprLoc()); - QualType complexElemTy = - e->getType()->c

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -320,6 +320,92 @@ bool clang::analyze_format_string::ParseUTF8InvalidSpecifier( // Methods on ArgType. //===--===// +static bool namedTypeToLengthModifierKind(ASTContext &Ctx, QualType QT, +

[clang] fee1689 - [clang] Refactor `LangOptions` to specify compatibility as X macro arg (#146766)

2025-07-07 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-07-07T09:01:42-07:00 New Revision: fee168913c752b1048a2fd48b27c698094462d52 URL: https://github.com/llvm/llvm-project/commit/fee168913c752b1048a2fd48b27c698094462d52 DIFF: https://github.com/llvm/llvm-project/commit/fee168913c752b1048a2fd48b27c698094462d52.diff L

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Matheus Izvekov via cfe-commits
@@ -2258,6 +2258,30 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { unsigned NumExpansions; }; + enum class PredefinedSugarKind { +/// The "size_t" type. +SizeT, + +/// The signed integer type corresponding to "size_t". +SignedSiz

[clang] [clang] Refactor `LangOptions` to specify compatibility as X macro arg (PR #146766)

2025-07-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/146766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9f1b956 - [clang] Refactor `CodeGenOptions` to specify compatibility as X macro arg (#146910)

2025-07-07 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-07-07T09:02:56-07:00 New Revision: 9f1b9560e7ee542471c89b193c6aea4c674ffe23 URL: https://github.com/llvm/llvm-project/commit/9f1b9560e7ee542471c89b193c6aea4c674ffe23 DIFF: https://github.com/llvm/llvm-project/commit/9f1b9560e7ee542471c89b193c6aea4c674ffe23.diff L

[clang] [clang] Refactor `CodeGenOptions` to specify compatibility as X macro arg (PR #146910)

2025-07-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/146910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix activating nested unions (PR #147338)

2025-07-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/147338 When activating the new pointer, we need to de-activate pointers of all parent unions, not just the topmost one. >From 2e4627dbde65aecbde9080c0edff5805d2c60890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B

[clang] [clang][bytecode] Fix activating nested unions (PR #147338)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes When activating the new pointer, we need to de-activate pointers of all parent unions, not just the topmost one. --- Full diff: https://github.com/llvm/llvm-project/pull/147338.diff 2 Files Affected: - (m

[clang-tools-extra] [clang-tidy][NFC] fix compilation by disambiguating equality operator (PR #147048)

2025-07-07 Thread Baranov Victor via cfe-commits
@@ -144,7 +144,9 @@ TaggedUnionMemberCountCheck::getNumberOfEnumValues(const EnumDecl *ED) { if (EnableCountingEnumHeuristic && LastEnumConstant && isCountingEnumLikeName(LastEnumConstant->getName()) && - (LastEnumConstant->getInitVal() == (EnumValues.size() - 1)

[clang-tools-extra] [clang-tidy][NFC] fix compilation by disambiguating equality operator (PR #147048)

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

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/147080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Corentin Jabot via cfe-commits
@@ -477,3 +477,8 @@ namespace P2361 { } alignas(int) struct AlignAsAttribute {}; // expected-error {{misplaced attributes; expected attributes here}} + +namespace GH147217 { + [[clang::annotate(#)]] void a(); // expected-error {{'#' is not allowed in attribute argument

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread via cfe-commits
@@ -2258,6 +2258,30 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { unsigned NumExpansions; }; + enum class PredefinedSugarKind { +/// The "size_t" type. +SizeT, + +/// The signed integer type corresponding to "size_t". +SignedSiz

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/147080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Corentin Jabot via cfe-commits
@@ -488,6 +488,13 @@ unsigned Parser::ParseAttributeArgsCommon( bool AttributeHasVariadicIdentifierArg = attributeHasVariadicIdentifierArg(*AttrName, Form.getSyntax(), ScopeName); + if (Tok.is(tok::hash) || Tok.is(tok::hashhash)) { cor3ntin wrote: W

[clang] [llvm] [NVPTX] Fix v2i8 call lowering, use generic ld/st nodes for call params (PR #146930)

2025-07-07 Thread Princeton Ferro via cfe-commits
@@ -5754,47 +5540,106 @@ static SDValue combineADDRSPACECAST(SDNode *N, return SDValue(); } +static SDValue sinkProxyReg(SDValue R, SDValue Chain, +TargetLowering::DAGCombinerInfo &DCI) { + switch (R.getOpcode()) { + case ISD::TRUNCATE: + case

[clang] [llvm] [NVPTX] Fix v2i8 call lowering, use generic ld/st nodes for call params (PR #146930)

2025-07-07 Thread Princeton Ferro via cfe-commits
@@ -442,15 +442,19 @@ define void @st_param_v4_i8_() { define void @st_param_v4_i8_irrr(i8 %b, i8 %c, i8 %d) { ; CHECK-LABEL: st_param_v4_i8_irrr( ; CHECK: { -; CHECK-NEXT:.reg .b16 %rs<4>; +; CHECK-NEXT:.reg .b32 %r<8>; ; CHECK-EMPTY: ; CHECK-NEXT: // %bb.

[clang] [llvm] [NVPTX] Fix v2i8 call lowering, use generic ld/st nodes for call params (PR #146930)

2025-07-07 Thread Princeton Ferro via cfe-commits
@@ -432,7 +432,7 @@ define void @st_param_v4_i8_() { ; CHECK-NEXT: // %bb.0: ; CHECK-NEXT:{ // callseq 23, 0 ; CHECK-NEXT:.param .align 4 .b8 param0[4]; -; CHECK-NEXT:st.param.v4.b8 [param0], {1, 2, 3, 4}; +; CHECK-NEXT:st.param.b32 [param0], 67305985;

[clang] [llvm] [NVPTX] Fix v2i8 call lowering, use generic ld/st nodes for call params (PR #146930)

2025-07-07 Thread Princeton Ferro via cfe-commits
@@ -5754,47 +5540,106 @@ static SDValue combineADDRSPACECAST(SDNode *N, return SDValue(); } +static SDValue sinkProxyReg(SDValue R, SDValue Chain, +TargetLowering::DAGCombinerInfo &DCI) { Prince781 wrote: Can you document this fu

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -7248,6 +7250,22 @@ QualType TreeTransform::TransformDependentBitIntType( return Result; } +template +QualType TreeTransform::TransformPredefinedSugarType( +TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) { + const PredefinedSugarType *EIT = TL.getTypePtr(); + Qua

[clang] [clang-tools-extra] [Clang] [Diagnostics] Simplify filenames that contain '..' (PR #143520)

2025-07-07 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/143520 >From 15c0a79d6a0cd65d88fbe152275b224201e632a1 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Tue, 10 Jun 2025 14:32:32 +0200 Subject: [PATCH 1/7] [Clang] [Diagnostics] Simplify filenames that contain '..' ---

[clang] Add warning for blocks capturing {'this', raw pointers, references} (PR #144388)

2025-07-07 Thread John McCall via cfe-commits
@@ -1641,6 +1641,17 @@ def warn_implicitly_retains_self : Warning < "block implicitly retains 'self'; explicitly mention 'self' to indicate " "this is intended behavior">, InGroup>, DefaultIgnore; +def warn_blocks_capturing_this : Warning<"block implicitly captures 'this'

[clang] [llvm] [WebAssembly,clang] Add __builtin_wasm_test_function_pointer_signature (PR #147076)

2025-07-07 Thread Hood Chatham via cfe-commits
https://github.com/hoodmane updated https://github.com/llvm/llvm-project/pull/147076 >From 2009bb945f57c67daa522448eddb2cc01aac4369 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 2 Jul 2025 20:53:56 +0200 Subject: [PATCH 1/8] Add __builtin_wasm_test_function_pointer_signature This uses

[clang] [llvm] [WebAssembly,llvm] Add llvm.wasm.ref.test.func intrinsic (PR #147076)

2025-07-07 Thread Hood Chatham via cfe-commits
https://github.com/hoodmane edited https://github.com/llvm/llvm-project/pull/147076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add __builtin_wasm_test_function_pointer_signature (PR #147076)

2025-07-07 Thread Hood Chatham via cfe-commits
https://github.com/hoodmane updated https://github.com/llvm/llvm-project/pull/147076 >From ba4e21486455fcee36e5521050562cd9be35e9b4 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Sat, 10 May 2025 22:01:09 -0400 Subject: [PATCH 1/9] [WebAssembly] Add ref.test_func handling to AsmParser ---

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you! https://github.com/llvm/llvm-project/pull/144619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Stop lexing if hit a failure while loading a PCH/module in a submodule. (PR #146976)

2025-07-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/146976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang] Fix -Wuninitialized for values passed by const pointers (PR #147221)

2025-07-07 Thread Richard Smith via cfe-commits
@@ -453,7 +450,7 @@ void ClassifyRefs::VisitCallExpr(CallExpr *CE) { const auto *UO = dyn_cast(Ex); if (UO && UO->getOpcode() == UO_AddrOf) Ex = UO->getSubExpr(); - classify(Ex, Ignore); + classify(Ex, Use); zygoloid wrote: I beli

[clang] [libcxx] [clang] Fix -Wuninitialized for values passed by const pointers (PR #147221)

2025-07-07 Thread Richard Smith via cfe-commits
https://github.com/zygoloid requested changes to this pull request. https://github.com/llvm/llvm-project/pull/147221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang] Fix -Wuninitialized for values passed by const pointers (PR #147221)

2025-07-07 Thread Richard Smith via cfe-commits
@@ -453,7 +450,7 @@ void ClassifyRefs::VisitCallExpr(CallExpr *CE) { const auto *UO = dyn_cast(Ex); if (UO && UO->getOpcode() == UO_AddrOf) Ex = UO->getSubExpr(); - classify(Ex, Ignore); + classify(Ex, Use); zygoloid wrote: That s

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-07 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/137163 From 3453a392b98e05c7d259ebf1741767f7e36a6be9 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 24 Apr 2025 11:12:00 +0200 Subject: [PATCH 1/5] [clang][CompundLiteralExpr] Don't defer evaluation for CL

[clang-tools-extra] 0860f7a - [clangd][NFC] fix broken documentation link (#147088)

2025-07-07 Thread via cfe-commits
Author: Nathan Ridge Date: 2025-07-07T05:08:49-04:00 New Revision: 0860f7aaeb425dbeb790cb438355401766a2b5af URL: https://github.com/llvm/llvm-project/commit/0860f7aaeb425dbeb790cb438355401766a2b5af DIFF: https://github.com/llvm/llvm-project/commit/0860f7aaeb425dbeb790cb438355401766a2b5af.diff

[clang-tools-extra] [clangd][NFC] fix broken documentation link (PR #147088)

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

[clang] 8a5458c - [C23] Fix typeof handling in enum declarations (#146394)

2025-07-07 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-07-07T07:09:09-04:00 New Revision: 8a5458c79ac71fa1628b1b78de188a9f5598fbeb URL: https://github.com/llvm/llvm-project/commit/8a5458c79ac71fa1628b1b78de188a9f5598fbeb DIFF: https://github.com/llvm/llvm-project/commit/8a5458c79ac71fa1628b1b78de188a9f5598fbeb.diff

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/146394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-07 Thread Fraser Cormack via cfe-commits
@@ -2942,6 +2942,65 @@ void tools::addHIPRuntimeLibArgs(const ToolChain &TC, Compilation &C, } } +void tools::addOpenCLBuiltinsLib(const Driver &D, + const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgString

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/146355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread Gábor Horváth via cfe-commits
@@ -6298,10 +6334,43 @@ static bool isImmediateSinkBlock(const CFGBlock *Blk) { // at least for now, but once we have better support for exceptions, // we'd need to carefully handle the case when the throw is being // immediately caught. - if (llvm::any_of(*Blk, [](const

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun commented: I think this is a good change in general, but I wonder what is the performance impact. Note that clang CFGs have many clients and some of them might not need this information. If there is a measurable performance cost, we might want to put this behind a

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread Gábor Horváth via cfe-commits
@@ -2833,8 +2834,37 @@ CFGBlock *CFGBuilder::VisitCallExpr(CallExpr *C, AddStmtChoice asc) { if (!FD->isVariadic()) findConstructionContextsForArguments(C); -if (FD->isNoReturn() || C->isBuiltinAssumeFalse(*Context)) - NoReturn = true; +if (!NoReturn) +

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/146355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-07 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 h,cpp -- clang/include/clang/Analysis/Analyses/LifetimeSafet

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-07 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/146503 >From b41b2032fdb01bd91d32255bf22a94315b58a017 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 30 Jun 2025 10:59:02 +0100 Subject: [PATCH 1/5] [libclc] Place libclc files in clang's resource dir --

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-07 Thread Fraser Cormack via cfe-commits
@@ -2942,6 +2942,65 @@ void tools::addHIPRuntimeLibArgs(const ToolChain &TC, Compilation &C, } } +void tools::addOpenCLBuiltinsLib(const Driver &D, + const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgString

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: Agreed that this should be a resource directory thing, we made the mistake of not doing that in OpenMP until I moved it to just a normal lib. https://github.com/llvm/llvm-project/pull/146503 ___ cfe-commits mailin

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-07 Thread Matt Arsenault via cfe-commits
@@ -2942,6 +2942,65 @@ void tools::addHIPRuntimeLibArgs(const ToolChain &TC, Compilation &C, } } +void tools::addOpenCLBuiltinsLib(const Driver &D, + const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgString

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 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,h -- clang-tools-extra/test/clang-tidy/checkers/bugprone

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-07 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/146503 >From b41b2032fdb01bd91d32255bf22a94315b58a017 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 30 Jun 2025 10:59:02 +0100 Subject: [PATCH 1/6] [libclc] Place libclc files in clang's resource dir --

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-07 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > Agreed that this should be a resource directory thing, we made the mistake of > not doing that in OpenMP until I moved it to just a normal lib. I've got rid of the checking on LIBRARY_PATH now, thanks for your and @arsenm's input. https://github.com/llvm/llvm-project/pull

<    1   2   3   4   5   6   >