[clang] Reapply "[Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros" (PR #102135)

2025-03-17 Thread via cfe-commits
@@ -652,14 +647,14 @@ bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result, // Recognize context-sensitive C++20 'export module' and 'export import' // declarations. case tok::identifier: { - IdentifierInfo *II = NextToken().getIdentifierInfo(); - if ((II

[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)

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

[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -3302,21 +3302,20 @@ class GCCAsmStmt : public AsmStmt { friend class ASTStmtReader; SourceLocation RParenLoc; - StringLiteral *AsmStr; + Expr *AsmStr; // FIXME: If we wanted to, we could allocate all of these in one big array. - StringLiteral **Constraints = nu

[libclc] [libclc] Move fmin/fmax to the CLC library (PR #128506)

2025-03-17 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: ping, thanks https://github.com/llvm/llvm-project/pull/128506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2ff370f - Warn about virtual methods in `final` classes (#131188)

2025-03-17 Thread via cfe-commits
Author: Devon Loehr Date: 2025-03-17T15:07:31+01:00 New Revision: 2ff370f45266b14c2a86e6395042a4574701f2d2 URL: https://github.com/llvm/llvm-project/commit/2ff370f45266b14c2a86e6395042a4574701f2d2 DIFF: https://github.com/llvm/llvm-project/commit/2ff370f45266b14c2a86e6395042a4574701f2d2.diff L

[clang] [analyzer] Add [[maybe_unused]] forgotten in 57e36419b251 (PR #131617)

2025-03-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Fixes https://github.com/llvm/llvm-project/pull/131175#discussion_r1998764727 --- Full diff: https://github.com/llvm/llvm-project/pull/131617.diff 1 Files Affected: - (modified) clang/l

[clang] Warn about virtual methods in `final` classes (PR #131188)

2025-03-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clangd-ubuntu-tsan` running on `clangd-ubuntu-clang` while building `clang` at step 2 "checkout". Full details are available at: https://lab.llvm.org/buildbot/#/builders/134/builds/15203 Here is the relevant piece of the bui

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
@@ -434,6 +434,37 @@ __datasizeof ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the type ignoring tail padding. +.. _builtin_structured_binding_size-doc: + +__builtin_structured_binding_size (C++) +--- +``__bu

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-17 Thread Dmitry Sidorov via cfe-commits
https://github.com/MrSidims edited https://github.com/llvm/llvm-project/pull/131190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/131164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Use `CheckerBase::getName` in checker option handling (PR #131612)

2025-03-17 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/131612 The virtual method `ProgramPointTag::getTagDescription` had two very distinct use cases: - It is printed in the DOT graph visualization of the exploded graph (that is, a debug printout). - The checker option

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
@@ -434,6 +434,37 @@ __datasizeof ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the type ignoring tail padding. +.. _builtin_structured_binding_size-doc: + +__builtin_structured_binding_size (C++) +--- +``__bu

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-17 Thread Matt Arsenault via cfe-commits
@@ -2861,6 +2861,69 @@ def int_experimental_convergence_anchor def int_experimental_convergence_loop : DefaultAttrsIntrinsic<[llvm_token_ty], [], [IntrNoMem, IntrConvergent]>; +//===--- GPU Intrinsics ---===// + +class GPUIntr

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-17 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/129939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-17 Thread Chris B via cfe-commits
@@ -0,0 +1,59 @@ +//===--- hlsl_compat_overloads.h - Additional HLSL overload definitions for +// intrinsics --===// llvm-beanz wrote: nit: shorten the summary so this fits on one line. https://github.com/llvm/llvm-project/pull/129939 ___

[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -1958,6 +1958,24 @@ references can be used instead of numeric references. return -1; } + +Constexpr strings in GNU ASM statememts +=== + +In C++11 mode (and greater), Clang supports specifying the template, +constraints, and clobb

[libclc] [libclc] Reduce bithacking in CLC frexp (PR #129871)

2025-03-17 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: yes wrong results: ``` ERROR: frexp: {-8404992.00, 139} ulp error at 0x1.008p-140: *{0x1.008p-1, -139} vs. {0x1.008p-140, 0} ``` https://github.com/llvm/llvm-project/pull/129871 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [clang][bytecode] Fix builtin_memchr with non-0 start index (PR #131633)

2025-03-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/131633.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+5-3) - (modified) clang/test/AST/ByteCode/builtin-functions.

[clang] [clang][analyzer] Add support for C++23 container methods releated to iterator in ContainerModeling (PR #129719)

2025-03-17 Thread Balazs Benics via cfe-commits
@@ -1139,6 +1289,271 @@ void deque_insert_end(std::deque &D, int n) { // clang_analyzer_express(clang_analyzer_iterator_position(i3)); FIXME: expect warning $D.end() - 1 } +/// insert_range() +/// +/// - Design decision: shifts positions to the <-LEFT<- (i.e. all iterator +

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-03-17 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/127290 >From 3e6122744f355954edb6a5450ae4220ba39bc9c1 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Fri, 14 Feb 2025 16:53:33 -0800 Subject: [PATCH 1/4] [clang] Fix UEFI Target info For X64 UEFI targets, making the in

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-03-17 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/127290 >From 3e6122744f355954edb6a5450ae4220ba39bc9c1 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Fri, 14 Feb 2025 16:53:33 -0800 Subject: [PATCH 1/5] [clang] Fix UEFI Target info For X64 UEFI targets, making the in

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-03-17 Thread via cfe-commits
@@ -835,19 +835,39 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo public: UEFIX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : UEFITargetInfo(Triple, Opts) { +LongWidth = LongAlign = 32; +DoubleAlign = LongLongAlign = 64; +Int

[clang] [llvm] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support AMDGPU's generic target (PR #122629)

2025-03-17 Thread Yaxun Liu via cfe-commits
@@ -266,15 +266,14 @@ without differentiation based on offload kind. The target triple of the code object. See `Target Triple `_. -The bundler accepts target triples with or without the optional envir

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-17 Thread Dmitry Sidorov via cfe-commits
@@ -0,0 +1,501 @@ +//===- LowerGPUIntrinsic.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-17 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/26] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-17 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane thanks a lot for the clarification. I think I have a hang of it > now- I was kinda confused before. Now, my approach is to look through > DiagnosticXKinds.td files -> check for a `select` with a significant number > of items -> check its diagnostic ID -> grep th

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-17 Thread Hans Wennborg via cfe-commits
zmodem wrote: > but, that is still not a great reproducer for a reverted patch. Especially if > the link issue is due to a missing support in linker. I would appreciate if > you could maybe point to how exactly UnicodeString is used in failing > scenario. I'm sorry that we didn't catch this p

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -1642,6 +1661,50 @@ void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) { DD->setInvalidDecl(); } +std::optional Sema::GetDecompositionElementCount(QualType T, + SourceLocation Loc) { + con

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -4685,9 +4685,9 @@ Sema::CreateUnaryExprOrTypeTraitExpr(Expr *E, SourceLocation OpLoc, } else if (ExprKind == UETT_VecStep) { isInvalid = CheckVecStepExpr(E); } else if (ExprKind == UETT_OpenMPRequiredSimdAlign) { - Diag(E->getExprLoc(), diag::err_openmp_defaul

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -2135,9 +2135,14 @@ void ASTStmtReader::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) { void ASTStmtReader::VisitTypeTraitExpr(TypeTraitExpr *E) { VisitExpr(E); + E->TypeTraitExprBits.IsBooleanTypeTrait = Record.readInt(); erichkeane wrote: ```sug

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

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

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -1642,6 +1661,50 @@ void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) { DD->setInvalidDecl(); } +std::optional Sema::GetDecompositionElementCount(QualType T, + SourceLocation Loc) { + con

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -5327,7 +5327,19 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, } }; -switch(SAE->getKind()) { +auto MangleExtensionBuiltin = [&](const UnaryExprOrTypeTraitExpr *E, erichkeane wrote: While this is a very pleasant

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -2135,9 +2135,14 @@ void ASTStmtReader::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) { void ASTStmtReader::VisitTypeTraitExpr(TypeTraitExpr *E) { VisitExpr(E); + E->TypeTraitExprBits.IsBooleanTypeTrait = Record.readInt(); E->TypeTraitExprBits.NumArgs = Record.r

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: A few comments... this ends up being way nicer as a type trait IMO. https://github.com/llvm/llvm-project/pull/131515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -5813,6 +5817,34 @@ static ExprResult CheckConvertibilityForTypeTraits( return Result; } +static APValue EvaluateSizeTTypeTrait(Sema &S, TypeTrait Kind, + SourceLocation KWLoc, + ArrayRef Args, +

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -12102,7 +12102,12 @@ class IntExprEvaluator } bool VisitTypeTraitExpr(const TypeTraitExpr *E) { -return Success(E->getValue(), E); +if (E->isStoredAsBoolean()) + return Success(E->getBoolValue(), E); +if (E->getAPValue().isAbsent()) + return false

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-17 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- EntryPointStats.cpp --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (PR #131035)

2025-03-17 Thread Sarah Spall via cfe-commits
https://github.com/spall approved this pull request. https://github.com/llvm/llvm-project/pull/131035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 -verify=expected,c2y -pedantic -std=c2y %s +// RUN: %clang_cc1 -verify=expected,c2y,compat -Wpre-c2y-compat -std=c2y %s +// RUN: %clang_cc1 -verify=expected,ext -pedantic -std=c23 %s +// RUN: %clang_cc1 -verify=expected,cpp -pedantic -x c++ -W

[clang] 0460418 - [clang][driver][NFC] Remove else after return (#131182)

2025-03-17 Thread via cfe-commits
Author: Paul Kirth Date: 2025-03-17T10:33:19-07:00 New Revision: 046041842022f12ab04403e255ceeec25d6ce11c URL: https://github.com/llvm/llvm-project/commit/046041842022f12ab04403e255ceeec25d6ce11c DIFF: https://github.com/llvm/llvm-project/commit/046041842022f12ab04403e255ceeec25d6ce11c.diff LO

[clang] [clang][driver][NFC] Remove else after return (PR #131182)

2025-03-17 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/131182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Use rva22u64_v as the default march for Fuchsia targets (PR #131183)

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

[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -1958,6 +1958,24 @@ references can be used instead of numeric references. return -1; } + +Constexpr strings in GNU ASM statememts +=== + +In C++11 mode (and greater), Clang supports specifying the template, +constraints, and clobb

[clang] [clang][driver][NFC] Remove else after return (PR #131182)

2025-03-17 Thread Paul Kirth via cfe-commits
ilovepi wrote: ### Merge activity * **Mar 17, 1:32 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/131182). https://github.com/llvm/llvm-project/pull/131182

[clang] [llvm] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support AMDGPU's generic target (PR #122629)

2025-03-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/122629 >From ab66262e163a8c63c980d8298480556aad9c5b4c Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 17 Mar 2025 12:31:06 -0400 Subject: [PATCH 1/3] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to s

[clang] Move const qualification of array to its elements (PR #131366)

2025-03-17 Thread Serge Pavlov via cfe-commits
spavloff wrote: MR https://github.com/llvm/llvm-project/pull/131649 implements an alternative fix to the problem. https://github.com/llvm/llvm-project/pull/131366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/131515 >From ae66e1cc48c721badc234ff5bc5a89aeb6cd2ea3 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 16 Mar 2025 14:04:15 +0100 Subject: [PATCH 01/10] [Clang][RFC] Intrododuce a builtin to determine the num

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 -verify=expected,c2y -pedantic -std=c2y %s +// RUN: %clang_cc1 -verify=expected,c2y,compat -Wpre-c2y-compat -std=c2y %s +// RUN: %clang_cc1 -verify=expected,ext -pedantic -std=c23 %s +// RUN: %clang_cc1 -verify=expected,cpp -pedantic -x c++ -W

[clang] [llvm] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support AMDGPU's generic target (PR #122629)

2025-03-17 Thread Shilei Tian via cfe-commits
@@ -84,31 +84,27 @@ OffloadTargetInfo::OffloadTargetInfo(const StringRef Target, : BundlerConfig(BC) { // TODO: Add error checking from ClangOffloadBundler.cpp - auto TargetFeatures = Target.split(':'); - auto TripleOrGPU = TargetFeatures.first.rsplit('-'); - - if (cl

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/131557 >From 015964e72ebc223bcd191ceb306de8fdbca360f3 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 17 Mar 2025 13:52:06 -0400 Subject: [PATCH] [DataLayout] Introduce sentinel pointer value MIME-Version: 1.0 C

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/131557 >From efda127ecd06ea966df89425d10bd837c0cafe4e Mon Sep 17 00:00:00 2001 From: Ryotaro Kasuga Date: Mon, 17 Mar 2025 13:45:09 +0900 Subject: [PATCH] [DataLayout] Introduce sentinel pointer value MIME-Version: 1.

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/131626 >From f3c0bc1d271495372b56716e87f033e43aa022b3 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 17 Mar 2025 11:12:56 -0400 Subject: [PATCH 1/6] [C2y] Add octal prefixes, deprecate unprefixed octals

[clang] [alpha.webkit.UncountedCallArgsChecker] os_log functions should be treated as safe. (PR #131500)

2025-03-17 Thread Rashmi Mudduluru via cfe-commits
@@ -695,9 +695,13 @@ RefPtr object(); void someFunction(const RefCounted&); void test2() { -someFunction(*object()); + someFunction(*object()); } void system_header() { callMethod(object); } + +void log(RefCountable* obj) { + os_log_msg(os_log_create("WebKit", "D

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
@@ -0,0 +1,168 @@ +// RUN: %clang_cc1 %s -std=c++2c -fsyntax-only -verify + +struct S0 {}; +struct S1 {int a;}; +struct S2 {int a; int b;}; +struct S3 {double a; int b; int c;}; + + + +struct SD : S1 {}; +struct SE1 : S1 { int b;}; + +class P1 {int a;}; // #note-private + + +temp

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-17 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff created https://github.com/llvm/llvm-project/pull/131649 Const-qualification of an array caused by constexpr specifier can produce QualType, where the const qualifier is set both as fast qualifier and as a qualifier of the array element type. It can result in a comp

[clang] [clang][driver] Use rva22u64_v as the default march for Fuchsia targets (PR #131183)

2025-03-17 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/131183 >From 8ea1c3731175dfcd3c44a4917d1b5f96a81ad9c6 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Thu, 13 Mar 2025 10:19:56 -0700 Subject: [PATCH] [clang][driver] Use rva22u64_v as the default march for Fuchsia ta

[clang] [llvm] update_test_checks: add new --filter-out-after option (PR #129739)

2025-03-17 Thread David Sherwood via cfe-commits
david-arm wrote: > I'd be fine with limiting it to update_test_checks, just wanted to make sure > that it works in the instances where it's available. Of course, if we can get > it in the other scripts for free that's great, too! That said, for > update_test_checks, does the regex match the in

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Serge Pavlov (spavloff) Changes Const-qualification of an array caused by constexpr specifier can produce QualType, where the const qualifier is set both as fast qualifier and as a qualifier of the array element type. It can result in a c

[clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2025-03-17 Thread Alex Hoppen via cfe-commits
https://github.com/ahoppen updated https://github.com/llvm/llvm-project/pull/82061 >From 1285081e8fc7d7ecd162ed8ec7201437dbd708da Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Mon, 29 Jul 2024 17:33:43 -0700 Subject: [PATCH] [clangd] Use `RenameSymbolName` to represent Objective-C selectors

[clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2025-03-17 Thread Alex Hoppen via cfe-commits
ahoppen wrote: Thanks for the review, @DavidGoldman. I addressed your comments. https://github.com/llvm/llvm-project/pull/82061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -1873,19 +1874,54 @@ TypeTraitExpr::TypeTraitExpr(QualType T, SourceLocation Loc, TypeTrait Kind, setDependence(computeDependence(this)); } +TypeTraitExpr::TypeTraitExpr(QualType T, SourceLocation Loc, TypeTrait Kind, + ArrayRef Args, +

[clang] b3c5031 - [HLSL] Remove HLSLResource attribute (#130342)

2025-03-17 Thread via cfe-commits
Author: Helena Kotas Date: 2025-03-17T10:00:07-07:00 New Revision: b3c5031b07396959c5d4e7f62d516d63de015358 URL: https://github.com/llvm/llvm-project/commit/b3c5031b07396959c5d4e7f62d516d63de015358 DIFF: https://github.com/llvm/llvm-project/commit/b3c5031b07396959c5d4e7f62d516d63de015358.diff

[clang] Move const qualification of array to its elements (PR #131366)

2025-03-17 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff closed https://github.com/llvm/llvm-project/pull/131366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/131557 >From 053949d4dd8f28a2daa57a6143f0267c0bd3af6c Mon Sep 17 00:00:00 2001 From: Ryotaro Kasuga Date: Mon, 17 Mar 2025 13:45:09 +0900 Subject: [PATCH 1/2] [LoopVectorize] Add test for follow-up metadata for loops

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-17 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/129939 >From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Tue, 4 Mar 2025 09:53:56 -0800 Subject: [PATCH 01/16] extra scalar vector overloads for clamp --- .../lib/Headers/h

[clang] [clang] Mark some language options as benign. (PR #131569)

2025-03-17 Thread via cfe-commits
matts1 wrote: For now I've removed everything but the TrivialAuto* https://github.com/llvm/llvm-project/pull/131569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -434,6 +434,37 @@ __datasizeof ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the type ignoring tail padding. +.. _builtin_structured_binding_size-doc: + +__builtin_structured_binding_size (C++) +--- +``__bu

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-17 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: Patch opposed internally. Will see if I can think of an alternative. https://github.com/llvm/llvm-project/pull/131190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-17 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield closed https://github.com/llvm/llvm-project/pull/131190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-17 Thread Ayokunle Amodu via cfe-commits
ayokunle321 wrote: @erichkeane thanks a lot for the clarification. I think I have a hang of it now- I was kinda confused before. Now, my approach is to look through DiagnosticXKinds.td files -> check for a `select` with a significant number of items -> check its diagnostic ID -> grep the lib d

[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)

2025-03-17 Thread via cfe-commits
@@ -1958,6 +1958,24 @@ references can be used instead of numeric references. return -1; } + +Constexpr strings in GNU ASM statememts +=== + +In C++11 mode (and greater), Clang supports specifying the template, +constraints, and clobb

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-17 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/28] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/131626 >From f3c0bc1d271495372b56716e87f033e43aa022b3 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 17 Mar 2025 11:12:56 -0400 Subject: [PATCH 1/2] [C2y] Add octal prefixes, deprecate unprefixed octals

[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)

2025-03-17 Thread via cfe-commits
@@ -3326,9 +3325,11 @@ class GCCAsmStmt : public AsmStmt { //===--- Asm String Analysis ---===// - const StringLiteral *getAsmString() const { return AsmStr; } - StringLiteral *getAsmString() { return AsmStr; } - void setAsmString(StringLiteral *E) { AsmStr = E; } + con

[clang] [clang] Add isOffloadingTarget function to LangOpts (PR #126956)

2025-03-17 Thread Joseph Huber via cfe-commits
@@ -4357,6 +4357,10 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Opts.OpenACCMacroOverride = A->getValue(); } + Opts.IsOffloadingTarget = + (Opts.OpenMPIsTargetDevice || Opts.SYCLIsDevice || Opts.CUDAIsDevice) && j

[clang] [clang] Add value_type attr, use it to add noalias when pass-by-value. (PR #95004)

2025-03-17 Thread Florian Hahn via cfe-commits
@@ -9242,3 +9242,15 @@ Declares that a function potentially allocates heap memory, and prevents any pot of ``nonallocating`` by the compiler. }]; } + +def ValueTypeDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``value_type`` attribute can be u

[clang] [NFC][analyzer] Use `CheckerBase::getName` in checker option handling (PR #131612)

2025-03-17 Thread Donát Nagy via cfe-commits
@@ -39,6 +39,9 @@ class ProgramPointTag { public: ProgramPointTag(void *tagKind = nullptr) : TagKind(tagKind) {} virtual ~ProgramPointTag(); + + /// The description of this program point which will be displayed when the + /// ExplodedGraph is dumped in DOT format for debu

[clang] [llvm] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support AMDGPU's generic target (PR #122629)

2025-03-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/122629 >From 16509121603e55539a5fa26420343d74c39b7963 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 17 Mar 2025 12:31:06 -0400 Subject: [PATCH] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to suppo

[clang] [clang][analyzer] Add support for C++23 container methods releated to iterator in ContainerModeling (PR #129719)

2025-03-17 Thread Balazs Benics via cfe-commits
@@ -635,6 +668,66 @@ void deque_emplace_back(std::deque &D, int n) { clang_analyzer_eval(clang_analyzer_iterator_validity(i2)); //expected-warning{{FALSE}} } +/// append_range() +/// +/// - Design decision: extends containers to the ->RIGHT-> (i.e. the stea

[clang] [clang][analyzer] Add support for C++23 container methods releated to iterator in ContainerModeling (PR #129719)

2025-03-17 Thread Balazs Benics via cfe-commits
@@ -635,6 +668,66 @@ void deque_emplace_back(std::deque &D, int n) { clang_analyzer_eval(clang_analyzer_iterator_validity(i2)); //expected-warning{{FALSE}} } +/// append_range() +/// +/// - Design decision: extends containers to the ->RIGHT-> (i.e. the +/// past-the-end p

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-03-17 Thread Fangyi Zhou via cfe-commits
fangyi-zhou wrote: May I get a re-review for the changes please? https://github.com/llvm/llvm-project/pull/128251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] update_test_checks: add new --filter-out-after option (PR #129739)

2025-03-17 Thread David Sherwood via cfe-commits
https://github.com/david-arm updated https://github.com/llvm/llvm-project/pull/129739 >From d8487a8d0fb91c0e81636959a80607b9c313bf84 Mon Sep 17 00:00:00 2001 From: David Sherwood Date: Mon, 17 Mar 2025 16:07:03 + Subject: [PATCH] update_test_checks: add new --filter-all-after option Whilst

[clang] [clang][bytecode] Fix builtin_memchr with non-0 start index (PR #131633)

2025-03-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/131633 None >From 72ace33d6a7035f193728607095493d1a5d575ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 17 Mar 2025 17:01:38 +0100 Subject: [PATCH] [clang][bytecode] Fix builtin_memchr with

[clang] [clang][analyzer] Add support for C++23 container methods releated to iterator in ContainerModeling (PR #129719)

2025-03-17 Thread Balazs Benics via cfe-commits
@@ -635,6 +668,66 @@ void deque_emplace_back(std::deque &D, int n) { clang_analyzer_eval(clang_analyzer_iterator_validity(i2)); //expected-warning{{FALSE}} } +/// append_range() +/// +/// - Design decision: extends containers to the ->RIGHT-> (i.e. the +/// past-the-end p

[clang] [clang][analyzer] Add support for C++23 container methods releated to iterator in ContainerModeling (PR #129719)

2025-03-17 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/129719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add [[maybe_unused]] forgotten in 57e36419b251 (PR #131617)

2025-03-17 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/131617 Fixes https://github.com/llvm/llvm-project/pull/131175#discussion_r1998764727 >From e00f2b1fd392079840e8b2b4876552e8e2223bea Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Mon, 17 Mar 2025 14:55:52 +0100 S

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-03-17 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/127595 >From 476819d0674af979abcbbc8967376c64506329cb Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/2] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [clang][bytecode] Check dtor instance pointers for active-ness (PR #128732)

2025-03-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/128732 >From 12b39425cf4eea776835e786de8e6a6975798d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 25 Feb 2025 17:14:36 +0100 Subject: [PATCH] [clang][bytecode] Check dtor instance pointers

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/131515 >From ae66e1cc48c721badc234ff5bc5a89aeb6cd2ea3 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 16 Mar 2025 14:04:15 +0100 Subject: [PATCH 1/8] [Clang][RFC] Intrododuce a builtin to determine the numbe

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Aaron Ballman via cfe-commits
@@ -176,7 +176,7 @@ C2y implementation status Obsolete implicitly octal literals and add delimited escape sequences https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3353.htm";>N3353 - No + Clang 21 AaronBallman wrote: Ah good point

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-17 Thread Dmitry Sidorov via cfe-commits
https://github.com/MrSidims edited https://github.com/llvm/llvm-project/pull/131190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
@@ -1642,6 +1661,50 @@ void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) { DD->setInvalidDecl(); } +std::optional Sema::GetDecompositionElementCount(QualType T, + SourceLocation Loc) { + con

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
@@ -2135,9 +2135,14 @@ void ASTStmtReader::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) { void ASTStmtReader::VisitTypeTraitExpr(TypeTraitExpr *E) { VisitExpr(E); + E->TypeTraitExprBits.IsBooleanTypeTrait = Record.readInt(); E->TypeTraitExprBits.NumArgs = Record.r

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-03-17 Thread Petr Hosek via cfe-commits
@@ -835,16 +835,22 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo public: UEFIX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : UEFITargetInfo(Triple, Opts) { +LongWidth = LongAlign = 32; +DoubleAlign = LongLongAlign = 64; +Int

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
@@ -2135,9 +2135,14 @@ void ASTStmtReader::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) { void ASTStmtReader::VisitTypeTraitExpr(TypeTraitExpr *E) { VisitExpr(E); + E->TypeTraitExprBits.IsBooleanTypeTrait = Record.readInt(); cor3ntin wrote: This is

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
@@ -5813,6 +5817,34 @@ static ExprResult CheckConvertibilityForTypeTraits( return Result; } +static APValue EvaluateSizeTTypeTrait(Sema &S, TypeTrait Kind, + SourceLocation KWLoc, + ArrayRef Args, +

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -2135,9 +2135,14 @@ void ASTStmtReader::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) { void ASTStmtReader::VisitTypeTraitExpr(TypeTraitExpr *E) { VisitExpr(E); + E->TypeTraitExprBits.IsBooleanTypeTrait = Record.readInt(); E->TypeTraitExprBits.NumArgs = Record.r

[clang] disable unary, vector mask (PR #130400)

2025-03-17 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I have no idea how much the two-argument version of __builtin_shufflevector is used in practice. I wouldn't want to remove it without a better idea of that... I vaguely recall it might be relevant for some GPU languages. It should be possible to fix the crash by just reje

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

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

  1   2   3   4   5   6   >