[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-13 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81102 >From d489acbd3cfb656d203e1f05b74c238351c5428a Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 8 Feb 2024 08:33:03 +0100 Subject: [PATCH 1/6] [Clang] Properly get captured 'this' pointer in lambdas with an e

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Sam Clegg via cfe-commits
@@ -198,9 +198,18 @@ /// /// If there are calls to setjmp() /// -/// 2) and 3): The same as 2) and 3) in Emscripten SjLj. -/// (setjmpTable/setjmpTableSize initialization + setjmp callsite -/// transformation) +/// 2) In the function entry that calls setjmp, initialize +///

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 edited https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 commented: Let me know if you want some help testing alsongside the emscripten side. Alternatively myself or @aheejin could perform the emscripten tests. https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Sam Clegg via cfe-commits
@@ -198,9 +198,18 @@ /// /// If there are calls to setjmp() /// -/// 2) and 3): The same as 2) and 3) in Emscripten SjLj. -/// (setjmpTable/setjmpTableSize initialization + setjmp callsite -/// transformation) +/// 2) In the function entry that calls setjmp, initialize +///

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread via cfe-commits
@@ -4912,3 +4922,279 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context) { Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(), getTypeConstraintConcept(), getTypeConstraintArguments()); } + +FunctionEffect::~Function

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-13 Thread Aaron Ballman via cfe-commits
@@ -2156,9 +2156,10 @@ def TypeNonNull : TypeAttr { let Documentation = [TypeNonNullDocs]; } -def TypeNullable : TypeAttr { +def TypeNullable : DeclOrTypeAttr { let Spellings = [CustomKeyword<"_Nullable">]; let Documentation = [TypeNullableDocs]; +// let Subjects = Su

[clang] AArch64: add __builtin_arm_trap (PR #85054)

2024-03-13 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/85054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread Doug Wyatt via cfe-commits
@@ -4912,3 +4922,279 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context) { Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(), getTypeConstraintConcept(), getTypeConstraintArguments()); } + +FunctionEffect::~Function

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s Sirraide wrote: It’s usually not required to separate code that errors and code that is supposed to compile without errors, but if it is required for something like this, then sure, go ahead

[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

2024-03-13 Thread via cfe-commits
eddyz87 wrote: @yonghong-song , if I understand @efriedma-quic correctly (thank you for explanations), the following fragment is not RISC-V ABI conformant: ``` $ cat u.c void foo(unsigned); void bar(unsigned a, unsigned b) { foo(a + b); } 1: 67 02 00 00 20 00 00 00 r2 <<= 0x20

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-13 Thread Aaron Ballman via cfe-commits
@@ -1494,6 +1494,15 @@ void Parser::ParseMicrosoftInheritanceClassAttributes(ParsedAttributes &attrs) { } } +void Parser::ParseNullabilityClassAttributes(ParsedAttributes &attrs) { + while (Tok.is(tok::kw__Nullable)) { AaronBallman wrote: With other attri

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-13 Thread Aaron Ballman via cfe-commits
@@ -215,6 +215,18 @@ void Sema::inferGslOwnerPointerAttribute(CXXRecordDecl *Record) { inferGslPointerAttribute(Record, Record); } +void Sema::inferNullableClassAttribute(CXXRecordDecl *CRD) { + static llvm::StringSet<> Nullable{ + "auto_ptr", "shared_ptr", "u

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread via cfe-commits
@@ -4912,3 +4922,279 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context) { Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(), getTypeConstraintConcept(), getTypeConstraintArguments()); } + +FunctionEffect::~Function

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/82705 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-13 Thread Aaron Ballman via cfe-commits
@@ -4096,6 +4096,18 @@ non-underscored keywords. For example: @property (assign, nullable) NSView *superview; @property (readonly, nonnull) NSArray *subviews; @end + +As well as built-in pointer types, the nullability attributes can be attached +to C++ classes m

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM though there may be a minor change to the docs that could make sense (feel free to change when landing if you agree). https://github.com/llvm/llvm-project/pull/82705 ___ cfe-commits mail

[clang] [Headers][X86] Add rounding and exception notes to conversions (PR #83447)

2024-03-13 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/83447 >From 64cdd358d0bf359383a5dd3d1da236a219644c9e Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Thu, 29 Feb 2024 08:59:26 -0800 Subject: [PATCH 1/3] [Headers][X86] Add rounding and exception notes to conversion

[clang] [Headers][X86] Add rounding and exception notes to conversions (PR #83447)

2024-03-13 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Reworded the parts about truncating results. https://github.com/llvm/llvm-project/pull/83447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] AArch64: add __builtin_arm_trap (PR #85054)

2024-03-13 Thread Amara Emerson via cfe-commits
https://github.com/aemerson approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/85054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstallAPI] Add installapi specific options & diagnostics (PR #85100)

2024-03-13 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/85100 * A lot of `tapi installapi` options are already shared with clang, but not all. This patch handles installapi specific options by filtering for them in initial argv input, then passing the rest to the clang

[clang] [InstallAPI] Add installapi specific options & diagnostics (PR #85100)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes * A lot of `tapi installapi` options are already shared with clang, but not all. This patch handles installapi specific options by filtering for them in initial argv input, then passing the rest to the c

[clang] [flang] [flang][cuda] Enable cuda with -x cuda option (PR #84944)

2024-03-13 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval edited https://github.com/llvm/llvm-project/pull/84944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][cuda] Enable cuda with -x cuda option (PR #84944)

2024-03-13 Thread Valentin Clement バレンタイン クレメン via cfe-commits
@@ -0,0 +1,13 @@ +! Test -fcuda option +! RUN: %flang -fc1 -cpp -fcuda -fdebug-unparse %s -o - | FileCheck %s clementval wrote: Added https://github.com/llvm/llvm-project/pull/84944 ___ cfe-commits mailing list cfe-com

[clang] [InstallAPI] Add installapi specific options & diagnostics (PR #85100)

2024-03-13 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 e4edbae0aa6a9739954ee3b494b18f8c599d9d79 a71d8d338c9a5cc2f21957b7907f676f2f11d4d6 --

[clang] [InstallAPI] Add installapi specific options & diagnostics (PR #85100)

2024-03-13 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/85100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add rounding and exception notes to conversions (PR #83447)

2024-03-13 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/83447 >From 64cdd358d0bf359383a5dd3d1da236a219644c9e Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Thu, 29 Feb 2024 08:59:26 -0800 Subject: [PATCH 1/4] [Headers][X86] Add rounding and exception notes to conversion

[clang] [InstallAPI] Add installapi specific options & diagnostics (PR #85100)

2024-03-13 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/85100 >From 7a7c5103a20b35a00c87fe47f1a4bc4a24dc205e Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 6 Mar 2024 09:16:20 -0800 Subject: [PATCH] [InstallAPI] Add installapi specific options & diagnostics * A

[clang] f15a790 - Remove use of reference lifetime extension introduced in cdde0d9

2024-03-13 Thread David Blaikie via cfe-commits
Author: David Blaikie Date: 2024-03-13T16:03:16Z New Revision: f15a790fd383665ec4defa0711e975476fd8b18b URL: https://github.com/llvm/llvm-project/commit/f15a790fd383665ec4defa0711e975476fd8b18b DIFF: https://github.com/llvm/llvm-project/commit/f15a790fd383665ec4defa0711e975476fd8b18b.diff LOG:

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread Doug Wyatt via cfe-commits
@@ -4912,3 +4922,279 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context) { Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(), getTypeConstraintConcept(), getTypeConstraintArguments()); } + +FunctionEffect::~Function

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't use crtbegin/crtend when building for musl. (PR #85089)

2024-03-13 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/85089 >From 8bdd6627e21eaddedfff208eebaa46f1eeb81674 Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Thu, 22 Feb 2024 11:36:57 + Subject: [PATCH 1/2] [Clang] Don't use crtbegin/crtend when building for musl

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-13 Thread Chris B via cfe-commits
@@ -4655,6 +4655,13 @@ void CodeGenFunction::EmitCallArg(CallArgList &args, const Expr *E, return emitWritebackArg(*this, args, CRE); } + // If an argument is an array paramter expression being passed through. Emit + // the argument to a temporary and pass the tempora

[libunwind] [libunwind] Tweak tests for musl support. (PR #85097)

2024-03-13 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/85097 >From 6808d20b198bba4f2e062094b89cfc13eac49f85 Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Thu, 22 Feb 2024 11:59:24 + Subject: [PATCH 1/2] [libunwind] Tweak tests for musl support. We can't use

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][cuda] Enable cuda with -x cuda option (PR #84944)

2024-03-13 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. LGTM, thanks for the updates! https://github.com/llvm/llvm-project/pull/84944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread Doug Wyatt via cfe-commits
@@ -11100,6 +11136,48 @@ Attr *Sema::getImplicitCodeSegOrSectionAttrForFunction(const FunctionDecl *FD, return nullptr; } +// Should only be called when getFunctionEffects() returns a non-empty set. +// Decl should be a FunctionDecl or BlockDecl. +void Sema::CheckAddCallabl

[clang] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-13 Thread via cfe-commits
https://github.com/T-Gruber created https://github.com/llvm/llvm-project/pull/85104 Fixes https://github.com/llvm/llvm-project/issues/84463 Changes: - Adapted MemRegion::getDescriptiveName - Added unittest to check name for a given clang::ento::ElementRegion - Some format changes due to clang-f

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s dougsonos wrote: OK, maybe "syntax" then... https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-13 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [flang] [flang][cuda] Enable cuda with -x cuda option (PR #84944)

2024-03-13 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval closed https://github.com/llvm/llvm-project/pull/84944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (T-Gruber) Changes Fixes https://github.com/llvm/llvm-project/issues/84463 Changes: - Adapted MemRegion::getDescriptiveName - Added unittest to check name for a given clang::ento::ElementRegion - Some format changes due to clang-forma

[clang] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (T-Gruber) Changes Fixes https://github.com/llvm/llvm-project/issues/84463 Changes: - Adapted MemRegion::getDescriptiveName - Added unittest to check name for a given clang::ento::ElementRegion - Some format changes

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread via cfe-commits
@@ -4912,3 +4922,279 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context) { Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(), getTypeConstraintConcept(), getTypeConstraintArguments()); } + +FunctionEffect::~Function

[clang] ccd1608 - Diagnose misuse of the cleanup attribute (#80040)

2024-03-13 Thread via cfe-commits
Author: Bhuminjay Soni Date: 2024-03-13T12:28:25-04:00 New Revision: ccd16085f70105d457f052543d731dd51089945b URL: https://github.com/llvm/llvm-project/commit/ccd16085f70105d457f052543d731dd51089945b DIFF: https://github.com/llvm/llvm-project/commit/ccd16085f70105d457f052543d731dd51089945b.diff

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

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

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

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

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-13 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: Minor suggestion about the diagnostic. @MaskRay do you have any thoughts about a follow-up change to add a `DriverOptions` structure so that we could use argument marshalling for driver options? https://github.com/llvm/llvm-project/pull/83938 _

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-13 Thread Chris B via cfe-commits
@@ -8545,6 +8545,11 @@ def dxc_entrypoint : Option<["--", "/", "-"], "E", KIND_JOINED_OR_SEPARATE>, Group, Visibility<[DXCOption]>, HelpText<"Entry point name">; +def dxc_hlsl_version : Option<["/", "-"], "HV", KIN

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-13 Thread Chris B via cfe-commits
@@ -753,6 +753,9 @@ def err_drv_hlsl_bad_shader_required_in_target : Error< def err_drv_hlsl_bad_shader_unsupported : Error< "%select{shader model|Vulkan environment|shader stage}0 '%1' in target '%2' is invalid for HLSL code generation">; +def err_drv_hlsl_dxc_bad_argument

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Thank you for this, it's exciting to see more bounds safety being added to Clang! I think everything looks good to me (we can clean up any surprises in follow-ups at this point). I'm presuming you'll add a release note & docs once mo

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you for the fix! https://github.com/llvm/llvm-project/pull/83063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] AArch64: add __builtin_arm_trap (PR #85054)

2024-03-13 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. Maybe a line or two in the `clang/docs/LanguageExtensions.rst` would be useful. https://github.com/llvm/llvm-project/pull/85054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] 69afb9d - [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (#83063)

2024-03-13 Thread via cfe-commits
Author: Sirraide Date: 2024-03-13T17:39:23+01:00 New Revision: 69afb9d7875d79fdacaaa2f22b5ee3a06faf5373 URL: https://github.com/llvm/llvm-project/commit/69afb9d7875d79fdacaaa2f22b5ee3a06faf5373 DIFF: https://github.com/llvm/llvm-project/commit/69afb9d7875d79fdacaaa2f22b5ee3a06faf5373.diff LOG:

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-03-13 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/83063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-13 Thread Farzon Lotfi via cfe-commits
@@ -18015,38 +18015,11 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, Value *X = EmitScalarExpr(E->getArg(0)); Value *Y = EmitScalarExpr(E->getArg(1)); Value *S = EmitScalarExpr(E->getArg(2)); -llvm::Type *Xty = X->getType(); -llvm::Type

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-13 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/84526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-13 Thread Ben Langmuir via cfe-commits
@@ -301,10 +301,9 @@ bool Module::directlyUses(const Module *Requested) { if (Requested->isSubModuleOf(Use)) return true; - // Anyone is allowed to use our builtin stdarg.h and stddef.h and their - // accompanying modules. - if (Requested->getTopLevelModuleName()

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-13 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/84526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-13 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/82705 >From eccc46840e343e7ba15200cd4b81316a51c46943 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Thu, 22 Feb 2024 16:00:44 +0100 Subject: [PATCH 1/4] [clang][nullability] allow _Nonnull etc on nullable class ty

[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

2024-03-13 Thread via cfe-commits
yonghong-song wrote: > But **after this patch**, the two numbers get the same result as before this > patch. I don't see ld_imm64 becoming a mov instruction, as well as explicit > zero extension for 'unsigned int'. Is that expected? IIUC, we have the same result before and after this patch. So

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from some coding style guideline nits https://github.com/llvm/llvm-project/pull/81102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-13 Thread Aaron Ballman via cfe-commits
@@ -8485,6 +8485,53 @@ class LValueExprEvaluator }; } // end anonymous namespace +/// Get an lvalue to a field of a lambda's closure type. +static bool HandleLambdaCapture(EvalInfo &Info, const Expr *E, LValue &Result, +const CXXMethodDecl *MD,

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/81102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-13 Thread Aaron Ballman via cfe-commits
@@ -8485,6 +8485,53 @@ class LValueExprEvaluator }; } // end anonymous namespace +/// Get an lvalue to a field of a lambda's closure type. +static bool HandleLambdaCapture(EvalInfo &Info, const Expr *E, LValue &Result, +const CXXMethodDecl *MD,

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-13 Thread Aaron Ballman via cfe-commits
@@ -9037,45 +9055,46 @@ class PointerExprEvaluator return Error(E); } bool VisitCXXThisExpr(const CXXThisExpr *E) { -// Can't look at 'this' when checking a potential constant expression. -if (Info.checkingPotentialConstantExpression()) - return false; -

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-13 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: >> I'm not excited by the complexity we are moving toward with the builtin >> headers. But I don't have any alternatives. > When -fbuiltin-headers-in-system-modules goes away, things become simpler > than they were since modules were introduced. Even for the case with `-fbui

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-13 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 1/9] [Clang][AArch64] Warn when calling streaming/non-

[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

2024-03-13 Thread via cfe-commits
yonghong-song wrote: > @yonghong-song , if I understand @efriedma-quic correctly (thank you for > explanations), the following fragment is not RISC-V ABI conformant: > > ``` > $ cat u.c > void foo(unsigned); > void bar(unsigned a, unsigned b) { > foo(a + b); > } > >1: 67 02 00

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread Andrew Pinski via cfe-commits
pinskia wrote: One question since the attribute is applied to types is there a way to get the nolock/noalloc from type?. e.g. ``` template [[nolock(T)]] void f(T a) { a(); } ``` Will the above work or is there no way to implement that currently? Since you mention it is attached to the type, is

[clang] [llvm] [RISC-V] Add CSR read/write builtins (PR #85091)

2024-03-13 Thread Eli Friedman via cfe-commits
@@ -20,6 +20,12 @@ class RISCVBuiltin : TargetBuiltin { let Attributes = [NoThrow, Const] in { //===--===// +// Zicsr extension. +//===--==

[clang] [clang][AArch64] Enable fp128 for aarch64 linux target (PR #85070)

2024-03-13 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau ready_for_review https://github.com/llvm/llvm-project/pull/85070 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AArch64] Enable fp128 for aarch64 linux target (PR #85070)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matthew Devereau (MDevereau) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/85070.diff 2 Files Affected: - (modified) clang/lib/Basic/Targets/OSTargets.h (+1) - (modified) clang/test/CodeGenCXX/float128-declarations.

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-13 Thread Joshua Batista via cfe-commits
@@ -8545,6 +8545,11 @@ def dxc_entrypoint : Option<["--", "/", "-"], "E", KIND_JOINED_OR_SEPARATE>, Group, Visibility<[DXCOption]>, HelpText<"Entry point name">; +def dxc_hlsl_version : Option<["/", "-"], "HV", KIN

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Separating out some bits of discussion here. Standardization of flexible arrays in unions --- We can dispense with this topic quickly: the standard doesn't allow this, if the standard should be relaxed then someone needs to write a pap

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
@@ -408,17 +408,26 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback { /// Stores an option with the check-local name \p LocalName with /// integer value \p Value to \p Options. template -std::enable_if_t> +std::enable_if_t && std::

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Missing test (based on some check). https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
@@ -470,6 +491,8 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback { void storeInt(ClangTidyOptions::OptionMap &Options, StringRef LocalName, int64_t Value) const; +void storeUnsigned(ClangTidyOptions::OptionMap &Options, +

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
@@ -408,17 +408,26 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback { /// Stores an option with the check-local name \p LocalName with /// integer value \p Value to \p Options. template -std::enable_if_t> +std::enable_if_t && std::

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: And just one comment, when this check uses max value as "limit", this behavior is also a reason why support for optional values were added. For me in this case check & description should be updated to handle this config as an optional, instead of mentioning max u64 in documenta

[clang] 13ccaf9 - Revert "Reapply "[analyzer] Accept C library functions from the `std` namespace""

2024-03-13 Thread Philip Reames via cfe-commits
Author: Philip Reames Date: 2024-03-13T10:19:42-07:00 New Revision: 13ccaf9b9d4400bb128b35ff4ac733e4afc3ad1c URL: https://github.com/llvm/llvm-project/commit/13ccaf9b9d4400bb128b35ff4ac733e4afc3ad1c DIFF: https://github.com/llvm/llvm-project/commit/13ccaf9b9d4400bb128b35ff4ac733e4afc3ad1c.diff

[clang-tools-extra] [clang-tidy]bugprone-unused-return-value ignore `++` and `--` operator overloading (PR #84922)

2024-03-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/84922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]bugprone-unused-return-value ignore `++` and `--` operator overloading (PR #84922)

2024-03-13 Thread Piotr Zegar via cfe-commits
@@ -169,16 +180,14 @@ void UnusedReturnValueCheck::registerMatchers(MatchFinder *Finder) { callee(functionDecl( // Don't match void overloads of checked functions. unless(returns(voidType())), - // Don't match copy or move ass

[clang-tools-extra] [clang-tidy]bugprone-unused-return-value ignore `++` and `--` operator overloading (PR #84922)

2024-03-13 Thread Piotr Zegar via cfe-commits
@@ -31,9 +31,20 @@ AST_MATCHER_P(FunctionDecl, isInstantiatedFrom, Matcher, Finder, Builder); } -AST_MATCHER_P(CXXMethodDecl, isOperatorOverloading, - llvm::SmallVector, Kinds) { - return llvm::is_contained(Kinds, Node.getOverloaded

[clang-tools-extra] [clang-tidy]bugprone-unused-return-value ignore `++` and `--` operator overloading (PR #84922)

2024-03-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Few more tests would be also nice, with free standing operators. https://github.com/llvm/llvm-project/pull/84922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-13 Thread Ian Anderson via cfe-commits
@@ -301,10 +301,9 @@ bool Module::directlyUses(const Module *Requested) { if (Requested->isSubModuleOf(Use)) return true; - // Anyone is allowed to use our builtin stdarg.h and stddef.h and their - // accompanying modules. - if (Requested->getTopLevelModuleName()

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1, cflush.d.l1, and cease instructions. (PR #83896)

2024-03-13 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw approved this pull request. https://github.com/llvm/llvm-project/pull/83896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-13 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81102 >From d489acbd3cfb656d203e1f05b74c238351c5428a Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 8 Feb 2024 08:33:03 +0100 Subject: [PATCH 1/7] [Clang] Properly get captured 'this' pointer in lambdas with an e

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-13 Thread via cfe-commits
@@ -8485,6 +8485,53 @@ class LValueExprEvaluator }; } // end anonymous namespace +/// Get an lvalue to a field of a lambda's closure type. +static bool HandleLambdaCapture(EvalInfo &Info, const Expr *E, LValue &Result, +const CXXMethodDecl *MD,

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-13 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81102 >From d489acbd3cfb656d203e1f05b74c238351c5428a Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 8 Feb 2024 08:33:03 +0100 Subject: [PATCH 1/8] [Clang] Properly get captured 'this' pointer in lambdas with an e

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-13 Thread Philip Reames via cfe-commits
@@ -36,6 +36,11 @@ struct RISCVSupportedExtension { } }; +struct RISCVProfile { preames wrote: Very minor, but I believe you can use std::pair here instead. https://github.com/llvm/llvm-project/pull/76357 ___ c

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-13 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81102 >From d489acbd3cfb656d203e1f05b74c238351c5428a Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 8 Feb 2024 08:33:03 +0100 Subject: [PATCH 1/8] [Clang] Properly get captured 'this' pointer in lambdas with an e

[clang] bd77a26 - [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (#81102)

2024-03-13 Thread via cfe-commits
Author: Sirraide Date: 2024-03-13T18:49:44+01:00 New Revision: bd77a26e9a15981114e9802d83047f42631125a2 URL: https://github.com/llvm/llvm-project/commit/bd77a26e9a15981114e9802d83047f42631125a2 DIFF: https://github.com/llvm/llvm-project/commit/bd77a26e9a15981114e9802d83047f42631125a2.diff LOG:

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-13 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/81102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85104 >From 0f964127ed91e23f8e969e08ce680535cfeb8906 Mon Sep 17 00:00:00 2001 From: Andreas Steinhausen Date: Wed, 13 Mar 2024 17:07:53 +0100 Subject: [PATCH 1/8] Adapted MemRegion::getDescriptiveName to handle Eleme

  1   2   3   4   5   >