[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2025-01-31 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Much better! Thanks a lot for working on this https://github.com/llvm/llvm-project/pull/117437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [clang][CodeGenOpenCL][NFC] Remove redundant map lookups (PR #125285)

2025-01-31 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/125285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 65708ba - [clang][CodeGenOpenCL][NFC] Remove redundant map lookups (#125285)

2025-01-31 Thread via cfe-commits
Author: Balazs Benics Date: 2025-02-01T08:21:15+01:00 New Revision: 65708bad579229cd7f62b8d0eaefda4bb20eb6d8 URL: https://github.com/llvm/llvm-project/commit/65708bad579229cd7f62b8d0eaefda4bb20eb6d8 DIFF: https://github.com/llvm/llvm-project/commit/65708bad579229cd7f62b8d0eaefda4bb20eb6d8.diff

[clang] [clang][mutation analyzer][NFC] Simplify code in ExprMutationAnalyzer (PR #125283)

2025-01-31 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/125283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0d21ef4 - [clang][mutation analyzer][NFC] Simplify code in ExprMutationAnalyzer (#125283)

2025-01-31 Thread via cfe-commits
Author: Balazs Benics Date: 2025-02-01T08:20:47+01:00 New Revision: 0d21ef4e6c50c7d4d591adf7e6dbd6232e8a99c4 URL: https://github.com/llvm/llvm-project/commit/0d21ef4e6c50c7d4d591adf7e6dbd6232e8a99c4 DIFF: https://github.com/llvm/llvm-project/commit/0d21ef4e6c50c7d4d591adf7e6dbd6232e8a99c4.diff

[clang] [clang][dataflow][NFC] Remove double lookup (PR #125282)

2025-01-31 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/125282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d0a142e - [clang][dataflow][NFC] Remove double lookup (#125282)

2025-01-31 Thread via cfe-commits
Author: Balazs Benics Date: 2025-02-01T08:20:13+01:00 New Revision: d0a142eaea03661e8399f2c1733b93d21d55dfee URL: https://github.com/llvm/llvm-project/commit/d0a142eaea03661e8399f2c1733b93d21d55dfee DIFF: https://github.com/llvm/llvm-project/commit/d0a142eaea03661e8399f2c1733b93d21d55dfee.diff

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Looks like from this patch https://lab.llvm.org/buildbot/#/builders/94/builds/4194/steps/17/logs/stdio https://github.com/llvm/llvm-project/pull/125253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Looks like from this patch > https://lab.llvm.org/buildbot/#/builders/94/builds/4194/steps/17/logs/stdio I see it's alread reverted and green. Still the URL with stack traces may help to fix the issue. https://github.com/llvm/llvm-project/pull/125253 ___

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Vitaly Buka via cfe-commits
@@ -27,7 +27,7 @@ bool InterpState::inConstantContext() const { } InterpState::~InterpState() { - while (Current) { + while (Current && !Current->isBottomFrame()) { vitalybuka wrote: Some reordering is needed for "InterpState S;" and "InterpFrame BottomFram

[clang] [CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125336)

2025-01-31 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/125336 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

[clang] [CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125336)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

2025-01-31 Thread Owen Pan via cfe-commits
owenca wrote: > Seems to also work for top-level types (`::int_64_t constexpr x{123};` works > correctly) but breaks for fully qualified types (`::std::int64_t constexpr > x{123};` becomes `::constexpr std::int64_t x{123};`) Yeah, I intentionally didn't want to use a loop for names like `A1::A

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125335)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125335)

2025-01-31 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/125335 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Timm Baeder via cfe-commits
tbaederr wrote: Damn, thanks for the revert. https://github.com/llvm/llvm-project/pull/125253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

2025-01-31 Thread Emilia Kond via cfe-commits
rymiel wrote: Seems to also work for top-level types (`::int_64_t constexpr x{123};` works correctly) but breaks for fully qualified types (`::std::int64_t constexpr x{123};` becomes `::constexpr std::int64_t x{123};`) https://github.com/llvm/llvm-project/pull/125327 __

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2025-01-31 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/117437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2025-01-31 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/117437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2025-01-31 Thread via cfe-commits
yronglin wrote: > I'm WAY happier with this. I don't have the ability to review the SA stuff > well enough to give an approval, but the rest of the stuff is good. 1 Nit, > else LGTM. Thanks for the review! There are no functional changes in Static Analyzer after @steakhal's +1 (just renamed a

[clang] Revert "[clang][bytecode] Stack-allocate bottom function frame" (PR #125325)

2025-01-31 Thread Jorge Gorbe Moya via cfe-commits
https://github.com/slackito closed https://github.com/llvm/llvm-project/pull/125325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 386af4a - Revert "[clang][bytecode] Stack-allocate bottom function frame" (#125325)

2025-01-31 Thread via cfe-commits
Author: Jorge Gorbe Moya Date: 2025-01-31T20:09:14-08:00 New Revision: 386af4a5c64ab75eaee2448dc38f2e34a40bfed0 URL: https://github.com/llvm/llvm-project/commit/386af4a5c64ab75eaee2448dc38f2e34a40bfed0 DIFF: https://github.com/llvm/llvm-project/commit/386af4a5c64ab75eaee2448dc38f2e34a40bfed0.di

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2025-01-31 Thread via cfe-commits
@@ -5570,8 +5570,10 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc, /*SkipImmediateInvocations=*/NestedDefaultChecking)) return ExprError(); + Expr *RewrittenExpr = Init == Param->getDefaultArg() ? nullptr : Init; yronglin wr

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2025-01-31 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/117437 >From b5117efb5ec147a73e265023c5e3d6d9f2d750b7 Mon Sep 17 00:00:00 2001 From: yronglin Date: Sat, 1 Feb 2025 00:09:16 +0800 Subject: [PATCH 1/2] [Analyzer][CFG] Correctly handle rebuilt default arg and default

[clang] [Feature]: support for the BC library file into the compile dependencies (PR #119513)

2025-01-31 Thread via cfe-commits
zhouronghua wrote: ping https://github.com/llvm/llvm-project/pull/119513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Emit warnings on incorrect AVR interrupt/signal handlers (PR #125328)

2025-01-31 Thread Ben Shi via cfe-commits
benshi001 wrote: AVR interrupt/signal handlers must be `void` and has no argument. https://github.com/llvm/llvm-project/pull/125328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Emit warnings on incorrect AVR interrupt/signal handlers (PR #125328)

2025-01-31 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/125328 >From e9669133f46c409c4a5ee5cdd00cab2dc941a254 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Mon, 27 Jan 2025 13:04:45 +0800 Subject: [PATCH] [clang][Sema] Emit warnings about incorrect AVR interrupt/signal ha

[clang] [clang][Sema] Emit warnings on incorrect AVR interrupt/signal handlers (PR #125328)

2025-01-31 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/125328 >From 5ff3c98370a583d5619ba2a6ac5a605f87de7361 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Mon, 27 Jan 2025 13:04:45 +0800 Subject: [PATCH] [clang][Sema] Warning about incorrect AVR interrupt/signal handlers

[clang] [clang][Sema] Emit warnings on incorrect AVR interrupt/signal handlers (PR #125328)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Ben Shi (benshi001) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125328.diff 6 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticSemaKinds.td (+2-2) - (modified) clang/lib/Sema/SemaAVR.cpp (

[clang] [clang][Sema] Emit warnings on incorrect AVR interrupt/signal handlers (PR #125328)

2025-01-31 Thread Ben Shi via cfe-commits
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/125328 None >From 6f2fc35842a4a3647600da99342209bda4eb72f9 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Mon, 27 Jan 2025 13:04:45 +0800 Subject: [PATCH] [clang][Sema] Warning about incorrect AVR interrupt/signal ha

[clang] [Driver] Refactor option '-mlink-bitcode-file'. (PR #125322)

2025-01-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/15055 Here is the releva

[clang] 280609c - [clang-format][NFC] Minor improvement to FormatToken::isTypeName()

2025-01-31 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2025-01-31T18:52:53-08:00 New Revision: 280609c215e4a684cad215ea5be913293de0d255 URL: https://github.com/llvm/llvm-project/commit/280609c215e4a684cad215ea5be913293de0d255 DIFF: https://github.com/llvm/llvm-project/commit/280609c215e4a684cad215ea5be913293de0d255.diff LOG:

[clang] [Driver] Refactor option '-mlink-bitcode-file'. (PR #125322)

2025-01-31 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 closed https://github.com/llvm/llvm-project/pull/125322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f73f5af - [Driver] Refactor option '-mlink-bitcode-file'. (#125322)

2025-01-31 Thread via cfe-commits
Author: Amit Kumar Pandey Date: 2025-02-01T08:15:37+05:30 New Revision: f73f5af442d5dfa762b69a82f0c2cdf8898b9060 URL: https://github.com/llvm/llvm-project/commit/f73f5af442d5dfa762b69a82f0c2cdf8898b9060 DIFF: https://github.com/llvm/llvm-project/commit/f73f5af442d5dfa762b69a82f0c2cdf8898b9060.d

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

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

[clang] [clang-format] Hanlde qualified type names (PR #125327)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #125178. --- Full diff: https://github.com/llvm/llvm-project/pull/125327.diff 2 Files Affected: - (modified) clang/lib/Format/QualifierAlignmentFixer.cpp (+7-1) - (modified) clang/unittests/Format

[clang] [clang-format] Hanlde qualified type names (PR #125327)

2025-01-31 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/125327 Fixes #125178. >From af3d964d74634f0dd9f7216572c1d852b7a549dc Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 31 Jan 2025 18:32:33 -0800 Subject: [PATCH] [clang-format] Hanlde qualified type names Fixes #125

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-31 Thread via cfe-commits
GeorgeKA wrote: > Phew, first round in. Please don't take the number of suggestions as a > negative, the basic structure looks good there's just many small tweaks to be > made :). Thanks for all the comments @Maetveis . I worked my way through them, and this is ready for another look. The out

[clang] [clang-format] Fix a bug in annotating ClassHeadName (PR #125326)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125326.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+1-1) - (modified) clang/unittests/Format/TokenAnnotatorTes

[clang] [clang-format] Fix a bug in annotating ClassHeadName (PR #125326)

2025-01-31 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/125326 None >From d2a9862cb4f88ebb92f0d5266ffd80aec51b8f04 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 31 Jan 2025 18:19:37 -0800 Subject: [PATCH] [clang-format] Fix a bug in annotating ClassHeadName --- clang

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Nathan Chancellor via cfe-commits
@@ -0,0 +1,85 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple aarch64-unknown-linux-gnu -DCOUNTED_BY -O2 -Wall -Wno-int-conversion -fsanitize=array-bounds,object-size,local-bounds -fstrict-flex-

[clang] Revert "[clang][bytecode] Stack-allocate bottom function frame" (PR #125325)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jorge Gorbe Moya (slackito) Changes Reverts llvm/llvm-project#125253 It introduced an msan failure. Caught by a buildbot here: https://lab.llvm.org/buildbot/#/builders/164/builds/6922/steps/17/logs/stdio --- Full diff: https://github.com

[clang] Revert "[clang][bytecode] Stack-allocate bottom function frame" (PR #125325)

2025-01-31 Thread Jorge Gorbe Moya via cfe-commits
https://github.com/slackito created https://github.com/llvm/llvm-project/pull/125325 Reverts llvm/llvm-project#125253 It introduced an msan failure. Caught by a buildbot here: https://lab.llvm.org/buildbot/#/builders/164/builds/6922/steps/17/logs/stdio >From e9ca5033e880f1f6e28692fb86c0b97a1b

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Jorge Gorbe Moya via cfe-commits
slackito wrote: The problem described above also reproduced in one of the buildbots: https://lab.llvm.org/buildbot/#/builders/164/builds/6922/steps/17/logs/stdio I'll revert this patch. https://github.com/llvm/llvm-project/pull/125253 ___ cfe-commits

[clang] [Driver] Refactor option '-mlink-bitcode-file'. (PR #125322)

2025-01-31 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/125322 >From c1c3563865977cd4bd5878f3b81992637fbded5b Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Sat, 1 Feb 2025 07:02:52 +0530 Subject: [PATCH] [Driver] Refactor option '-mlink-bitcode-file'. Associate '-

[clang] [Driver] Refactor option '-mlink-bitcode-file'. (PR #125322)

2025-01-31 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/125322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" linking. (PR #123922)

2025-01-31 Thread Amit Kumar Pandey via cfe-commits
ampandey-1995 wrote: PR https://github.com/llvm/llvm-project/pull/125322 is up for fixes. https://github.com/llvm/llvm-project/pull/123922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [Driver] Refactor option '-mlink-bitcode-file'. (PR #125322)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amit Kumar Pandey (ampandey-1995) Changes Associate '-mlink-bitcode-file' as both CC1 and FC1 option. Fixes https://gitlab.e4s.io/uo-public/llvm-openmp-offloading-v2/-/jobs/360327 --- Full diff: https://github.com/llvm/llvm-project/pull/

[clang] [Driver] Refactor option '-mlink-bitcode-file'. (PR #125322)

2025-01-31 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 created https://github.com/llvm/llvm-project/pull/125322 Associate '-mlink-bitcode-file' as both CC1 and FC1 option. Fixes https://gitlab.e4s.io/uo-public/llvm-openmp-offloading-v2/-/jobs/360327 >From c0eed4a42d294aac3237915ab83b4482936f206a Mon Sep 17 00:00:0

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-31 Thread via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/125260 >From 4801886dd4c45d32891a7337ad7430a6c5137929 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 28 Jan 2025 12:28:58 -0800 Subject: [PATCH 1/8] [CIR] Initial implementation of CIR-to-LLVM IR lowering pa

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Jorge Gorbe Moya via cfe-commits
@@ -27,7 +27,7 @@ bool InterpState::inConstantContext() const { } InterpState::~InterpState() { - while (Current) { + while (Current && !Current->isBottomFrame()) { slackito wrote: This is causing use-after-destruction errors for me when running clang tests

[clang] [llvm] [aarch64][x86][win] Add compiler support for MSVC's /funcoverride flag (Windows kernel loader replaceable functions) (PR #125320)

2025-01-31 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/125320 >From 061d2521e8db70c591e9c0d8f2e6348120cb55c1 Mon Sep 17 00:00:00 2001 From: "Daniel Paoliello (HE/HIM)" Date: Fri, 31 Jan 2025 16:47:23 -0800 Subject: [PATCH] [aarch64][x86][win] Add support for MSVC's /fun

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [llvm] [aarch64][x86][win] Add compiler support for MSVC's /funcoverride flag (Windows kernel loader replaceable functions) (PR #125320)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Daniel Paoliello (dpaoliello) Changes Adds support for MSVC's undocumented `/funcoverride` flag, which marks functions as being replaceable by the Windows kernel loader. This is used to allow functions to be upgraded depending on the ca

[clang] [llvm] [aarch64][x86][win] Add compiler support for MSVC's /funcoverride flag (Windows kernel loader replaceable functions) (PR #125320)

2025-01-31 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello created https://github.com/llvm/llvm-project/pull/125320 Adds support for MSVC's undocumented `/funcoverride` flag, which marks functions as being replaceable by the Windows kernel loader. This is used to allow functions to be upgraded depending on the capabilitie

[clang] [-Wunsafe-buffer-usage] Fix assert when constexpr size passed to snprintf() (#119786) (PR #124022)

2025-01-31 Thread Thomas Sepez via cfe-commits
tsepez wrote: Ping https://github.com/llvm/llvm-project/pull/124022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-01-31 Thread Sarah Spall via cfe-commits
https://github.com/spall ready_for_review https://github.com/llvm/llvm-project/pull/123977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Bill Wendling via cfe-commits
https://github.com/bwendling edited https://github.com/llvm/llvm-project/pull/125298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/125298 >From df6b80c82f1a9ce4f1eef580f008c86fd691ba71 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 31 Jan 2025 12:48:36 -0800 Subject: [PATCH 1/3] [Clang][counted_by] Don't treat a pointer as an array If

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-01-31 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/125319 >From 1e194fdf6dc731276cd867501708b348e3bbc97c Mon Sep 17 00:00:00 2001 From: Icohedron Date: Mon, 27 Jan 2025 11:18:09 -0800 Subject: [PATCH 1/3] Implement AddUint64 HLSL codegen and sema --- clang/include/

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-01-31 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 95d993a838863269dc1b90de3808c1e40ac6d5f2 2bc239b3e7fce57899c2b54089005a73e8aff1c5 --e

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Bill Wendling via cfe-commits
bwendling wrote: Oops! I forgot to push the testcases :) https://github.com/llvm/llvm-project/pull/125298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/125298 >From df6b80c82f1a9ce4f1eef580f008c86fd691ba71 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 31 Jan 2025 12:48:36 -0800 Subject: [PATCH 1/2] [Clang][counted_by] Don't treat a pointer as an array If

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Deric Cheung (Icohedron) Changes This PR addresses #99205 - Implements the HLSL intrinsic `AddUint64` used to perform unsigned 64-bit integer addition by using pairs of unsigned 32-bit integers instead of native 64-bit types -

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-01-31 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron created https://github.com/llvm/llvm-project/pull/125319 This PR addresses #99205 - Implements the HLSL intrinsic `AddUint64` used to perform unsigned 64-bit integer addition by using pairs of unsigned 32-bit integers instead of native 64-bit types - The LLVM i

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Bill Wendling via cfe-commits
bwendling wrote: I got a testcase from creduce. It's similar to your testcase. Basically, it's indexing into a pointer field, which isn't going to give the correct result either way. I expect that it's indexing into an array instead. https://github.com/llvm/llvm-project/pull/125298 ___

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-01-31 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/123977 >From 50f8b16bf83d70cc37f2ac7e70c9195a4c4cda02 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Thu, 16 Jan 2025 01:32:25 + Subject: [PATCH 01/10] wip --- clang/lib/CodeGen/CGExpr.cpp | 19

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-31 Thread Artem Belevich via cfe-commits
Artem-B wrote: Issuing the warning suppression every time a TU happens to see a perfectly valid use of the attribute in the host code (even transitively, in someone else's headers), would be counterproductive, IMO. The only response to the warning is to suppress it (i.e. there's nothing for th

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/125260 >From 4801886dd4c45d32891a7337ad7430a6c5137929 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 28 Jan 2025 12:28:58 -0800 Subject: [PATCH 1/7] [CIR] Initial implementation of CIR-to-LLVM IR lowering pa

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-01-31 Thread Shafik Yaghmour via cfe-commits
@@ -180,3 +182,11 @@ void test2() { // expected-error@-3 {{use of undeclared identifier}} // expected-note@-4 {{cannot use initializer list at the beginning of a macro argument}} } + +#define LIM() 10 +// expected-note@-1 {{'LIM' is defined here as a function-like macro;

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-01-31 Thread Shafik Yaghmour via cfe-commits
@@ -159,12 +160,13 @@ void test() { // expected-note@-3 {{cannot use initializer list at the beginning of a macro argument}} } -// CHECK: fix-it:"{{.*}}macro_with_initializer_list.cpp":{145:11-145:11}:"(" -// CHECK: fix-it:"{{.*}}macro_with_initializer_list.cpp":{145:23-145

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-01-31 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Adding to the current comments. https://github.com/llvm/llvm-project/pull/123495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-01-31 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/123495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM once the remaining comments are addressed! https://github.com/llvm/llvm-project/pull/125260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/125260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-01-31 Thread Eli Friedman via cfe-commits
@@ -1596,12 +1596,14 @@ QualType Sema::BuildQualifiedType(QualType T, SourceLocation Loc, QualType ProblemTy; if (T->isAnyPointerType() || T->isReferenceType() || -T->isMemberPointerType()) { +T->isMemberPointerType() || T->isArrayType()) { Qual

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: This tentatively looks good to me. Do you need a reduced test case for this? `cvise` gave me: ```c typedef struct { char __padding[0]; } spinlock_t; struct { int priv_len; spinlock_t addr_list_lock; char *dev_addr; char priv[] __attribute__((__counted_by__(priv_len

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-31 Thread via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-31 Thread via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

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

2025-01-31 Thread Ilia Kuklin via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( kuilpd wrote: It's used i

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

2025-01-31 Thread Ilia Kuklin via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( kuilpd wrote: Alright, wi

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

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: Feel fr

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

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

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: Ah true

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/125260 >From 4801886dd4c45d32891a7337ad7430a6c5137929 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 28 Jan 2025 12:28:58 -0800 Subject: [PATCH 1/6] [CIR] Initial implementation of CIR-to-LLVM IR lowering pa

[clang] [flang] [flang] Add support for -fimplicit-none-ext option (PR #125248)

2025-01-31 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/125248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: That's

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

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

2025-01-31 Thread Ilia Kuklin via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( kuilpd wrote: Yes, but I

[clang] Add clang atomic control options and attribute (PR #114841)

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

[clang] Add clang atomic control options and attribute (PR #114841)

2025-01-31 Thread Yaxun Liu via cfe-commits
@@ -623,6 +623,10 @@ class LangOptions : public LangOptionsBase { // WebAssembly target. bool NoWasmOpt = false; + /// The default atomic codegen options specified by command line in the + /// format of key:{on|off}. + std::vector AtomicOptionsAsWritten; ---

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-01-31 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/120896 >From 295df258043ef5a87ae603eedd308b863bad7b59 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 22 Dec 2024 15:14:30 +0200 Subject: [PATCH 1/2] [Clang] allow restrict qualifier for array types with poin

[clang] [clang][dataflow][NFC] Remove double lookup (PR #125282)

2025-01-31 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/125282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][mutation analyzer][NFC] Simplify code in ExprMutationAnalyzer (PR #125283)

2025-01-31 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata approved this pull request. LGTM. Thank you for the update! https://github.com/llvm/llvm-project/pull/125283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/122951 >From 618f4a1707c1b62693c0e878040997154e7e35d6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 14 Jan 2025 22:05:43 +0300 Subject: [PATCH 1/8] [clang-tidy] add AllowedTypes to misc-const-correctness -

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-31 Thread Baranov Victor via cfe-commits
@@ -196,3 +199,13 @@ Options // The following pointer may not become a 'int *const'. int *changing_pointee = &value; changing_pointee = &result; + +.. option:: AllowedTypes + + A semicolon-separated list of names of types that will be excluded from + const-correct

  1   2   3   4   5   >