[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

2024-05-23 Thread Henrik G. Olsson via cfe-commits
hnrklssn wrote: Blocked by pointer support for `counted_by` reverted. It's being relanded in #93121 https://github.com/llvm/llvm-project/pull/93231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/93121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

2024-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrik G. Olsson (hnrklssn) Changes The attributes `sized_by`, `counted_by_or_null` and `sized_by_or_null` have been added as variants on `counted_by`, each with slightly different semantics. `sized_by` takes a byte size parameter

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Yeoul Na via cfe-commits
@@ -4944,6 +4944,26 @@ void Parser::ParseStructDeclaration( } } +// TODO: All callers of this function should be moved to +// `Parser::ParseLexedAttributeList`. +void Parser::ParseLexedCAttributeList(LateParsedAttrList , bool EnterScope, +

[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

2024-05-23 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn created https://github.com/llvm/llvm-project/pull/93231 The attributes `sized_by`, `counted_by_or_null` and `sized_by_or_null` have been added as variants on `counted_by`, each with slightly different semantics. `sized_by` takes a byte size parameter instead of an

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Dan Liew via cfe-commits
@@ -4944,6 +4944,26 @@ void Parser::ParseStructDeclaration( } } +// TODO: All callers of this function should be moved to +// `Parser::ParseLexedAttributeList`. +void Parser::ParseLexedCAttributeList(LateParsedAttrList , bool EnterScope, +

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes Clang has some unwritten rules about diagnostic wording regarding things like punctuation and capitalization. This patch documents those rules and adds some tablegen support for checking diagnostics

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/93229 Clang has some unwritten rules about diagnostic wording regarding things like punctuation and capitalization. This patch documents those rules and adds some tablegen support for checking diagnostics follow

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Henrik G. Olsson via cfe-commits
@@ -4944,6 +4944,26 @@ void Parser::ParseStructDeclaration( } } +// TODO: All callers of this function should be moved to +// `Parser::ParseLexedAttributeList`. +void Parser::ParseLexedCAttributeList(LateParsedAttrList , bool EnterScope, +

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Dan Liew via cfe-commits
@@ -4944,6 +4944,26 @@ void Parser::ParseStructDeclaration( } } +// TODO: All callers of this function should be moved to +// `Parser::ParseLexedAttributeList`. +void Parser::ParseLexedCAttributeList(LateParsedAttrList , bool EnterScope, +

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

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

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-05-23 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/92865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Brendan Dahl via cfe-commits
https://github.com/brendandahl updated https://github.com/llvm/llvm-project/pull/93228 >From 28cc678038feefffceba8cbe24349e1885b24c75 Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Tue, 21 May 2024 21:15:14 + Subject: [PATCH] [WebAssembly] Implement prototype f16x8.splat instruction.

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 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 dd2d132fb3521f37f44656edd65cca75430c251e 002e33294cae26796ca79a66dbd275f3e26807d2 --

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Brendan Dahl via cfe-commits
brendandahl wrote: cc @aheejin @dschuff As mentioned in the meeting, it looks like it will be a lot more work to get half value's working with normal patterns, so for now I'll stick to just built-ins and intrinsics. https://github.com/llvm/llvm-project/pull/93228

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Brendan Dahl (brendandahl) Changes Adds a builtin and intrinsic for the f16x8.splat instruction. Specified at: https://github.com/WebAssembly/half-precision/blob/29a9b9462c9285d4ccc1a5dc39214ddfd1892658/proposals/half-precision/Overview.md

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Brendan Dahl via cfe-commits
https://github.com/brendandahl created https://github.com/llvm/llvm-project/pull/93228 Adds a builtin and intrinsic for the f16x8.splat instruction. Specified at: https://github.com/WebAssembly/half-precision/blob/29a9b9462c9285d4ccc1a5dc39214ddfd1892658/proposals/half-precision/Overview.md

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-23 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/93079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-23 Thread Matheus Izvekov via cfe-commits
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema , OverloadCandidate *Cand, Expr *FromExpr = Conv.Bad.FromExpr; QualType FromTy = Conv.Bad.getFromType(); QualType ToTy = Conv.Bad.getToType(); - SourceRange ToParamRange = - !isObjectArgument ?

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-23 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov requested changes to this pull request. https://github.com/llvm/llvm-project/pull/93079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] Reland "[clang] Enable sized deallocation by default in C++14 onwards" (PR #90373)

