[clang] [Clang][Sema] fix a bug on constraint check with template friend function (PR #90646)

2024-04-30 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: I'm actually working on constraint checking for function template specializations in #88963. I don't think this patch is quite right... this will cause a crash if the befriended function is a member of a class template specialization. Relative to the changes in #88963, I

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-04-30 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From 77de225477afd3689b8bf64107e8f3a4eeab85ac Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 1/2] [Clang][Sema] Improve support for explicit

[clang] [llvm] [DXIL] Add tan intrinsic part 2 (PR #90277)

2024-04-30 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy approved this pull request. https://github.com/llvm/llvm-project/pull/90277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][TR12] change property of map-type modifier. (PR #90499)

2024-04-30 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/90499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Xiang Li via cfe-commits
@@ -0,0 +1,794 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [OpenMP][TR12] change property of map-type modifier. (PR #90499)

2024-04-30 Thread via cfe-commits
@@ -4675,8 +4709,10 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, // Only parse map-type-modifier[s] and map-type if a colon is present in // the map clause. if (ColonPresent) { + if (getLangOpts().OpenMP >= 60 && getCurToken().is(tok::colon))

[clang] [OpenMP][TR12] change property of map-type modifier. (PR #90499)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -4675,8 +4709,10 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, // Only parse map-type-modifier[s] and map-type if a colon is present in // the map clause. if (ColonPresent) { + if (getLangOpts().OpenMP >= 60 && getCurToken().is(tok::colon))

[clang] [llvm] [x86] Add tan intrinsic part 4 (PR #90503)

2024-04-30 Thread Farzon Lotfi via cfe-commits
@@ -654,6 +655,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine , setOperationAction(ISD::FSIN , VT, Expand); setOperationAction(ISD::FCOS , VT, Expand); setOperationAction(ISD::FSINCOS, VT, Expand); + setOperationAction(ISD::FTAN,

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-30 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/89809 >From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 23 Apr 2024 00:49:28 -0700 Subject: [PATCH 1/4] Add environment parameter to clang availability attribute ---

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-04-30 Thread via cfe-commits
@@ -908,6 +908,74 @@ void CodeGenFunction::EmitIfStmt(const IfStmt ) { incrementProfileCounter(); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool IsTrivialCXXLoop) { + if

[clang] [OpenMP][TR12] change property of map-type modifier. (PR #90499)

2024-04-30 Thread via cfe-commits
@@ -4675,8 +4709,10 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, // Only parse map-type-modifier[s] and map-type if a colon is present in // the map clause. if (ColonPresent) { + if (getLangOpts().OpenMP >= 60 && getCurToken().is(tok::colon))

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

2024-04-30 Thread Sean Perry via cfe-commits
perry-ca wrote: > We don't normally commit in clang-format with a unit test I assume you mean "without a unit test". In this case the unit test is the existing test cases. Some fail on z/OS because the files are not read in as text. It's not really possible to detect this issue on other

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

2024-04-30 Thread Sean Perry via cfe-commits
@@ -413,8 +413,9 @@ static bool format(StringRef FileName, bool ErrorOnIncompleteFormat = false) { // On Windows, overwriting a file with an open file mapping doesn't work, // so read the whole file into memory when formatting in-place. ErrorOr> CodeOrErr = -

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-30 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel approved this pull request. https://github.com/llvm/llvm-project/pull/89473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-30 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: LGTM! Thanks. https://github.com/llvm/llvm-project/pull/89473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-30 Thread Andy Kaylor via cfe-commits
andykaylor wrote: ping for review https://github.com/llvm/llvm-project/pull/89473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-04-30 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/85672 >From aff1a762a73ce30cde38a6fcbbed8a3e4f0b5366 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Mon, 18 Mar 2024 10:19:38 -0700 Subject: [PATCH 1/5] [clang][CodeGen] Omit pre-opt link when post-opt link

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-04-30 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/90625 >From 3b2f810ff3798ef073a8d1a10ca6fbafdbdb4641 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 30 Apr 2024 11:18:15 -0500 Subject: [PATCH] [clang][Sema] Re-use existing BinaryOperator if possible First

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-30 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane pushed a commit which fixes it https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Fix MSVC ABI for classes with non static data members of reference type (PR #90547)

2024-04-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Maybe we should just be testing if the copy-assignment operator is deleted? For reference, MSVC also returns the following indirectly: ``` struct Test { int x; Test& operator=(const Test&) = delete; }; Test foo(); Test test(Test x) {

[clang] [clang][CodeGen] Fix MSVC ABI for classes with non static data members of reference type (PR #90547)

2024-04-30 Thread Eli Friedman via cfe-commits
@@ -1144,11 +1167,13 @@ bool MicrosoftCXXABI::classifyReturnType(CGFunctionInfo ) const { if (!RD) return false; - bool isTrivialForABI = RD->canPassInRegisters() && - isTrivialForMSVC(RD, FI.getReturnType(), CGM); - // MSVC always returns

[clang] [clang][CodeGen] Fix MSVC ABI for classes with non static data members of reference type (PR #90547)

2024-04-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/90547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-30 Thread via cfe-commits
hiraditya wrote: I believe this is breaking the buildbot https://lab.llvm.org/buildbot/#/builders/245/builds/23936 please confirm. https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] Fix a bug in annotating struct braces (PR #90555)

2024-04-30 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/90555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 41f9c78 - [OpenACC] Fix test failure from fa67986d

2024-04-30 Thread via cfe-commits
Author: erichkeane Date: 2024-04-30T11:53:57-07:00 New Revision: 41f9c78f6a4efe38edbb0b62131b0a0bf619c99a URL: https://github.com/llvm/llvm-project/commit/41f9c78f6a4efe38edbb0b62131b0a0bf619c99a DIFF: https://github.com/llvm/llvm-project/commit/41f9c78f6a4efe38edbb0b62131b0a0bf619c99a.diff

[clang] [Modules] Process include files changes with -fmodules-validate-input-files-content and -fno-pch-timestamp options (PR #90319)

2024-04-30 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko updated https://github.com/llvm/llvm-project/pull/90319 >From 71796a80e15b6700fec23fbec70635aae455b188 Mon Sep 17 00:00:00 2001 From: Ivan Murashko Date: Fri, 26 Apr 2024 22:45:26 +0100 Subject: [PATCH] [Modules] Process include files changes with

[clang] [Modules] Process include files changes with -fmodules-validate-input-files-content and -fno-pch-timestamp options (PR #90319)

2024-04-30 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/90319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Process include files changes with -fmodules-validate-input-files-content and -fno-pch-timestamp options (PR #90319)

2024-04-30 Thread Ivan Murashko via cfe-commits
@@ -0,0 +1,34 @@ +// UNSUPPORTED: system-windows +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: cp a1.h a.h +// RUN: %clang -fmodules -fmodules-validate-input-files-content -Xclang -fno-pch-timestamp -fimplicit-modules -fmodule-map-file=module.modulemap

[clang] [Modules] Process include files changes with -fmodules-validate-input-files-content and -fno-pch-timestamp options (PR #90319)

2024-04-30 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko updated https://github.com/llvm/llvm-project/pull/90319 >From 3c36295b5f0f1e011e11d57c5ec4e685cb917cab Mon Sep 17 00:00:00 2001 From: Ivan Murashko Date: Fri, 26 Apr 2024 22:45:26 +0100 Subject: [PATCH] [Modules] Process include files changes with

[clang] [Clang][Sema] fix a bug on constraint check with template friend function (PR #90646)

2024-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes attempt to fix https://github.com/llvm/llvm-project/issues/90349 Skip to add outer class template arguments to `MTAL` when the friend function has the same depth with its lexical context(`CXXRecordDecl`). ---

[clang] [Clang][Sema] fix a bug on constraint check with template friend function (PR #90646)

2024-04-30 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/90646 attempt to fix https://github.com/llvm/llvm-project/issues/90349 Skip to add outer class template arguments to `MTAL` when the friend function has the same depth with its lexical context(`CXXRecordDecl`). >From

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/90521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fa67986 - [OpenACC] Private Clause on Compute Constructs (#90521)

2024-04-30 Thread via cfe-commits
Author: Erich Keane Date: 2024-04-30T11:28:37-07:00 New Revision: fa67986d5b309ddd4c2ea74e8a5eeb0559aa8022 URL: https://github.com/llvm/llvm-project/commit/fa67986d5b309ddd4c2ea74e8a5eeb0559aa8022 DIFF: https://github.com/llvm/llvm-project/commit/fa67986d5b309ddd4c2ea74e8a5eeb0559aa8022.diff

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-30 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: I built boost with `-DBUILD_TESTING=ON` and didn't see any regressions... hopefully that remains the case https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Modules] Process include files changes with -fmodules-validate-input-files-content and -fno-pch-timestamp options (PR #90319)

2024-04-30 Thread Ben Langmuir via cfe-commits
@@ -0,0 +1,34 @@ +// UNSUPPORTED: system-windows +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: cp a1.h a.h +// RUN: %clang -fmodules -fmodules-validate-input-files-content -Xclang -fno-pch-timestamp -fimplicit-modules -fmodule-map-file=module.modulemap

[clang-tools-extra] 8009bbe - Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependen

2024-04-30 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-04-30T14:25:09-04:00 New Revision: 8009bbec59d1c5d47ae06c431647ebee6d886ff2 URL: https://github.com/llvm/llvm-project/commit/8009bbec59d1c5d47ae06c431647ebee6d886ff2 DIFF:

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-30 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema][Parse] Delay parsing of noexcept-specifiers in friend function declarations (PR #90517)

2024-04-30 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/90517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f061a39 - [Clang][Sema][Parse] Delay parsing of noexcept-specifiers in friend function declarations (#90517)

2024-04-30 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-04-30T14:23:02-04:00 New Revision: f061a395ffb78215a23e0f503e8ea121ee3b13ad URL: https://github.com/llvm/llvm-project/commit/f061a395ffb78215a23e0f503e8ea121ee3b13ad DIFF:

[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)

2024-04-30 Thread Shafik Yaghmour via cfe-commits
@@ -67,6 +68,69 @@ void B::g() requires true; } // namespace cwg2847 +namespace cwg2851 { // cwg2851: 19 + +#if __cplusplus >= 202002L +template struct Val { static constexpr T value = v; }; + + +// Floating-point promotions + +static_assert(Val::value == 0.0L);

[clang] [WebAssembly] Add preprocessor define for half-precision (PR #90528)

2024-04-30 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/90528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7662f95 - [WebAssembly] Add preprocessor define for half-precision (#90528)

2024-04-30 Thread via cfe-commits
Author: Heejin Ahn Date: 2024-04-30T11:15:53-07:00 New Revision: 7662f95f2c767ae3c9b22eb4bdedb07ffcf258b7 URL: https://github.com/llvm/llvm-project/commit/7662f95f2c767ae3c9b22eb4bdedb07ffcf258b7 DIFF: https://github.com/llvm/llvm-project/commit/7662f95f2c767ae3c9b22eb4bdedb07ffcf258b7.diff

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-30 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplicit() (PR #90482)

2024-04-30 Thread via cfe-commits
smanna12 wrote: > I believe the static analyzer is reporting a false positive in this case. I > don't think this change is correct. `BuildClassMessage()` only dereferences > `receiverTypeInfo` if the provided source location is not valid. The existing > `assert` already validates this case.

[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplicit() (PR #90482)

2024-04-30 Thread via cfe-commits
https://github.com/smanna12 closed https://github.com/llvm/llvm-project/pull/90482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-30 Thread Vlad Serebrennikov via cfe-commits
@@ -3893,9 +3893,12 @@ namespace { } void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *E) { - if (E->getTemporary()->getDestructor()->isTrivial()) { -Inherited::VisitStmt(E); -return; + if (const CXXDestructorDecl *DtorDecl = +

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/90220 >From b9b17fa34dab666e4c77dad9cd4109f7a88d1c2e Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 26 Apr 2024 18:03:44 +0300 Subject: [PATCH 1/3] [clang] Fix crash when destructor definition is

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-04-30 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: `clang-format` issues an error for the comments from a previous commit wrote by a different author. I'd like to disregard the clang-format errror, so to keep the diff of this commit minimial. https://github.com/llvm/llvm-project/pull/90625

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #90389)

2024-04-30 Thread Eli Friedman via cfe-commits
@@ -3122,9 +3122,25 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction , Address VAListAddr, CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 1)); RegAddr = Tmp.withElementType(LTy); - } else if (neededInt) { -RegAddr =

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #90389)

2024-04-30 Thread Eli Friedman via cfe-commits
@@ -3133,15 +3149,13 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction , Address VAListAddr, // Copy into a temporary if the type is more aligned than the // register save area. -if (TyAlign.getQuantity() > 8) { - Address Tmp = CGF.CreateMemTemp(Ty); +

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-04-30 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (higher-performance) Changes There are currently no AST matchers for the equivalent of `std::is_trivial`, `std::is_trivially_default_constructible`, `std::is_trivially_copyable`, and the like. This pull request adds matchers to

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-04-30 Thread via cfe-commits
https://github.com/higher-performance created https://github.com/llvm/llvm-project/pull/90634 There are currently no AST matchers for the equivalent of `std::is_trivial`, `std::is_trivially_default_constructible`, `std::is_trivially_copyable`, and the like. This pull request adds matchers to

[clang] [Modules] Process include files changes with -fmodules-validate-input-files-content and -fno-pch-timestamp options (PR #90319)

2024-04-30 Thread Ivan Murashko via cfe-commits
@@ -0,0 +1,34 @@ +// UNSUPPORTED: system-windows +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: cp a1.h a.h +// RUN: %clang -fmodules -fmodules-validate-input-files-content -Xclang -fno-pch-timestamp -fimplicit-modules -fmodule-map-file=module.modulemap

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

2024-04-30 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Thanks a lot, that was quick! There is another AddressSanitizer issue that > may possibly be fixed by #90292. cc @vitalybuka Yes, please wait for #90292. https://github.com/llvm/llvm-project/pull/90373 ___ cfe-commits mailing

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-04-30 Thread Alex Langford via cfe-commits
bulbazord wrote: LLDB changes look fine. https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [x86] Add tan intrinsic part 4 (PR #90503)

2024-04-30 Thread Farzon Lotfi via cfe-commits
@@ -674,6 +674,9 @@ # DEBUG-NEXT: .. opcode {{[0-9]+}} is aliased to {{[0-9]+}} # DEBUG-NEXT: .. the first uncovered type index: 1, OK # DEBUG-NEXT: .. the first uncovered imm index: 0, OK +# DEBUG-NEXT: G_FTAN (opcode {{[0-9]+}}): 1 type index, 0 imm indices

[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplicit() (PR #90482)

2024-04-30 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann requested changes to this pull request. I believe the static analyzer is reporting a false positive in this case. I don't think this change is correct. `BuildClassMessage()` only dereferences `receiverTypeInfo` if the provided source location is not valid. The

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-04-30 Thread Eli Friedman via cfe-commits
@@ -908,6 +908,74 @@ void CodeGenFunction::EmitIfStmt(const IfStmt ) { incrementProfileCounter(); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool IsTrivialCXXLoop) { + if

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-04-30 Thread Akira Hatanaka via cfe-commits
@@ -27,6 +27,9 @@ namespace llvm { } } +// Prefix for __builtin_verbose_trap. +#define CLANG_VERBOSE_TRAP_PREFIX "__llvm_verbose_trap" ahatanak wrote: @delcypher I don't think it has to mention `llvm`. Can we make it even shorter, e.g., `__trap_msg`?

[clang] [clang-tools-extra] [analysis] assume expr is not mutated after analysis to avoid recursive (PR #90581)

2024-04-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/90581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenCL] Put constant initializer globals into constant addrspace (PR #90048)

2024-04-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Prevent null pointer dereference in Sema::​CodeCompleteQualifiedId() (PR #90490)

2024-04-30 Thread via cfe-commits
smanna12 wrote: Thanks @tahonermann for reviews! https://github.com/llvm/llvm-project/pull/90490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Prevent null pointer dereference in Sema::​CodeCompleteQualifiedId() (PR #90490)

2024-04-30 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann approved this pull request. The change looks good to me. I recommend giving @sam-mccall a day or so to comment if he wants to. https://github.com/llvm/llvm-project/pull/90490 ___ cfe-commits mailing list

[clang] [Clang] Prevent null pointer dereference in Sema::​CodeCompleteQualifiedId() (PR #90490)

2024-04-30 Thread Tom Honermann via cfe-commits
tahonermann wrote: Adding Sam McCall as an additional reviewer since he originally authored this code in commit a76e68c9704fb5b3faf25bb8d51e405b5310ff08. https://github.com/llvm/llvm-project/pull/90490 ___ cfe-commits mailing list

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-04-30 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 97069a86193a617a9e4cf742a29db6116b2bf449 24eb4db70e296d6454bac4c84a5bbc47e638876f --

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Youngsuk Kim (JOE1994) Changes First round of Sema checks were run at initial parsing step. Creating a new BinaryOperator instance (with the re-built LHS or RHS) will trigger another round of Sema checks, which can lead to duplicate

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-04-30 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/90625 First round of Sema checks were run at initial parsing step. Creating a new BinaryOperator instance (with the re-built LHS or RHS) will trigger another round of Sema checks, which can lead to duplicate

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-30 Thread Paschalis Mpeis via cfe-commits
https://github.com/paschalis-mpeis edited https://github.com/llvm/llvm-project/pull/78432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-30 Thread via cfe-commits
yronglin wrote: > > This means that no macros of any kind can appear in the module name. > > Exactly. This is why the grammar in the wording is defined in terms of > `pp-token` and not `identifiers`: no macro expansion takes place at all. Thanks! Let's use `LexUnexpandedToken` during parsing

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-30 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/90397 >From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 28 Apr 2024 12:41:46 +0100 Subject: [PATCH 01/11] [clang-tidy] Add modernize-use-std-format check Add a new

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-30 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/90397 >From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 28 Apr 2024 12:41:46 +0100 Subject: [PATCH 01/10] [clang-tidy] Add modernize-use-std-format check Add a new

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-30 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/90397 >From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 28 Apr 2024 12:41:46 +0100 Subject: [PATCH 1/9] [clang-tidy] Add modernize-use-std-format check Add a new

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-30 Thread Mike Crowe via cfe-commits
@@ -0,0 +1,107 @@ +//===--- UseStdFormatCheck.cpp - clang-tidy ---===// +// +// 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:

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-04-30 Thread Jay Foad via cfe-commits
jayfoad wrote: AMDGPU changes are fine. https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

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

2024-04-30 Thread via cfe-commits
cor3ntin wrote: > This means that no macros of any kind can appear in the module name. Exactly. This is why the grammar in the wording is defined in terms of `pp-token` and not `identifiers`: no macro expansion takes place at all. https://github.com/llvm/llvm-project/pull/90574

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [clang-tools-extra] [analysis] assume expr is not mutated after analysis to avoid recursive (PR #90581)

2024-04-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90581 >From f0d640d4c1ba2ede182fdf31cc7030aad01de8b8 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 30 Apr 2024 17:46:37 +0800 Subject: [PATCH 1/2] [analysis] assume expr is not mutated after analysis to

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

2024-04-30 Thread via cfe-commits
yronglin wrote: > module foo(); should be Ill-formed. Ahh, so case like the following also should be ill-formed: ``` #define FUNC_LIKE(X) function_like_##X export module FUNC_LIKE(bar); ``` > we can get the module name of a TU by cat and grep This means that no macros of any kind can appear in

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

2024-04-30 Thread via cfe-commits
@@ -413,8 +413,9 @@ static bool format(StringRef FileName, bool ErrorOnIncompleteFormat = false) { // On Windows, overwriting a file with an open file mapping doesn't work, // so read the whole file into memory when formatting in-place. ErrorOr> CodeOrErr = -

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

2024-04-30 Thread via cfe-commits
https://github.com/mydeveloperday edited https://github.com/llvm/llvm-project/pull/90128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

2024-04-30 Thread via cfe-commits
https://github.com/mydeveloperday commented: We don't normally commit in clang-format with a unit test https://github.com/llvm/llvm-project/pull/90128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

2024-04-30 Thread via cfe-commits
@@ -413,8 +413,9 @@ static bool format(StringRef FileName, bool ErrorOnIncompleteFormat = false) { // On Windows, overwriting a file with an open file mapping doesn't work, // so read the whole file into memory when formatting in-place. ErrorOr> CodeOrErr = -

[clang] [Modules] Process include files changes with -fmodules-validate-input-files-content and -fno-pch-timestamp options (PR #90319)

2024-04-30 Thread Ben Langmuir via cfe-commits
@@ -0,0 +1,34 @@ +// UNSUPPORTED: system-windows +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: cp a1.h a.h +// RUN: %clang -fmodules -fmodules-validate-input-files-content -Xclang -fno-pch-timestamp -fimplicit-modules -fmodule-map-file=module.modulemap

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/90521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -166,3 +176,9 @@ void OpenACCClausePrinter::VisitVectorLengthClause( const OpenACCVectorLengthClause ) { OS << "vector_length(" << C.getIntExpr() << ")"; } + +void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause ) { + OS << "private("; +

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/90521 >From 54ba7d0b7d71d751cf268c3bdfb89bc5ca628a6b Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 22 Apr 2024 13:31:52 -0700 Subject: [PATCH 1/4] [OpenACC] Private Clause on Compute Constructs The private

<    1   2   3   4   5   >