[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Sergei Barannikov via cfe-commits
@@ -2038,6 +2038,11 @@ template auto mismatch(R1 &&Range1, R2 &&Range2) { adl_end(Range2)); } +template +auto uninitialized_copy(R1 &&Src, IterTy Dst) { s-barannikov wrote: ```suggestion template auto uninitialized_copy(R &&Src, Ite

[clang-tools-extra] [clang-tidy][NFC][doc] fix typos in docs. (PR #138305)

2025-05-02 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/138305 Fixed typos in docs of `clang-tidy` checks. >From b39232ccefd9221605e10f6977d9babef1588ea9 Mon Sep 17 00:00:00 2001 From: baranov-V-V Date: Tue, 18 Mar 2025 20:25:08 +0300 Subject: [PATCH] fix typos --- clan

[clang-tools-extra] [clang-tidy][NFC][doc] fix typos in docs. (PR #138305)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Baranov Victor (vbvictor) Changes Fixed typos in docs of `clang-tidy` checks. --- Full diff: https://github.com/llvm/llvm-project/pull/138305.diff 2 Files Affected: - (modified) clang-tools-extra/docs/clang-tidy/checks/boost

[clang-tools-extra] [clang-tidy][NFC][doc] fix typos in docs. (PR #138305)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Baranov Victor (vbvictor) Changes Fixed typos in docs of `clang-tidy` checks. --- Full diff: https://github.com/llvm/llvm-project/pull/138305.diff 2 Files Affected: - (modified) clang-tools-extra/docs/clang-tidy/checks/boost/use-ra

[clang] [flang] [Clang][Driver] Fix target parsing for -fveclib=libmvec option. (PR #138288)

2025-05-02 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/138288 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial

[clang] [flang] [Clang][Flang][Driver] Fix target parsing for -fveclib=libmvec option. (PR #138288)

2025-05-02 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/138288 ___ 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][doc] fix typos in docs. (PR #138305)

2025-05-02 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank approved this pull request. https://github.com/llvm/llvm-project/pull/138305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Never consider conversion from single-element braced-init-list perfect (PR #138307)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes We might prefer a template std::initializer list constructor. Fix a regression introduced by #136203 https://github.com/llvm/llvm-project/pull/136203#issuecomment-2843498895 GCC had a similar issue and a simila

[clang] [Clang] Never consider conversion from single-element braced-init-list perfect (PR #138307)

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

[clang] b752822 - [NFCI]Prospective fix for MVSC Build bot-

2025-05-02 Thread via cfe-commits
Author: erichkeane Date: 2025-05-02T09:42:16-07:00 New Revision: b752822c445b9fba1f59a2822c7b675561749dd4 URL: https://github.com/llvm/llvm-project/commit/b752822c445b9fba1f59a2822c7b675561749dd4 DIFF: https://github.com/llvm/llvm-project/commit/b752822c445b9fba1f59a2822c7b675561749dd4.diff LO

[clang-tools-extra] [NFC] Fix potential nullptr dereference. (PR #138283)

2025-05-02 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank requested changes to this pull request. This is not needed IMO. This is a simple matcher, `op` is expected to always be bound. One might say that it can't hurt to add extra checks, but I don't think that's good justification for adding more code / bloat, even if in

[clang] [Clang] Never consider conversion from single-element braced-init-list perfect (PR #138307)

2025-05-02 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/138307 We might prefer a template std::initializer list constructor. Fix a regression introduced by #136203 https://github.com/llvm/llvm-project/pull/136203#issuecomment-2843498895 GCC had a similar issue and a simil

[clang] [Clang] Never consider conversion from single-element braced-init-list perfect (PR #138307)

2025-05-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/138307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cb068dc - [Clang] Fix handling of reference types in tryEvaluateBuiltinObjectSize (#138247)

2025-05-02 Thread via cfe-commits
Author: cor3ntin Date: 2025-05-02T18:45:24+02:00 New Revision: cb068dcec1b30528f0d06916911f55b4bd61b0bb URL: https://github.com/llvm/llvm-project/commit/cb068dcec1b30528f0d06916911f55b4bd61b0bb DIFF: https://github.com/llvm/llvm-project/commit/cb068dcec1b30528f0d06916911f55b4bd61b0bb.diff LOG:

[clang] [Clang] Fix handling of reference types in tryEvaluateBuiltinObjectSize (PR #138247)

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

[clang] [Clang] Implement CWG3005 Function parameters should never be name-independent (PR #138245)

2025-05-02 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/138245 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [CIR] Refactor global variable emission and initialization (PR #138222)

2025-05-02 Thread Andy Kaylor via cfe-commits
@@ -269,6 +269,40 @@ mlir::Operation *CIRGenModule::getGlobalValue(StringRef name) { return mlir::SymbolTable::lookupSymbolIn(theModule, name); } +cir::GlobalOp CIRGenModule::createGlobalOp(CIRGenModule &cgm, + mlir::Location loc, S

[clang] [CIR] Refactor global variable emission and initialization (PR #138222)

2025-05-02 Thread Andy Kaylor via cfe-commits
@@ -324,8 +358,16 @@ CIRGenModule::getOrCreateCIRGlobal(StringRef mangledName, mlir::Type ty, return entry; } - errorNYI(d->getSourceRange(), "reference of undeclared global"); - return {}; + mlir::Location loc = getLoc(d->getSourceRange()); + + // mlir::SymbolTab

[clang] [CIR] Refactor global variable emission and initialization (PR #138222)

2025-05-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/138222 >From b3ae2d60a178f3c5bb8950804041386a667abc6e Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 29 Apr 2025 15:47:01 -0700 Subject: [PATCH 1/2] [CIR] Refactor global variable emission and initialization

[clang] [CUDA][HIP] Fix implicit attribute of builtin (PR #138162)

2025-05-02 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,23 @@ +// expected-no-diagnostics + +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -aux-triple amdgcn-amd-amdhsa -fsyntax-only -verify -xhip %s +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fsyntax-only -fcuda-is-device -verify -xhip %s + +#include "Inputs/cuda

[clang] [CIR] Refactor global variable emission and initialization (PR #138222)

2025-05-02 Thread Erich Keane via cfe-commits
@@ -269,6 +269,40 @@ mlir::Operation *CIRGenModule::getGlobalValue(StringRef name) { return mlir::SymbolTable::lookupSymbolIn(theModule, name); } +cir::GlobalOp CIRGenModule::createGlobalOp(CIRGenModule &cgm, + mlir::Location loc, S

[clang] [CIR] Refactor global variable emission and initialization (PR #138222)

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

[clang] [clang][lex] Fix lexing malformed pragma within include directive (PR #138165)

2025-05-02 Thread Stefan Weigl-Bosker via cfe-commits
https://github.com/sweiglbosker updated https://github.com/llvm/llvm-project/pull/138165 >From 429b48c245c4f41ad13b59603aefc5d374c2a52c Mon Sep 17 00:00:00 2001 From: Stefan Weigl-Bosker Date: Thu, 1 May 2025 12:24:17 -0400 Subject: [PATCH] [Lex] fix lexing malformed pragma within include direc

[clang] [clang][analyzer][NFC] Improve Clang Static Analyzer performance. (PR #138295)

2025-05-02 Thread Balazs Benics via cfe-commits
steakhal wrote: So is it about cache locality? https://github.com/llvm/llvm-project/pull/138295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][lex] Fix lexing malformed pragma within include directive (PR #138165)

2025-05-02 Thread Stefan Weigl-Bosker via cfe-commits
https://github.com/sweiglbosker updated https://github.com/llvm/llvm-project/pull/138165 >From 2865b67e6014698e4f5c374aa448020b47b84ca5 Mon Sep 17 00:00:00 2001 From: Stefan Weigl-Bosker Date: Thu, 1 May 2025 12:24:17 -0400 Subject: [PATCH] [Lex] fix lexing malformed pragma within include direc

[clang] [clang][lex] Fix lexing malformed pragma within include directive (PR #138165)

2025-05-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Generally LGTM, though a few suggested changes. https://github.com/llvm/llvm-project/pull/138165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [clang][lex] Fix lexing malformed pragma within include directive (PR #138165)

2025-05-02 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: %clang_cc1 %s -verify AaronBallman wrote: ```suggestion // RUN: %clang_cc1 -E %s -verify ``` This ensures we only run the preprocessing steps, which should still report the diagnostics. https://github.com/llvm/llvm-project/pull/138165 _

[clang] [clang][lex] Fix lexing malformed pragma within include directive (PR #138165)

2025-05-02 Thread Aaron Ballman via cfe-commits
@@ -535,7 +535,8 @@ Bug Fixes in This Version - Fixed visibility calculation for template functions. (#GH103477) - Fixed a bug where an attribute before a ``pragma clang attribute`` or ``pragma clang __debug`` would cause an assertion. Instead, this now diagnoses - the inva

[clang] [clang][lex] Fix lexing malformed pragma within include directive (PR #138165)

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

[clang] [clang][lex] Fix lexing malformed pragma within include directive (PR #138165)

2025-05-02 Thread Stefan Weigl-Bosker via cfe-commits
sweiglbosker wrote: > Thanks for the fix! Given the nature of the issue, I would probably introduce > a new test file rather than modify an existing one. But I think it should > live in `clang/test/Preprocessor`. Just added a small test. Looks good to you? https://github.com/llvm/llvm-project

[clang] [C] Add -Wjump-bypasses-init (PR #138009)

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

[clang] [C] Add -Wjump-bypasses-init (PR #138009)

2025-05-02 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=c,both -Wjump-bypasses-init %s +// RUN: %clang_cc1 -fsyntax-only -verify=c,both -Wc++-compat %s +// RUN: %clang_cc1 -fsyntax-only -verify=good %s +// RUN: %clang_cc1 -fsyntax-only -verify=cxx,both -x c++ %s +// good-no-dia

[clang] [clang] Remove FEM_Indeterminable (PR #137661)

2025-05-02 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: @ojhunt Please go ahead and merge this in. Thanks for your patience. https://github.com/llvm/llvm-project/pull/137661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove FEM_Indeterminable (PR #137661)

2025-05-02 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam approved this pull request. Looks good. Thanks. https://github.com/llvm/llvm-project/pull/137661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Add -Wjump-bypasses-init (PR #138009)

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

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

2025-05-02 Thread Farzon Lotfi via cfe-commits
@@ -147,7 +147,7 @@ template constexpr vector lit_impl(T NDotL, T NDotH, T M) { return Result; } -} // namespace __detail +} // namespace __dETAil farzonl wrote: fix this too https://github.com/llvm/llvm-project/pull/136026 __

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

2025-05-02 Thread Farzon Lotfi via cfe-commits
@@ -10,7 +10,7 @@ #define _HLSL_HLSL_INTRINSIC_HELPERS_H_ namespace hlsl { -namespace __detail { +namespace __dETAil { farzonl wrote: this looks like you did find replace for eta. Please revert this change. In the future you can use clangd' vscode plugin to

[clang] Reset CodeGenOptions fields for clean module/PCH builds (PR #138256)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ayush Pareek (ayushpareek2003) Changes This change resets certain CodeGenOptions fields using = {} instead of .clear(), to clean up build-specific data when generating modules or PCH files. It helps make the output more consistent and eas

[clang] [clang] Remove FEM_Indeterminable (PR #137661)

2025-05-02 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: @ojhunt In https://github.com/llvm/llvm-project/issues/137600 there are a list of a few temporary PRs that were merged in to silence the warning. These need to be reverted after this one gets merged in. Do you want to revert them or you want me to do that? https://github.com/

[clang] [C] Add -Wjump-bypasses-init (PR #138009)

2025-05-02 Thread Aaron Ballman via cfe-commits
@@ -6561,18 +6561,28 @@ def ext_goto_into_protected_scope : ExtWarn< def warn_cxx98_compat_goto_into_protected_scope : Warning< "jump from this goto statement to its label is incompatible with C++98">, InGroup, DefaultIgnore; +def warn_cpp_compat_goto_into_protected_scope :

[clang] [HLSL] Implement the `ldexp` intrinsic (PR #138182)

2025-05-02 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s farzonl wrote: I was hoping we would only do those for intrinsics that require

[libunwind] [libunwind] [SEH] Set NonVolatileRegisters before calling a personality function (PR #137951)

2025-05-02 Thread Martin Storsjö via cfe-commits
@@ -212,6 +212,11 @@ __libunwind_seh_personality(int version, _Unwind_Action state, ms_exc.ExceptionInformation[2] = state; DISPATCHER_CONTEXT *disp_ctx = __unw_seh_get_disp_ctx((unw_cursor_t *)context); +#if defined(__aarch64__) + disp_ctx->NonVolatileRegisters = (

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

2025-05-02 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/138251 >From 114ba17da2f522c5fd5045f5030a44fe13b3af27 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 2 May 2025 12:46:48 +0200 Subject: [PATCH 1/2] [ErrorHandling] Add reportFatalInternalError + reportFatalUsage

[clang] [llvm] [OpenMP] Remove "alternativeName" from Clause and Directive classes (PR #138179)

2025-05-02 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: @alexey-bataev Are you ok with the change in SemaOpenMP? https://github.com/llvm/llvm-project/pull/138179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-05-02 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/137996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-05-02 Thread Zishan Mirza via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [HLSL] Implement the `ldexp` intrinsic (PR #138182)

2025-05-02 Thread Farzon Lotfi via cfe-commits
farzonl wrote: Might be worth looking at usages of ldexp in https://github.com/microsoft/DirectX-Graphics-Samples/tree/master/MiniEngine/Core/Shaders/PixelPacking_RGBE.hlsli specically lines 52 and 79 and make sure their is no ambiguous cases to answer @V-FEXrt question here: https://github.

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes Null pointer constants require a bit of extra effort to handle in C. Fixes #138145 --- Full diff: https://github.com/llvm/llvm-project/pull/138271.diff 2 Files Affected: - (modified) clang/lib/Sema/

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/138271 >From 6360cf51134d978b1ee8b6615128922eb3726d97 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 2 May 2025 07:35:57 -0400 Subject: [PATCH 1/2] Handle null pointer constants properly --- clang/lib/S

[clang] [C] Update the -Wdefault-const-init-unsafe wording (PR #138266)

2025-05-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I'm not sure I buy the justification, and the flag-diag there is perhaps 'cute' (and frankly, if we find ourself doing that again, I would vastly prefer we do something like this in tablegen/Diagnostics directly to auto generate/check t

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-02 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 c,cpp -- clang/lib/Sema/SemaExpr.cpp clang/test/Sema/implici

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-05-02 Thread Daan De Meyer via cfe-commits
@@ -4226,6 +4226,19 @@ the configuration (without a prefix: ``Auto``). ``ClassImpl.hpp`` would not have the main include file put on top before any other include. +.. _IncludeSortKey: + +**IncludeSortKey** (``IncludeSortKeyDiscriminator``) :versionbadge:`clang-format 20`

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-05-02 Thread David Green via cfe-commits
https://github.com/davemgreen updated https://github.com/llvm/llvm-project/pull/135064 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/138271 >From 6360cf51134d978b1ee8b6615128922eb3726d97 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 2 May 2025 07:35:57 -0400 Subject: [PATCH 1/4] Handle null pointer constants properly --- clang/lib/S

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/138271 >From 6360cf51134d978b1ee8b6615128922eb3726d97 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 2 May 2025 07:35:57 -0400 Subject: [PATCH 1/3] Handle null pointer constants properly --- clang/lib/S

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-02 Thread Aaron Ballman via cfe-commits
@@ -13958,7 +13979,11 @@ QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, LHSType->isObjCObjectPointerType( ConvTy = AssignConvertType::Compatible; +<<< HEAD AaronBallman wrote: Yeah, I just hit that error in my

[clang] a4ceac7 - [C23] Implement WG14 N3037 (#132939)

2025-05-02 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-05-02T09:19:21-04:00 New Revision: a4ceac7e3e04c32cb3e334eb89b54d8e99a298f8 URL: https://github.com/llvm/llvm-project/commit/a4ceac7e3e04c32cb3e334eb89b54d8e99a298f8 DIFF: https://github.com/llvm/llvm-project/commit/a4ceac7e3e04c32cb3e334eb89b54d8e99a298f8.diff

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-05-02 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137840 >From 7e2463f6fb9a3d64b1be25f2ea6ea91de2d4e982 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 29 Apr 2025 18:26:36 +0200 Subject: [PATCH] clang-format: Add IncludeSortKey option Sorting by stem giv

[clang] [C23] Implement WG14 N3037 (PR #132939)

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

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-02 Thread Erich Keane via cfe-commits
@@ -13958,7 +13979,11 @@ QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, LHSType->isObjCObjectPointerType( ConvTy = AssignConvertType::Compatible; +<<< HEAD erichkeane wrote: bad merge! Below too https://githu

[clang] [llvm] [PowerPC] frontend get target feature from backend with cpu name (PR #137670)

2025-05-02 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/137670 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-05-02 Thread Nikita Popov via cfe-commits
@@ -250,6 +250,32 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, return CurStatus; } +static bool IsKeywordInCpp(unsigned Flags) { + while (Flags != 0) { +unsigned CurFlag = Flags & ~(Flags - 1); +Flags = Flags & ~CurFlag; +switch (static

[clang] [C] Update the -Wdefault-const-init-unsafe wording (PR #138266)

2025-05-02 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I'm not sure I buy the justification FWIW, this came from a post-commit review comment: https://github.com/llvm/llvm-project/pull/137166#discussion_r2070615023 >, and the flag-diag there is perhaps 'cute' (and frankly, if we find ourself >doing that again, I would vastly

[clang] [Clang] Bypass TAD during overload resolution if a perfect match exists (PR #136203)

2025-05-02 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Please take a look, so far it seems like it should be reverted. https://github.com/llvm/llvm-project/pull/136203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Update the -Wdefault-const-init-unsafe wording (PR #138266)

2025-05-02 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I'm not sure I buy the justification > > FWIW, this came from a post-commit review comment: [#137166 > (comment)](https://github.com/llvm/llvm-project/pull/137166#discussion_r2070615023) > > > , and the flag-diag there is perhaps 'cute' (and frankly, if we find > > ourse

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-05-02 Thread Zishan Mirza via cfe-commits
zimirza wrote: > > `localtime_s` was removed from #110363, and will be added to a new pull > > request and `ctime_s` has not been merged yet (#110676). It might be a good > > wait before merging this pull request. > > I think it is better to remove `localtime_s` and `ctime_s` from this pull >

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

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

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-05-02 Thread Aaron Ballman via cfe-commits
@@ -250,6 +250,32 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, return CurStatus; } +static bool IsKeywordInCpp(unsigned Flags) { + while (Flags != 0) { +unsigned CurFlag = Flags & ~(Flags - 1); +Flags = Flags & ~CurFlag; +switch (static

[clang] [Clang] Implement CWG3005 Function parameters should never be name-independent (PR #138245)

2025-05-02 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/138245 >From 63aedb490ecdb251a5005f40e8e1bd3dd2f89e70 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 2 May 2025 10:53:38 +0200 Subject: [PATCH 1/2] [Clang] Implement CWG3005 Function parameters should never

[clang] [Clang] Fix handling of reference types in tryEvaluateBuiltinObjectSize (PR #138247)

2025-05-02 Thread Erich Keane via cfe-commits
@@ -623,6 +623,8 @@ Bug Fixes to C++ Support - Clang now emits a warning when class template argument deduction for alias templates is used in C++17. (#GH133806) - Fix a crash when checking the template template parameters of a dependent lambda appearing in an alias declaratio

[clang] [Clang] Fix handling of reference types in tryEvaluateBuiltinObjectSize (PR #138247)

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

[clang] 0b2ab11 - Simplify implementation; NFC

2025-05-02 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-05-02T09:39:20-04:00 New Revision: 0b2ab11321d2b400987e9ade28a221dff67aea7d URL: https://github.com/llvm/llvm-project/commit/0b2ab11321d2b400987e9ade28a221dff67aea7d DIFF: https://github.com/llvm/llvm-project/commit/0b2ab11321d2b400987e9ade28a221dff67aea7d.diff

[clang] [Driver] Fix _XOPEN_SOURCE definition on Solaris (PR #137141)

2025-05-02 Thread Rainer Orth via cfe-commits
rorth wrote: /cherry-pick e71c8ea3cc73c8f7b0382468f355a254166d3a72 https://github.com/llvm/llvm-project/pull/137141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix _XOPEN_SOURCE definition on Solaris (PR #137141)

2025-05-02 Thread Rainer Orth via cfe-commits
https://github.com/rorth milestoned https://github.com/llvm/llvm-project/pull/137141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix _XOPEN_SOURCE definition on Solaris (PR #137141)

2025-05-02 Thread Rainer Orth via cfe-commits
rorth wrote: This patch is required to build `flang` on Solaris/amd64. Until very recently, a 2-stage build of `main` with `flang` included worked with `clang-20` as build compiler since `flang` was only built in stage 2 and the freshly built `clang-21` does include the patch.. However, now

[clang] [Clang][Driver] Fix target parsing for -fveclib=libmvec option. (PR #138288)

2025-05-02 Thread Benjamin Maxwell via cfe-commits
@@ -934,7 +934,7 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, std::optional OptVal = llvm::StringSwitch>(ArgVecLib->getValue()) .Case("Accelerate", "Accelerate") -.Case("LIBMVEC", "LIBMVEC-X86") +

[clang] [clang][analyzer][NFC] Improve Clang Static Analyzer performance. (PR #138295)

2025-05-02 Thread via cfe-commits
https://github.com/tigbr created https://github.com/llvm/llvm-project/pull/138295 This patch improves the performance of the Clang Static Analyzer by passing separate `BumpPtrAllocator` instances to its data structures instead of using the `BumpPtrAllocator` of the ExplodedGraph everywhere. I

[clang] [clang][analyzer][NFC] Improve Clang Static Analyzer performance. (PR #138295)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (tigbr) Changes This patch improves the performance of the Clang Static Analyzer by passing separate `BumpPtrAllocator` instances to its data structures instead of using the `BumpPtrAllocator` of the ExplodedGraph e

[clang] [clang][analyzer][NFC] Improve Clang Static Analyzer performance. (PR #138295)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (tigbr) Changes This patch improves the performance of the Clang Static Analyzer by passing separate `BumpPtrAllocator` instances to its data structures instead of using the `BumpPtrAllocator` of the ExplodedGraph everywhere. It gre

[clang] fix emiision of nested unused enum types with -fno-eliminate-unused-d… (PR #137818)

2025-05-02 Thread Steve Merritt via cfe-commits
@@ -1987,7 +1987,8 @@ void CGDebugInfo::CollectRecordFields( // Bump field number for next field. ++fieldNo; - } else if (CGM.getCodeGenOpts().EmitCodeView) { + } else if (CGM.getCodeGenOpts().hasMaybeUnusedDebugInfo() || + CGM.getCode

[clang] [clang][analyzer][NFC] Improve Clang Static Analyzer performance. (PR #138295)

2025-05-02 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/include/clang/StaticAnalyzer/Core/PathSensiti

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-02 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/134016 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang-tools-extra] [NFC] Fix potential nullptr dereference. (PR #138283)

2025-05-02 Thread Baranov Victor via cfe-commits
vbvictor wrote: Did you run code sanitizer over all clang-tidy code or you only interested in this particular file? I think there are many more places where such `nullptr` dereference can happen, e.g. https://github.com/llvm/llvm-project/blob/52d2b589b2d7adc3e2b4ea503df4131e088de61f/clang-tools

[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)

2025-05-02 Thread via cfe-commits
@@ -428,6 +429,52 @@ mlir::LogicalResult CIRGenFunction::emitBreakStmt(const clang::BreakStmt &s) { return mlir::success(); } +const CaseStmt *CIRGenFunction::foldCaseStmt(const clang::CaseStmt &s, + mlir::Type condType, +

[clang] [Clang][Driver] Fix target parsing for -fveclib=libmvec option. (PR #138288)

2025-05-02 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue approved this pull request. LGTM, thanks :+1: There's one other use of "LIBMVEC" in flang that looks suspicious, but I've not check if it's actually an issue: https://github.com/llvm/llvm-project/blob/d6dbe7799e638702309e23fc7b73d4be2231e2ac/flang/lib/Frontend/Compil

[clang] [CUDA][HIP] Fix implicit attribute of builtin (PR #138162)

2025-05-02 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/138162 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [CUDA][HIP] Fix implicit attribute of builtin (PR #138162)

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

[clang] [CIR] Upstream local initialization for VectorType (PR #138107)

2025-05-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/138107 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang-tools-extra] [NFC] Fix potential nullptr dereference. (PR #138283)

2025-05-02 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > This is not needed IMO. This is a simple matcher, `op` is expected to always > be bound. > > One might say that it can't hurt to add extra checks, but I don't think > that's good justification for adding more code / bloat, even if in this case > it's a single line. Still, 5%

[clang] [CIR] Refactor global variable emission and initialization (PR #138222)

2025-05-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper approved this pull request. https://github.com/llvm/llvm-project/pull/138222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix implicit attribute of builtin (PR #138162)

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

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-05-02 Thread Krzysztof Drewniak via cfe-commits
@@ -2641,6 +2641,28 @@ def int_amdgcn_perm : // GFX9 Intrinsics //===--===// +/// This is a general-purpose intrinsic for all operations that take a pointer +/// a base location in LDS, and a data size and us

[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)

2025-05-02 Thread Andy Kaylor via cfe-commits
@@ -428,6 +429,52 @@ mlir::LogicalResult CIRGenFunction::emitBreakStmt(const clang::BreakStmt &s) { return mlir::success(); } +const CaseStmt *CIRGenFunction::foldCaseStmt(const clang::CaseStmt &s, + mlir::Type condType, +

[clang] [CUDA][HIP] Fix host/device attribute of builtin (PR #138162)

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

[clang] [CIR] Refactor global variable emission and initialization (PR #138222)

2025-05-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/138222 >From b3ae2d60a178f3c5bb8950804041386a667abc6e Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 29 Apr 2025 15:47:01 -0700 Subject: [PATCH 1/3] [CIR] Refactor global variable emission and initialization

[clang] e59ed0f - [Clang] __has_unique_object_representations should not accept Incomplete[] (#138291)

2025-05-02 Thread via cfe-commits
Author: cor3ntin Date: 2025-05-02T19:36:53+02:00 New Revision: e59ed0fb0f3324ae3fce4080e15472a316713dfd URL: https://github.com/llvm/llvm-project/commit/e59ed0fb0f3324ae3fce4080e15472a316713dfd DIFF: https://github.com/llvm/llvm-project/commit/e59ed0fb0f3324ae3fce4080e15472a316713dfd.diff LOG:

[clang] [Clang] __has_unique_object_representations should not accept Incomplete[] (PR #138291)

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

[clang] [clang] UEFI default ABI (PR #138364)

2025-05-02 Thread Prabhu Rajasekaran via cfe-commits
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/138364 Set MS ABI as default ABI for UEFI. >From d0786948b07adb0318a19562c9a9ee72e893feef Mon Sep 17 00:00:00 2001 From: prabhukr Date: Fri, 2 May 2025 23:38:40 + Subject: [PATCH] [clang] UEFI default ABI Set MS

[clang] [clang] UEFI default ABI (PR #138364)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Prabhu Rajasekaran (Prabhuk) Changes Set MS ABI as default ABI for UEFI. --- Full diff: https://github.com/llvm/llvm-project/pull/138364.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Arch/X86.cpp (+1-1)

[clang] [clang] Remove FEM_Indeterminable (PR #137661)

2025-05-02 Thread Marius Cornea via cfe-commits
marius-cornea wrote: An after-the-fact note: for Intel math libraries, this does not matter at all, as we never use FLT_EVAL_METHOD in our code. We use however other methods to achieve the effect we want, i.e., the equivalent of FLT_EVAL_METHOD = 0 (source). We use fp-model precise, or sometim

<    1   2   3   4   5   6   7   >