2024-05-23 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: Thanks @vitalybuka for fixing the remain issues. It has been about 2 days since this PR was merged and there is no other issue, I think we finally make sized deallocation default this time! Cheers! https://github.com/llvm/llvm-project/pull/90373

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Yeoul Na via cfe-commits
@@ -4944,6 +4944,26 @@ void Parser::ParseStructDeclaration( } } +// TODO: All callers of this function should be moved to +// `Parser::ParseLexedAttributeList`. +void Parser::ParseLexedCAttributeList(LateParsedAttrList , bool EnterScope, +

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,196 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +#define __counted_by(f) __attribute__((counted_by(f))) + +struct bar; + +struct not_found { + int count; + struct bar *fam[] __counted_by(bork); // expected-error {{use of undeclared identifier 'bork'}} +}; +

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/93121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/93121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-23 Thread Egor Pasko via cfe-commits
https://github.com/pasko updated https://github.com/llvm/llvm-project/pull/92171 >From df3f8dfc47cd8d7b220ed712dc7c2cab1c563f50 Mon Sep 17 00:00:00 2001 From: Egor Pasko Date: Mon, 6 May 2024 19:48:59 +0200 Subject: [PATCH 01/10] wip: Move instrumentation passes This change is not ready for

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-23 Thread Egor Pasko via cfe-commits
@@ -1,41 +0,0 @@ -// REQUIRES: arm-registered-target,aarch64-registered-target - -// RUN: %clang -target armv7-unknown-none-eabi -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,UNSUPPORTED -// RUN: %clang -target armv7-unknown-none-eabi -pg -meabi gnu -S

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > FYI this causes a minor compile-time improvement in stage1 builds using gcc: > https://llvm-compile-time-tracker.com/compare.php?from=32c3561d44aa792ef08d72b5a4c342c9965bc4c2=4feae05c6abda364a9295aecfa600d7d4e7dfeb6=instructions:u > While that's nice, it does suggest that the

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93131 >From 10670795596129c33ae021a3970411b630637b80 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Wed, 22 May 2024 23:41:35 -0400 Subject: [PATCH 1/2] [clang][AST] fix ast-print of `extern ` with >=2

