[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-16 Thread Aaron Ballman via cfe-commits
@@ -2196,6 +2196,16 @@ class ASTContext : public RefCountedBase { return getQualifiedType(type.getUnqualifiedType(), Qs); } + /// \brief Return a type with the given __ptrauth qualifier. + QualType getPointerAuthType(QualType Ty, PointerAuthQualifier PointerAuth) { +

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-16 Thread Aaron Ballman via cfe-commits
@@ -607,13 +799,17 @@ class Qualifiers { void Profile(llvm::FoldingSetNodeID ) const { ID.AddInteger(Mask); +PtrAuth.Profile(ID); } private: // bits: |0 1 2|3|4 .. 5|6 .. 8|9 ... 31| // |C R V|U|GCAttr|Lifetime|AddressSpace|

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

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

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-16 Thread Aaron Ballman via cfe-commits
@@ -139,6 +141,168 @@ using CanQualType = CanQual; #define TYPE(Class, Base) class Class##Type; #include "clang/AST/TypeNodes.inc" +/// Pointer-authentication qualifiers. +class PointerAuthQualifier { + enum : uint32_t { +EnabledShift = 0, +EnabledBits = 1, +

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-16 Thread Aaron Ballman via cfe-commits
@@ -194,19 +358,27 @@ class Qualifiers { FastMask = (1 << FastWidth) - 1 }; + Qualifiers() : Mask(0), PtrAuth() {} + AaronBallman wrote: ```suggestion ``` Not needed; the default ctor will be automatically called and `Mask` has an inline initializer.

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The changes have no testing associated with them -- what's the plan for that? https://github.com/llvm/llvm-project/pull/84384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Reapply "[Clang][Sema] Fix crash when 'this' is used in a dependent class scope function template specialization that instantiates to a static member function (#87541, #88311)" (PR #88731)

2024-04-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/88731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e7fb49c - Switch release notes links to using markup for github issues; NFC

2024-04-16 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-04-16T09:00:57-04:00 New Revision: e7fb49c24e4be4780ee4df9829980c5e8ddd511e URL: https://github.com/llvm/llvm-project/commit/e7fb49c24e4be4780ee4df9829980c5e8ddd511e DIFF: https://github.com/llvm/llvm-project/commit/e7fb49c24e4be4780ee4df9829980c5e8ddd511e.diff

[clang] Improve stack usage to increase recursive initialization depth (PR #88546)

2024-04-16 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. This was a roller coaster! LGTM https://github.com/llvm/llvm-project/pull/88546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ValueTracking] Restore isKnownNonZero parameter order. (PR #88873)

2024-04-16 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ClangOffloadBundler] Add file size to header (PR #88827)

2024-04-16 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/88827 >From fec9509f0c9162331fd2a7757e74b8c8408990c0 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Mon, 15 Apr 2024 18:02:42 -0400 Subject: [PATCH] [ClangOffloadBundler] Add file size to header

[clang] [CUDA] Rename SM_32 to SM_32_ to work around AIX headers (PR #88779)

2024-04-16 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/88779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9e7aab9 - [CUDA] Rename SM_32 to SM_32_ to work around AIX headers (#88779)

2024-04-16 Thread via cfe-commits
Author: Joseph Huber Date: 2024-04-16T07:43:13-05:00 New Revision: 9e7aab951ffba0211193ceb435c6b49e4e19ac24 URL: https://github.com/llvm/llvm-project/commit/9e7aab951ffba0211193ceb435c6b49e4e19ac24 DIFF: https://github.com/llvm/llvm-project/commit/9e7aab951ffba0211193ceb435c6b49e4e19ac24.diff

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
martinboehme wrote: > Clearly, this is a matter of taste, so I would defer to your opinion, since > you are the primary maintainer of this code. But, personally, I prefer this > style since it makes clear that the body of the function is a single case > analysis, which is not obvious from the

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes See also discussion in #88726. --- Full diff: https://github.com/llvm/llvm-project/pull/88865.diff 1 Files Affected: - (modified)

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme ready_for_review https://github.com/llvm/llvm-project/pull/88865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaOpenMP` (PR #88642)

2024-04-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/88642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SEH] Ignore async exception flag when the environment is not MSVC (PR #88101)

2024-04-16 Thread Nico Weber via cfe-commits
nico wrote: e272c37934a06cd80b9b072afc09afae5fd8c218 might have fixed this. (Didn't test locally, will check what the bot says.) https://github.com/llvm/llvm-project/pull/88101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] e272c37 - clang; Try to get windows-seh-async-verify.cpp to pass on mac

2024-04-16 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2024-04-16T08:33:25-04:00 New Revision: e272c37934a06cd80b9b072afc09afae5fd8c218 URL: https://github.com/llvm/llvm-project/commit/e272c37934a06cd80b9b072afc09afae5fd8c218 DIFF: https://github.com/llvm/llvm-project/commit/e272c37934a06cd80b9b072afc09afae5fd8c218.diff

[clang] [SEH] Ignore async exception flag when the environment is not MSVC (PR #88101)

2024-04-16 Thread Nico Weber via cfe-commits
nico wrote: Oh, I think it's just the old ` clang: warning: '/Users/thakis/src/llvm-project/clang/test/Driver/windows-seh-async-verify.cpp' treated as the '/U' option [-Wslash-u-filename]`. I'll try pushing a fix. https://github.com/llvm/llvm-project/pull/88101

[clang] [clang][dataflow] Treat `BuiltinBitCastExpr` correctly in `PropagateResultObject()`. (PR #88875)

2024-04-16 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/88875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Support `StmtExpr` in `PropagateResultObject()`. (PR #88872)

2024-04-16 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/88872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SEH] Ignore async exception flag when the environment is not MSVC (PR #88101)

2024-04-16 Thread Nico Weber via cfe-commits
nico wrote: Looks like breaks check-clang on macOS: http://45.33.8.238/macm1/83520/step_6.txt Please take a look and revert for now if it takes a while to fix. https://github.com/llvm/llvm-project/pull/88101 ___ cfe-commits mailing list

[clang] Revert "[codegen] Emit missing cleanups for stmt-expr and coro suspensions" and related commits (PR #88884)

2024-04-16 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 c309dc6d0759b23b570c563f611530ff1a49e1bd b4a56290ff5d4fd2e1fb90dc974c5bb7030d61cb --

[clang] Revert "[codegen] Emit missing cleanups for stmt-expr and coro suspensions" and related commits (PR #88884)

2024-04-16 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 668a58b8926473d731c41c55007f1fe4571ada86 3b835fd6d6404cce1a2d82fb3dfd56720fc90a4b --

[clang] Revert "[codegen] Emit missing cleanups for stmt-expr and coro suspensions" and related commits (PR #88884)

2024-04-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/4 >From 97026ca24fe5e6408786d663ce3fda4e0671dad4 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 16 Apr 2024 12:16:24 + Subject: [PATCH 1/3] Revert "Fix missing dtor in function calls accepting trivial

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread Yitzhak Mandelbaum via cfe-commits
ymand wrote: Clearly, this is a matter of taste, so I would defer to your opinion, since you are the primary maintainer of this code. But, personally, I prefer this style since it makes clear that the body of the function is a single case analysis, which is not obvious from the series of if

[clang] Revert "[codegen] Emit missing cleanups for stmt-expr and coro suspensions" and related commits (PR #88884)

2024-04-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/4 None >From 97026ca24fe5e6408786d663ce3fda4e0671dad4 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 16 Apr 2024 12:16:24 + Subject: [PATCH 1/3] Revert "Fix missing dtor in function calls accepting

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-04-16 Thread via cfe-commits
github-actions[bot] wrote: @mahtohappy Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

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

[clang] c309dc6 - [Clang][Sema] placement new initializes typedef array with correct size (#83124)

2024-04-16 Thread via cfe-commits
Author: mahtohappy Date: 2024-04-16T14:18:45+02:00 New Revision: c309dc6d0759b23b570c563f611530ff1a49e1bd URL: https://github.com/llvm/llvm-project/commit/c309dc6d0759b23b570c563f611530ff1a49e1bd DIFF: https://github.com/llvm/llvm-project/commit/c309dc6d0759b23b570c563f611530ff1a49e1bd.diff

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-16 Thread via cfe-commits
yronglin wrote: @tbaederr @Sirraide Thanks for your review! I still have some questions, should we give tips to the user that which options cannot apply on LLVM IR files? Do we have any precedent or design principles for dealing with mutually exclusive options?

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-16 Thread via cfe-commits
@@ -370,4 +370,7 @@ def warn_missing_symbol_graph_dir : Warning< "Missing symbol graph output directory, defaulting to working directory">, InGroup; +def err_ast_action_on_unparsable_source : Error< + "can not apply ast actions to LLVM IR file '%0'">,

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-16 Thread via cfe-commits
@@ -370,4 +370,7 @@ def warn_missing_symbol_graph_dir : Warning< "Missing symbol graph output directory, defaulting to working directory">, InGroup; +def err_ast_action_on_unparsable_source : Error< + "can not apply ast actions to LLVM IR file '%0'">,

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-16 Thread via cfe-commits
@@ -370,4 +370,7 @@ def warn_missing_symbol_graph_dir : Warning< "Missing symbol graph output directory, defaulting to working directory">, InGroup; +def err_ast_action_on_unparsable_source : Error< yronglin wrote: Agree, I've changed the name to

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-16 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/88602 >From 9d0656461683c4a6af76aa3990def06b04eb1b0a Mon Sep 17 00:00:00 2001 From: yronglin Date: Sat, 13 Apr 2024 15:46:36 +0800 Subject: [PATCH 1/2] [Clang] Diagnose apply AST consume actions on LLVM IR

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

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

[clang] 75244a1 - [clang][Interp] Implement align builtins

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T13:58:52+02:00 New Revision: 75244a1043d2be5003dea6914d5edc940c437cd5 URL: https://github.com/llvm/llvm-project/commit/75244a1043d2be5003dea6914d5edc940c437cd5 DIFF: https://github.com/llvm/llvm-project/commit/75244a1043d2be5003dea6914d5edc940c437cd5.diff

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/88857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s + +// CHECK: %[[STRUCT_TRIVIAL:.*]] = type { ptr } +struct __attribute__((trivial_abi)) Trivial { + int *p; + Trivial() : p(0) {} +

[clang] Improve stack usage to increase recursive initialization depth (PR #88546)

2024-04-16 Thread Aaron Ballman via cfe-commits
@@ -1070,57 +1077,24 @@ class Sema; }; private: -SmallVector Candidates; -llvm::SmallPtrSet Functions; - -// Allocator for ConversionSequenceLists. We store the first few of these -// inline to avoid allocation for small sets. -llvm::BumpPtrAllocator

[clang] [Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer (PR #87933)

2024-04-16 Thread via cfe-commits
yronglin wrote: friendly ping~ https://github.com/llvm/llvm-project/pull/87933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/86512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
@@ -2667,6 +2667,29 @@ bool QualType::isTriviallyCopyableType(const ASTContext ) const { /*IsCopyConstructible=*/false); } +bool QualType::isBitwiseCopyableType(const ASTContext & Context) const { + QualType CanonicalType =

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
@@ -917,6 +917,18 @@ class QualType { /// Return true if this is a trivially copyable type (C++0x [basic.types]p9) bool isTriviallyCopyableType(const ASTContext ) const; + /// Return true if this is a bitwise copyable type. + /// + /// This is an extension in clang:

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
@@ -526,6 +526,7 @@ TYPE_TRAIT_2(__is_layout_compatible, IsLayoutCompatible, KEYCXX) #include "clang/Basic/TransformTypeTraits.def" // Clang-only C++ Type Traits +TYPE_TRAIT_1(__is_bitwise_copyable, IsBitwiseCopyable, KEYCXX) hokein wrote: Done, added one,

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
@@ -917,6 +917,18 @@ class QualType { /// Return true if this is a trivially copyable type (C++0x [basic.types]p9) bool isTriviallyCopyableType(const ASTContext ) const; + /// Return true if this is a bitwise copyable type. + /// + /// This is an extension in clang:

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
@@ -526,6 +526,7 @@ TYPE_TRAIT_2(__is_layout_compatible, IsLayoutCompatible, KEYCXX) #include "clang/Basic/TransformTypeTraits.def" // Clang-only C++ Type Traits +TYPE_TRAIT_1(__is_bitwise_copyable, IsBitwiseCopyable, KEYCXX) hokein wrote: switched to

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s + +// Scalar types are bitwise copyable. +static_assert(__is_bitwise_copyable(int)); +static_assert(__is_bitwise_copyable(int*)); +// array +static_assert(__is_bitwise_copyable(int[10])); + + +struct

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
@@ -2667,6 +2667,29 @@ bool QualType::isTriviallyCopyableType(const ASTContext ) const { /*IsCopyConstructible=*/false); } +bool QualType::isBitwiseCopyableType(const ASTContext & Context) const { + QualType CanonicalType =

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
@@ -5056,6 +5056,8 @@ static bool CheckUnaryTypeTraitTypeCompleteness(Sema , TypeTrait UTT, case UTT_IsStandardLayout: case UTT_IsPOD: case UTT_IsLiteral: + // Clang extension: hokein wrote: Removed. https://github.com/llvm/llvm-project/pull/86512

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
@@ -526,6 +526,7 @@ TYPE_TRAIT_2(__is_layout_compatible, IsLayoutCompatible, KEYCXX) #include "clang/Basic/TransformTypeTraits.def" // Clang-only C++ Type Traits +TYPE_TRAIT_1(__is_bitwise_copyable, IsBitwiseCopyable, KEYCXX) hokein wrote: OK, renamed to

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
@@ -2667,6 +2667,29 @@ bool QualType::isTriviallyCopyableType(const ASTContext ) const { /*IsCopyConstructible=*/false); } +bool QualType::isBitwiseCopyableType(const ASTContext & Context) const { + QualType CanonicalType =

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/86512 >From 10d4b9e505d5ad7476071153d2d13799f5b5cf1f Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 25 Mar 2024 15:10:51 +0100 Subject: [PATCH 1/2] [clang] Implement a bitwise_copyable builtin type trait. This

[clang] [Coverage] Handle array decomposition correctly (PR #88881)

2024-04-16 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a edited https://github.com/llvm/llvm-project/pull/1 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Handle array decomposition correctly (PR #88881)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andrey Ali Khan Bolshakov (bolshakov-a) Changes `ArrayInitLoopExpr` AST node has two occurences of its as-written initializing expression in its subexpressions through a non-unique `OpaqueValueExpr`. It causes double-visiting of the

[clang] [Coverage] Handle array decomposition correctly (PR #88881)

2024-04-16 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a created https://github.com/llvm/llvm-project/pull/1 `ArrayInitLoopExpr` AST node has two occurences of its as-written initializing expression in its subexpressions through a non-unique `OpaqueValueExpr`. It causes double-visiting of the initializing

[clang] [OpenACC] Implement `self` clause for compute constructs (PR #88760)

2024-04-16 Thread Alexey Bataev via cfe-commits
@@ -160,12 +169,58 @@ SemaOpenACC::ActOnClause(ArrayRef ExistingClauses, // The parser has ensured that we have a proper condition expr, so there // isn't really much to do here. -// TODO OpenACC: When we implement 'self', this clauses causes us to -//

[clang] [OpenACC] Implement `self` clause for compute constructs (PR #88760)

2024-04-16 Thread Alexey Bataev via cfe-commits
@@ -160,12 +169,58 @@ SemaOpenACC::ActOnClause(ArrayRef ExistingClauses, // The parser has ensured that we have a proper condition expr, so there // isn't really much to do here. -// TODO OpenACC: When we implement 'self', this clauses causes us to -//

[clang] [OpenACC] Implement `self` clause for compute constructs (PR #88760)

2024-04-16 Thread Alexey Bataev via cfe-commits
@@ -835,18 +835,23 @@ Parser::OpenACCClauseParseResult Parser::ParseOpenACCClauseParams( case OpenACCClauseKind::Default: { Token DefKindTok = getCurToken(); - if (expectIdentifierOrKeyword(*this)) -break; + if (expectIdentifierOrKeyword(*this)) {

[clang] [clang][Index] Use canonical function parameter types in USRs (PR #68222)

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

[clang] 71b9f66 - [clang][Index] Use canonical function parameter types in USRs (#68222)

2024-04-16 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-04-16T07:34:27-04:00 New Revision: 71b9f6648222771470473431bc8ef2a2c25e872c URL: https://github.com/llvm/llvm-project/commit/71b9f6648222771470473431bc8ef2a2c25e872c DIFF:

[clang] [analyzer] Use explicit call description mode (easy cases) (PR #88879)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (NagyDonat) Changes This commit explicitly specifies the matching mode (C library function, any non-method function, or C++ method) for the `CallDescription`s constructed in various checkers where this transition

[clang] [analyzer] Use explicit call description mode (easy cases) (PR #88879)

2024-04-16 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/88879 This commit explicitly specifies the matching mode (C library function, any non-method function, or C++ method) for the `CallDescription`s constructed in various checkers where this transition was easy and

[clang] a8de3ee - [clang][Interp][NFC] Fix some build warnings

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T13:29:41+02:00 New Revision: a8de3ee8994023ea7669397587f8118ae5bba9c9 URL: https://github.com/llvm/llvm-project/commit/a8de3ee8994023ea7669397587f8118ae5bba9c9 DIFF: https://github.com/llvm/llvm-project/commit/a8de3ee8994023ea7669397587f8118ae5bba9c9.diff

[clang] 09e7d75 - [clang][Interp] Don't add 'in call to' diagnostics for builtin frames

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T13:29:41+02:00 New Revision: 09e7d7585cf881fb598eb56738579b84d027318c URL: https://github.com/llvm/llvm-project/commit/09e7d7585cf881fb598eb56738579b84d027318c DIFF: https://github.com/llvm/llvm-project/commit/09e7d7585cf881fb598eb56738579b84d027318c.diff

[libclc] [WIP] Libclc tests (PR #87989)

2024-04-16 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/87989 >From c53dc3564822f305d09d19dc3b7327b33028fe11 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Thu, 4 Apr 2024 17:49:13 +0100 Subject: [PATCH] [libclc] Add initial LIT tests --- libclc/CMakeLists.txt

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Tobias Hieta via cfe-commits
https://github.com/tru updated https://github.com/llvm/llvm-project/pull/88857 >From 08214d87d1a7c83ea25eef3bf18de1568a20a152 Mon Sep 17 00:00:00 2001 From: Tobias Hieta Date: Tue, 16 Apr 2024 09:38:53 +0200 Subject: [PATCH] [clang] Handle trivial_abi attribute for Microsoft ABI. Previously

[clang] [clang][dataflow] Treat `BuiltinBitCastExpr` correctly in `PropagateResultObject()`. (PR #88875)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes This patch includes a test that assert-fails without the fix. --- Full diff: https://github.com/llvm/llvm-project/pull/88875.diff 2 Files Affected: - (modified)

[clang] [clang][dataflow] Treat `BuiltinBitCastExpr` correctly in `PropagateResultObject()`. (PR #88875)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes This patch includes a test that assert-fails without the fix. --- Full diff: https://github.com/llvm/llvm-project/pull/88875.diff 2 Files Affected: - (modified)

[clang] [clang][dataflow] Treat `BuiltinBitCastExpr` correctly in `PropagateResultObject()`. (PR #88875)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/88875 This patch includes a test that assert-fails without the fix. >From c8797bbbdb32d9f153b36b6902f8562af75fb896 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 16 Apr 2024 11:13:00 + Subject:

[clang] [llvm] [ValueTracking] Restore isKnownNonZero parameter order. (PR #88873)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Harald van Dijk (hvdijk) Changes Prior to #85863, the required parameters of llvm::isKnownNonZero were Value and DataLayout. After, they are Value, Depth, and SimplifyQuery, where SimplifyQuery is implicitly constructible from

[clang] [llvm] [ValueTracking] Convert `isKnownNonZero` to use SimplifyQuery (PR #85863)

2024-04-16 Thread Harald van Dijk via cfe-commits
@@ -645,7 +645,7 @@ LazyValueInfoImpl::solveBlockValueImpl(Value *Val, BasicBlock *BB) { // instruction is placed, even if it could legally be hoisted much higher. // That is unfortunate. PointerType *PT = dyn_cast(BBI->getType()); - if (PT && isKnownNonZero(BBI, DL))

[clang] [llvm] [ValueTracking] Restore isKnownNonZero parameter order. (PR #88873)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Harald van Dijk (hvdijk) Changes Prior to #85863, the required parameters of llvm::isKnownNonZero were Value and DataLayout. After, they are Value, Depth, and SimplifyQuery, where SimplifyQuery is implicitly constructible from

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-04-16 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/83124 >From a6fc7dbd5d71c1484d78e518648fb3f0f8e593d2 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Tue, 27 Feb 2024 03:13:51 -0800 Subject: [PATCH] [Clang][Sema] placement new initializes typedef array with

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Tobias Hieta via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s + +// CHECK: %[[STRUCT_TRIVIAL:.*]] = type { ptr } +struct __attribute__((trivial_abi)) Trivial { + int *p; + Trivial() : p(0) {} +

[clang] [llvm] [ValueTracking] Restore isKnownNonZero parameter order. (PR #88873)

2024-04-16 Thread Harald van Dijk via cfe-commits
https://github.com/hvdijk created https://github.com/llvm/llvm-project/pull/88873 Prior to #85863, the required parameters of llvm::isKnownNonZero were Value and DataLayout. After, they are Value, Depth, and SimplifyQuery, where SimplifyQuery is implicitly constructible from DataLayout. The

[clang] [clang][dataflow] Support `StmtExpr` in `PropagateResultObject()`. (PR #88872)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes This patch adds a test that assert-fails without the fix. --- Full diff: https://github.com/llvm/llvm-project/pull/88872.diff 2 Files Affected: - (modified)

[clang] [clang][dataflow] Support `StmtExpr` in `PropagateResultObject()`. (PR #88872)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes This patch adds a test that assert-fails without the fix. --- Full diff: https://github.com/llvm/llvm-project/pull/88872.diff 2 Files Affected: - (modified)

[clang] [clang][dataflow] Support `StmtExpr` in `PropagateResultObject()`. (PR #88872)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/88872 This patch adds a test that assert-fails without the fix. >From b2df2208aaee019279afe362ff538e97d59497dd Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 16 Apr 2024 11:03:47 + Subject:

[clang] 32b74ca - [clang][Interp] Load value from MemberExpr if required

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T13:04:28+02:00 New Revision: 32b74ca6e41768c91eee8b8ca26235b110a65deb URL: https://github.com/llvm/llvm-project/commit/32b74ca6e41768c91eee8b8ca26235b110a65deb DIFF: https://github.com/llvm/llvm-project/commit/32b74ca6e41768c91eee8b8ca26235b110a65deb.diff

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/88865 >From 440ace1337ed7a06286a4455e3e6e428d14d847d Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 16 Apr 2024 09:52:35 + Subject: [PATCH] [clang][dataflow] Refactor `PropagateResultObject()` with

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/88182 >From 426e74cabb003eb5dc83adf347a5800d49bc87b7 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 18 Mar 2024 11:49:12 + Subject: [PATCH 1/7] Start migrating away from the embedded assumption that the

[clang] [llvm] [clang][CodeGen] Add AS for Globals to SPIR & SPIRV datalayouts (PR #88455)

2024-04-16 Thread Alex Voicu via cfe-commits
AlexVlx wrote: Merged, thanks everyone for the reviews! https://github.com/llvm/llvm-project/pull/88455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CodeGen] Add AS for Globals to SPIR & SPIRV datalayouts (PR #88455)

2024-04-16 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/88455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1120d8e - [clang][CodeGen] Add AS for Globals to SPIR & SPIRV datalayouts (#88455)

2024-04-16 Thread via cfe-commits
Author: Alex Voicu Date: 2024-04-16T11:37:29+01:00 New Revision: 1120d8e6f799121b611aa23bdc128e40cf9c6c58 URL: https://github.com/llvm/llvm-project/commit/1120d8e6f799121b611aa23bdc128e40cf9c6c58 DIFF: https://github.com/llvm/llvm-project/commit/1120d8e6f799121b611aa23bdc128e40cf9c6c58.diff

[clang] c09384e - [clang][Interp] Support MemberExprs pointing to VarDecls

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T12:34:35+02:00 New Revision: c09384e2b419c7b4e4167e0d0295d9018cc6169c URL: https://github.com/llvm/llvm-project/commit/c09384e2b419c7b4e4167e0d0295d9018cc6169c DIFF: https://github.com/llvm/llvm-project/commit/c09384e2b419c7b4e4167e0d0295d9018cc6169c.diff

[clang] b0194d2 - [SEH] Ignore async exception flag when the environment is not MSVC (#88101)

2024-04-16 Thread via cfe-commits
Author: Phoebe Wang Date: 2024-04-16T18:19:50+08:00 New Revision: b0194d2894db49d7cf4d36aed87952c3e0c6a390 URL: https://github.com/llvm/llvm-project/commit/b0194d2894db49d7cf4d36aed87952c3e0c6a390 DIFF: https://github.com/llvm/llvm-project/commit/b0194d2894db49d7cf4d36aed87952c3e0c6a390.diff

[clang] [SEH] Ignore async exception flag when the environment is not MSVC (PR #88101)

2024-04-16 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/88101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a831c54 - [clang][Interp] Avoid calling invalid functions

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T12:09:49+02:00 New Revision: a831c54357c2bb7b8b457ccea22836c23e8b8625 URL: https://github.com/llvm/llvm-project/commit/a831c54357c2bb7b8b457ccea22836c23e8b8625 DIFF: https://github.com/llvm/llvm-project/commit/a831c54357c2bb7b8b457ccea22836c23e8b8625.diff

[clang] 31424be - [clang][Interp][NFC] Compare std::optionals directly

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T12:09:49+02:00 New Revision: 31424be3aef4290dd84065b9371fcd0c5014e097 URL: https://github.com/llvm/llvm-project/commit/31424be3aef4290dd84065b9371fcd0c5014e097 DIFF: https://github.com/llvm/llvm-project/commit/31424be3aef4290dd84065b9371fcd0c5014e097.diff

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s + +// CHECK: %[[STRUCT_TRIVIAL:.*]] = type { ptr } +struct __attribute__((trivial_abi)) Trivial { + int *p; + Trivial() : p(0) {} +

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Reid Kleckner via cfe-commits
@@ -63,6 +63,10 @@ ABI Changes in This Version MSVC uses a different mangling for these objects, compatibility is not affected. (#GH85423). +- The attribute ``trivial_abi`` now works when targetting the Microsoft ABI. Marking rnk wrote: It's overly

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
martinboehme wrote: Here's a draft that shows what `PropagateResultObject()` looks like when refactored using a switch statement. I'm not sure if this is an improvement or not. I do see how this makes the case distinction clearer -- OTOH, we have one more level of indentation now (though

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 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 3c6f91e5b671321c95259dabecdbdfe4a6d69ce1 3da6980d1957c19bdb821c6059c032b1e1c55863 --

[clang] [clang][dataflow] Fix result object location for builtin `<=>`. (PR #88726)

2024-04-16 Thread via cfe-commits
@@ -508,6 +508,11 @@ class ResultObjectVisitor : public RecursiveASTVisitor { isa(E)) { return; } +if (auto *Op = dyn_cast(E); martinboehme wrote: See https://github.com/llvm/llvm-project/pull/88865 for the PR that refactors this into

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/88865 See also discussion in #88726. >From 3da6980d1957c19bdb821c6059c032b1e1c55863 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 16 Apr 2024 09:52:35 + Subject: [PATCH] [clang][dataflow]

[clang] ca4cf97 - [clang][Interp][NFC] Fix Pointer::isZero() for block pointers

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T11:45:03+02:00 New Revision: ca4cf973279a3991248056a73bcb2bac8b37d035 URL: https://github.com/llvm/llvm-project/commit/ca4cf973279a3991248056a73bcb2bac8b37d035 DIFF: https://github.com/llvm/llvm-project/commit/ca4cf973279a3991248056a73bcb2bac8b37d035.diff

[clang] 58b49ce - [clang][Interp] Support __builtin_vectorelements

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T11:21:41+02:00 New Revision: 58b49cef1d772a922a433fd4a42e41db3f18d34b URL: https://github.com/llvm/llvm-project/commit/58b49cef1d772a922a433fd4a42e41db3f18d34b DIFF: https://github.com/llvm/llvm-project/commit/58b49cef1d772a922a433fd4a42e41db3f18d34b.diff

[clang] 485d556 - [clang][Interp][NFC] Add Block::dump()

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T11:15:11+02:00 New Revision: 485d556d8c23b54da952e75c3cadc9db3050fd9e URL: https://github.com/llvm/llvm-project/commit/485d556d8c23b54da952e75c3cadc9db3050fd9e DIFF: https://github.com/llvm/llvm-project/commit/485d556d8c23b54da952e75c3cadc9db3050fd9e.diff

<    1   2   3   4   5   >