[clang] [Clang] Reuse tail-padding for more types that are not POD for the purpose of layout (PR #90462)

2024-05-23 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. This LGTM. Please reach out to the Fuchsia and XL folks if you can, but we don't need to hold up the PR over it. https://github.com/llvm/llvm-project/pull/90462 ___ cfe-commits mailing list

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/93121 >From 7f5af7cc180825e07b5f5292e3f6b860c8e8591e Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Fri, 17 May 2024 12:07:40 -0700 Subject: [PATCH 1/7] [BoundsSafety] Allow 'counted_by' attribute on pointers in

[clang] Fix codegen of consteval functions returning an empty class. (PR #93115)

2024-05-23 Thread Eli Friedman via cfe-commits
@@ -135,6 +135,17 @@ class AggExprEmitter : public StmtVisitor { EnsureDest(E->getType()); if (llvm::Value *Result = ConstantEmitter(CGF).tryEmitConstantExpr(E)) { + // An empty record can overlap other data (if declared with + // no_unique_address); omit

[clang-tools-extra] [clang-tidy] Optimize realpath in readability-identifier-naming (PR #92659)

2024-05-23 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: No need for release notes as this realpath stuff were added in this release anyway. So this is just a fix for degradation. https://github.com/llvm/llvm-project/pull/92659 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Optimize realpath in readability-identifier-naming (PR #92659)

2024-05-23 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. This halves the time clang-tidy takes to run this check on `IdentifierNamingCheck.cpp` for me :) Maybe add a release note? https://github.com/llvm/llvm-project/pull/92659 ___ cfe-commits

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-23 Thread via cfe-commits
cor3ntin wrote: Given that this is a core issue resolution, i think it should be applied in all language modes without warning, even under pedantics. This is compounding by the fact that MSVC never warned (gcc warns in all language modes - they don't seem to implement the DR yet) (unless we

[clang] [Clang] allow `` `@$ `` in raw string delimiters in C++26 (PR #93216)

2024-05-23 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: LGTM but I would like Tom or Aaron to also take a look https://github.com/llvm/llvm-project/pull/93216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [C] Disallow declarations where a statement is required (PR #92908)

2024-05-23 Thread via cfe-commits
@@ -467,15 +467,18 @@ class Parser : public CodeCompletionHandler { /// Flags describing a context in which we're parsing a statement. enum class ParsedStmtContext { +/// This context permits declarations in language modes where declarations +/// are not

[clang] [C] Disallow declarations where a statement is required (PR #92908)

2024-05-23 Thread via cfe-commits
@@ -239,7 +239,10 @@ StmtResult Parser::ParseStatementOrDeclarationAfterAttributes( auto IsStmtAttr = [](ParsedAttr ) { return Attr.isStmtAttr(); }; bool AllAttrsAreStmtAttrs = llvm::all_of(CXX11Attrs, IsStmtAttr) &&

[clang] [C] Disallow declarations where a statement is required (PR #92908)

2024-05-23 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/92908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Disallow declarations where a statement is required (PR #92908)

2024-05-23 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM modulo comment https://github.com/llvm/llvm-project/pull/92908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-23 Thread Felipe de Azevedo Piovezan via cfe-commits
felipepiovezan wrote: These types of changes touching a lot of projects at once can benefit from multiple PRs, one per project, as it makes partial reverts a lot easier and doesn't cause as much churn downstream (plus we can get more targeted comments from individual project owners)

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Helena Kotas via cfe-commits
@@ -290,3 +294,295 @@ void SemaHLSL::DiagnoseAttrStageMismatch( << A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage) << (AllowedStages.size() != 1) << join(StageStrings, ", "); } + +namespace { + +/// This class implements HLSL availability diagnostics for default

[clang] [clang] require template arg list after template kw (PR #80801)

2024-05-23 Thread Erick Velez via cfe-commits
evelez7 wrote: ping @Endilll https://github.com/llvm/llvm-project/pull/80801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] Run ObjCContractPass in Default Codegen Pipeline (PR #92331)

2024-05-23 Thread Nuri Amari via cfe-commits
https://github.com/NuriAmari closed https://github.com/llvm/llvm-project/pull/92331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-23 Thread Nikita Popov via cfe-commits
nikic wrote: FYI this causes a minor compile-time improvement in stage1 builds using gcc: https://llvm-compile-time-tracker.com/compare.php?from=32c3561d44aa792ef08d72b5a4c342c9965bc4c2=4feae05c6abda364a9295aecfa600d7d4e7dfeb6=instructions:u While that's nice, it does suggest that the flags

[clang] [Clang] allow `` `@$ `` in raw string delimiters in C++26 (PR #93216)

2024-05-23 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 558cb29feae6011beb2d384b1ef094bb9f7f2c27 556c622275c630b74c0f9000c5c599ff665595e1 --

[clang-tools-extra] [clang-tidy] Correcting issues in `readability-implicit-bool-conversion` on C23 (PR #92241)

2024-05-23 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson Message-ID: In-Reply-To: https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/92241 ___ cfe-commits mailing

[clang-tools-extra] 729403e - [clang-tidy] Correcting issues in `readability-implicit-bool-conversion` on C23 (#92241)

2024-05-23 Thread via cfe-commits
Author: Björn Svensson Date: 2024-05-23T18:57:21+02:00 New Revision: 729403e244c9970efa7aa17be32c197eb8e28fac URL: https://github.com/llvm/llvm-project/commit/729403e244c9970efa7aa17be32c197eb8e28fac DIFF:

[clang-tools-extra] [clang-tidy] Fix handling of members in readability-redundant-member-init (PR #93217)

2024-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes Compare class type instead of just assuming that called constructor belong to same class. Fixes #91605 --- Full diff: https://github.com/llvm/llvm-project/pull/93217.diff 3 Files Affected: -

[clang-tools-extra] [clang-tidy] Fix handling of members in readability-redundant-member-init (PR #93217)

2024-05-23 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/93217 Compare class type instead of just assuming that called constructor belong to same class. Fixes #91605 >From 6402bdd7555b8804ca4a2c392695fa81e8a87c4e Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Wed, 22

[clang] [Clang] allow `` `@$ `` in raw string delimiters in C++26 (PR #93216)

2024-05-23 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/93216 >From 556c622275c630b74c0f9000c5c599ff665595e1 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 23 May 2024 18:45:58 +0200 Subject: [PATCH] [Clang] allow `` `@$ `` in raw string delimiters in C++26 And

[clang] [Clang] allow `` `@$ `` in raw string delimiters in C++26 (PR #93216)

2024-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes And as an extension in older language modes. Per https://eel.is/c++draft/lex.string#nt:d-char Fixes #93130 --- Full diff: https://github.com/llvm/llvm-project/pull/93216.diff 6 Files Affected: - (modified)

[clang] [Clang] allow `` `@$ `` in raw string delimiters in C++26 (PR #93216)

2024-05-23 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/93216 And as an extension in older language modes. Per https://eel.is/c++draft/lex.string#nt:d-char Fixes #93130 >From fa233d79d3d27ba5c8836d971e2a8fd920cda997 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date:

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Chris B via cfe-commits
@@ -290,3 +294,295 @@ void SemaHLSL::DiagnoseAttrStageMismatch( << A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage) << (AllowedStages.size() != 1) << join(StageStrings, ", "); } + +namespace { + +/// This class implements HLSL availability diagnostics for default

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Chris B via cfe-commits
@@ -290,3 +294,295 @@ void SemaHLSL::DiagnoseAttrStageMismatch( << A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage) << (AllowedStages.size() != 1) << join(StageStrings, ", "); } + +namespace { + +/// This class implements HLSL availability diagnostics for default

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: Looks pretty good to me. A few nits that you can take or leave. The one real concern I have is that I actually don't like `getPrettyEnviromentName` being a string->string mapping. Is it possible to instead use the Triple environment enum?

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Chris B via cfe-commits
@@ -1068,11 +1068,37 @@ static llvm::StringRef getPrettyEnviromentName(llvm::StringRef Environment) { .Case("hull", "hull shader") .Case("domain", "domain shader") .Case("compute", "compute shader") + .Case("raygeneration",

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Chris B via cfe-commits
@@ -290,3 +294,295 @@ void SemaHLSL::DiagnoseAttrStageMismatch( << A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage) << (AllowedStages.size() != 1) << join(StageStrings, ", "); } + +namespace { + +/// This class implements HLSL availability diagnostics for default

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Chris B via cfe-commits
@@ -290,3 +294,295 @@ void SemaHLSL::DiagnoseAttrStageMismatch( << A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage) << (AllowedStages.size() != 1) << join(StageStrings, ", "); } + +namespace { + +/// This class implements HLSL availability diagnostics for default

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/92704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][AIX] Cast NULL as type uintptr_t. (PR #93204)

2024-05-23 Thread Xing Xue via cfe-commits
xingxue-ibm wrote: > LGTM, assuming the CI passes Thanks! Seems 3 failures are unrelated. https://github.com/llvm/llvm-project/pull/93204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Artem Yurchenko via cfe-commits
@@ -1145,13 +1145,15 @@ void DeclPrinter::VisitLinkageSpecDecl(LinkageSpecDecl *D) { l = "C++"; } + bool HasMoreThanOneDecl = + *D->decls_begin() && D->decls_begin()->getNextDeclInContext(); temyurchenko wrote: Got it!

[clang] [clang] Fix PS "selective" DLL import/export of vtable & typeinfo (PR #92579)

2024-05-23 Thread Andrew Ng via cfe-commits
@@ -1793,6 +1793,37 @@ void ItaniumCXXABI::EmitDestructorCall(CodeGenFunction , ThisTy, VTT, VTTTy, nullptr); } +// Check if any non-inline method has the specified attribute. +template +static bool CXXRecordNonInlineHasAttr(const CXXRecordDecl

[clang] [clang] Fix PS "selective" DLL import/export of vtable & typeinfo (PR #92579)

2024-05-23 Thread Andrew Ng via cfe-commits
https://github.com/nga888 updated https://github.com/llvm/llvm-project/pull/92579 >From d0b7fd1062c106f01da7d536185e1702bc09bd09 Mon Sep 17 00:00:00 2001 From: Andrew Ng Date: Mon, 22 Apr 2024 19:29:01 +0100 Subject: [PATCH 1/3] [clang] Fix PS "selective" DLL import/export of vtable &

[clang] [clang][ExtractAPI] Ensure TemplateArgumentLocations are only accessed if available (PR #93205)

2024-05-23 Thread Erick Velez via cfe-commits
https://github.com/evelez7 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/93205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread Aaron Ballman via cfe-commits
@@ -10362,12 +10362,12 @@ def err_shufflevector_argument_too_large : Error< "index for __builtin_shufflevector must be less than the total number " "of vector elements">; def err_shufflevector_minus_one_is_undefined_behavior_constexpr : Error< - "index for

[clang] [clang] fix(93002): clang/lib/Sema/SemaOpenMP.cpp:7405: Possible & / && mixup ? (PR #93093)

2024-05-23 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz approved this pull request. https://github.com/llvm/llvm-project/pull/93093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-23 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. someone with more knowledge about EGPR should approve this as well, but I'm happy with the code style for the additions. https://github.com/llvm/llvm-project/pull/92338 ___ cfe-commits

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +// CHECK: extern "C" int printf(const char *, ...); +extern "C" int printf(const char *...); + +// CHECK: extern "C++" { +// CHECK-NEXT: int f(int); +// CHECK-NEXT: int g(int); +// CHECK-NEXT: } +extern

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -1145,13 +1145,15 @@ void DeclPrinter::VisitLinkageSpecDecl(LinkageSpecDecl *D) { l = "C++"; } + bool HasMoreThanOneDecl = + *D->decls_begin() && D->decls_begin()->getNextDeclInContext(); erichkeane wrote: It just seems a bit more readable to

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/93190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -10362,12 +10362,12 @@ def err_shufflevector_argument_too_large : Error< "index for __builtin_shufflevector must be less than the total number " "of vector elements">; def err_shufflevector_minus_one_is_undefined_behavior_constexpr : Error< - "index for

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +// CHECK: extern "C" int printf(const char *, ...); +extern "C" int printf(const char *...); + +// CHECK: extern "C++" { erichkeane wrote: We don't really have much guarantees besides

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Artem Yurchenko via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +// CHECK: extern "C" int printf(const char *, ...); +extern "C" int printf(const char *...); + +// CHECK: extern "C++" { +// CHECK-NEXT: int f(int); +// CHECK-NEXT: int g(int); +// CHECK-NEXT: } +extern

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-23 Thread Egor Pasko via cfe-commits
https://github.com/pasko updated https://github.com/llvm/llvm-project/pull/92171 >From df3f8dfc47cd8d7b220ed712dc7c2cab1c563f50 Mon Sep 17 00:00:00 2001 From: Egor Pasko Date: Mon, 6 May 2024 19:48:59 +0200 Subject: [PATCH 1/9] wip: Move instrumentation passes This change is not ready for

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Artem Yurchenko via cfe-commits
@@ -1145,13 +1145,15 @@ void DeclPrinter::VisitLinkageSpecDecl(LinkageSpecDecl *D) { l = "C++"; } + bool HasMoreThanOneDecl = + *D->decls_begin() && D->decls_begin()->getNextDeclInContext(); temyurchenko wrote: Sure! For my own education

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Artem Yurchenko via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +// CHECK: extern "C" int printf(const char *, ...); +extern "C" int printf(const char *...); + +// CHECK: extern "C++" { temyurchenko wrote: Unfortunately, I'm not aware of the design

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread Aaron Ballman via cfe-commits
@@ -4526,7 +4526,7 @@ def err_objc_attr_typedef_not_void_pointer : Error< def err_objc_cf_bridged_not_interface : Error< "CF object of type %0 is bridged to %1, which is not an Objective-C class">; def err_objc_ns_bridged_invalid_cfobject : Error< - "ObjectiveC object of

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-23 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH edited https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-23 Thread Wentao Zhang via cfe-commits
https://github.com/whentojump updated https://github.com/llvm/llvm-project/pull/89869 >From 510e0f131ad11d7924f33fc4c4130dcf866bd8da Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 19 Apr 2024 15:16:05 +0900 Subject: [PATCH 1/9] [MC/DC][Coverage] Workaround for `##` conditions A

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-23 Thread Egor Pasko via cfe-commits
https://github.com/pasko updated https://github.com/llvm/llvm-project/pull/92171 >From df3f8dfc47cd8d7b220ed712dc7c2cab1c563f50 Mon Sep 17 00:00:00 2001 From: Egor Pasko Date: Mon, 6 May 2024 19:48:59 +0200 Subject: [PATCH 1/9] wip: Move instrumentation passes This change is not ready for

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -1145,13 +1145,15 @@ void DeclPrinter::VisitLinkageSpecDecl(LinkageSpecDecl *D) { l = "C++"; } + bool HasMoreThanOneDecl = + *D->decls_begin() && D->decls_begin()->getNextDeclInContext(); erichkeane wrote: ```suggestion

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +// CHECK: extern "C" int printf(const char *, ...); +extern "C" int printf(const char *...); + +// CHECK: extern "C++" { +// CHECK-NEXT: int f(int); +// CHECK-NEXT: int g(int); +// CHECK-NEXT: } +extern

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +// CHECK: extern "C" int printf(const char *, ...); +extern "C" int printf(const char *...); + +// CHECK: extern "C++" { erichkeane wrote: @AaronBallman : What do we think of this? This

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-23 Thread Egor Pasko via cfe-commits
@@ -0,0 +1,44 @@ +; RUN: opt -passes="default" -S < %s | FileCheck -check-prefix=PRELTO %s +; RUN: opt -passes="default" -S < %s | FileCheck -check-prefix=PRELTO %s +; RUN: opt -passes="thinlto-pre-link,thinlto" -S < %s | FileCheck -check-prefix=PRELTO %s pasko

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-23 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. We've waited a week on this PR to see if anyone from Apple will chime in. On previous PRs we waited weeks and got no response. We've reached out on Discord too. This PR looks sane to me and it seems to have adequate testing. I think we

[clang-tools-extra] [llvm] [clang-tidy] Restructure JSON profile structure to be parsable (PR #86821)

2024-05-23 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/86821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/93190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread via cfe-commits
@@ -4526,7 +4526,7 @@ def err_objc_attr_typedef_not_void_pointer : Error< def err_objc_cf_bridged_not_interface : Error< "CF object of type %0 is bridged to %1, which is not an Objective-C class">; def err_objc_ns_bridged_invalid_cfobject : Error< - "ObjectiveC object of

[clang] [Clang] Only check exprs that might be immediate escalating in evaluated contexts (PR #93187)

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

[clang] dd32c3d - [Clang] Only check exprs that might be immediate escalating in evaluated contexts (#93187)

2024-05-23 Thread via cfe-commits
Author: cor3ntin Date: 2024-05-23T17:53:07+02:00 New Revision: dd32c3d36fbf21cf90d47ea83ad40ee959dd38d3 URL: https://github.com/llvm/llvm-project/commit/dd32c3d36fbf21cf90d47ea83ad40ee959dd38d3 DIFF: https://github.com/llvm/llvm-project/commit/dd32c3d36fbf21cf90d47ea83ad40ee959dd38d3.diff

[clang] 5a81db3 - [NFC][Clang] Use `isa_and_nonnull` instead of `VD && isa(VD)` (#93207)

2024-05-23 Thread via cfe-commits
Author: yronglin Date: 2024-05-23T23:43:41+08:00 New Revision: 5a81db311cf8e15b7c6a33100bb5c1fb256754ce URL: https://github.com/llvm/llvm-project/commit/5a81db311cf8e15b7c6a33100bb5c1fb256754ce DIFF: https://github.com/llvm/llvm-project/commit/5a81db311cf8e15b7c6a33100bb5c1fb256754ce.diff

[clang] [NFC][Clang] Use `isa_and_nonnull` instead of `VD && isa(VD)` (PR #93207)

2024-05-23 Thread via cfe-commits
https://github.com/yronglin closed https://github.com/llvm/llvm-project/pull/93207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-05-23 Thread Younan Zhang via cfe-commits
zyn0217 wrote: (What's going on with the pre-commit CI? Does it disappear?) https://github.com/llvm/llvm-project/pull/93206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][AIX] Cast NULL as type uintptr_t. (PR #93204)

2024-05-23 Thread David Tenty via cfe-commits
https://github.com/daltenty approved this pull request. LGTM, assuming the CI passes https://github.com/llvm/llvm-project/pull/93204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Use `isa_and_nonnull` instead of `VD && isa(VD)` (PR #93207)

2024-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: None (yronglin) Changes This issue was found in https://github.com/llvm/llvm-project/pull/86960. But I'd like to avoid mixing together a bunch of cleanups with actual changes. --- Full diff:

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-05-23 Thread Younan Zhang via cfe-commits
@@ -1036,6 +1036,7 @@ void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer , // be dependent, because there are template parameters in scope. CXXRecordDecl::LambdaDependencyKind LambdaDependencyKind = CXXRecordDecl::LDK_Unknown; +

[clang] [NFC][Clang] Use `isa_and_nonnull` instead of `VD && isa(VD)` (PR #93207)

2024-05-23 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/93207 This issue was found in https://github.com/llvm/llvm-project/pull/86960. But I'd like to avoid mixing together a bunch of cleanups with actual changes. >From 6aa4cc4c1fc3309320d949a8c56a662f812e7529 Mon Sep 17

[clang] [Clang] Only check exprs that might be immediate escalating in evaluated contexts (PR #93187)

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

<    3   4   5   6   7   8   9   10   11   12   >