[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-07 Thread Yuxuan Chen via cfe-commits
@@ -1217,6 +1217,14 @@ def CoroDisableLifetimeBound : InheritableAttr { let SimpleHandler = 1; } +def CoroAwaitElidable : InheritableAttr { yuxuanchen1997 wrote: I am adding this ``` - Introduced a new attribute ``[[clang::coro_await_elidable]]`` on corout

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-07 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/99282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Mark exported functions with "hlsl.export" attribute (PR #102275)

2024-08-07 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,19 @@ +; RUN: opt -S -dxil-metadata-emit %s | FileCheck %s + +target triple = "dxilv1.3-unknown-shadermodel6.3-library" + +define void @"?f1@@YAXXZ"() #0 { +entry: + ret void +} + +define void @"?f2@MyNamespace@@YAXXZ"() #0 { +entry: + ret void +} + h

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

2024-08-07 Thread Joshua Batista via cfe-commits
@@ -916,7 +916,7 @@ float4 lerp(float4, float4, float4); /// \brief Returns the length of the specified floating-point vector. /// \param x [in] The vector of floats, or a scalar float. /// -/// Length is based on the following formula: sqrt(x[0]^2 + x[1]^2 + �). +/// Length is

[clang] 37ec6e5 - [Clang] Strengthen checks for `main` to meet `[basic.start.main]p3`’s requirements (#101853)

2024-08-07 Thread via cfe-commits
Author: Oleksandr T. Date: 2024-08-08T01:15:35+02:00 New Revision: 37ec6e5f12afe4a37872bf28f280423696f39019 URL: https://github.com/llvm/llvm-project/commit/37ec6e5f12afe4a37872bf28f280423696f39019 DIFF: https://github.com/llvm/llvm-project/commit/37ec6e5f12afe4a37872bf28f280423696f39019.diff

[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

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

[clang] [Modules] Fix cyclic module dependencies in clang (PR #102348)

2024-08-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM, would be great to do the follow-up you suggest. https://github.com/llvm/llvm-project/pull/102348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-08-07 Thread Daniil Kovalev via cfe-commits
@@ -1056,12 +1056,18 @@ class ConstantPtrAuth final : public Constant { return !getAddrDiscriminator()->isNullValue(); } - /// A constant value for the address discriminator which has special - /// significance to ctors/dtors lowering. Regular address discrimination c

[clang] 61c0a6d - [Modules] Fix cyclic module dependencies in clang (#102348)

2024-08-07 Thread via cfe-commits
Author: Steven Wu Date: 2024-08-07T16:26:39-07:00 New Revision: 61c0a6d72d53107b683b3c4d636df7b9be0d4d09 URL: https://github.com/llvm/llvm-project/commit/61c0a6d72d53107b683b3c4d636df7b9be0d4d09 DIFF: https://github.com/llvm/llvm-project/commit/61c0a6d72d53107b683b3c4d636df7b9be0d4d09.diff LOG

[clang] [Modules] Fix cyclic module dependencies in clang (PR #102348)

2024-08-07 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan closed https://github.com/llvm/llvm-project/pull/102348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7e9c233 - Run test with triple arm64-apple-ios (#102343)

2024-08-07 Thread via cfe-commits
Author: Akira Hatanaka Date: 2024-08-07T16:48:29-07:00 New Revision: 7e9c23352945af72227481e03d3a3f388de6ab46 URL: https://github.com/llvm/llvm-project/commit/7e9c23352945af72227481e03d3a3f388de6ab46 DIFF: https://github.com/llvm/llvm-project/commit/7e9c23352945af72227481e03d3a3f388de6ab46.diff

[clang] Run test with triple arm64-apple-ios (PR #102343)

2024-08-07 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/102343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c4de358 - [libc] Fix wrapper headers for `at_quick_exit` on GLIBC

2024-08-07 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-08-07T19:12:26-05:00 New Revision: c4de35813a11b311c4bba013d8571f1a7e62e02e URL: https://github.com/llvm/llvm-project/commit/c4de35813a11b311c4bba013d8571f1a7e62e02e DIFF: https://github.com/llvm/llvm-project/commit/c4de35813a11b311c4bba013d8571f1a7e62e02e.diff

[clang] [clang][modules] Enable built-in modules for the upcoming Apple releases (PR #102239)

2024-08-07 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: /cherry-pick 0f1361baf650641a59aaa1710d7a0b7b02f2e56d https://github.com/llvm/llvm-project/pull/102239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Enable built-in modules for the upcoming Apple releases (PR #102239)

2024-08-07 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 0f1361baf650641a59aaa1710d7a0b7b02f2e56d https://github.com/llvm/llvm-project/actions/runs/10294025156 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-proje

[clang] [Fuchsia][CMake] Enable new libc header gen (PR #102371)

2024-08-07 Thread via cfe-commits
https://github.com/zeroomega approved this pull request. Feel free to land it once pyyaml dependency issue is solved. https://github.com/llvm/llvm-project/pull/102371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] #101784 part 1: fix error handling of TranslationUnit.reparse (PR #102410)

2024-08-07 Thread via cfe-commits
https://github.com/TsXor created https://github.com/llvm/llvm-project/pull/102410 None >From c11dcf93d924eb9347d4cc9833c8b684920dfba0 Mon Sep 17 00:00:00 2001 From: TsXor Date: Thu, 8 Aug 2024 09:25:52 +0800 Subject: [PATCH] fix error handling of TranslationUnit.reparse --- clang/bindings/py

[clang] #101784 part 2: fix error handling of TranslationUnit.reparse (PR #102410)

2024-08-07 Thread via cfe-commits
https://github.com/TsXor edited https://github.com/llvm/llvm-project/pull/102410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] #101784 part 2: fix error handling of TranslationUnit.reparse (PR #102410)

2024-08-07 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] #101784 part 2: fix error handling of TranslationUnit.reparse (PR #102410)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (TsXor) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/102410.diff 1 Files Affected: - (modified) clang/bindings/python/clang/cindex.py (+38-1) ``diff diff --git a/clang/bindings/python/clang/cindex.py

[clang] [PPC] Disable vsx and altivec when -msoft-float is used (PR #100450)

2024-08-07 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 approved this pull request. LGTM. Thanks for making the fix. https://github.com/llvm/llvm-project/pull/100450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-08-07 Thread via cfe-commits
https://github.com/wangleiat created https://github.com/llvm/llvm-project/pull/102411 draft pr. >From 7bcf5ebc9444e7cb98746ef0d182cbd4b60196e2 Mon Sep 17 00:00:00 2001 From: wanglei Date: Thu, 8 Aug 2024 09:41:25 +0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-loongarch Author: wanglei (wangleiat) Changes draft pr. --- Full diff: https://github.com/llvm/llvm-project/pull/102411.diff 6 Files Affected: - (modified) clang/include/clang/Driver/Options.td (+4) - (modified) clang/lib/Driver/ToolChains/

[clang] [compiler-rt] [llvm] [RISCV] Support new groupid/bitmask for cpu_model (PR #101632)

2024-08-07 Thread Craig Topper via cfe-commits
@@ -334,6 +354,8 @@ int test_riscv(int a) { return 7; else if (__builtin_cpu_supports("v")) return 11; + else if (__builtin_cpu_supports("zcb")) +return 11; topperc wrote: Pick a different number than 11 since it was already used for `v` https:

[clang] [SPARC][clang] Add -m(no-)v8plus flags handling (PR #98713)

2024-08-07 Thread via cfe-commits
koachan wrote: Ping? https://github.com/llvm/llvm-project/pull/98713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-08-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/99300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9d315bc - [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (#99300)

2024-08-07 Thread via cfe-commits
Author: Sharadh Rajaraman Date: 2024-08-08T10:00:31+08:00 New Revision: 9d315bc45f2bb04333b1dd9d06d1f49d981b8283 URL: https://github.com/llvm/llvm-project/commit/9d315bc45f2bb04333b1dd9d06d1f49d981b8283 DIFF: https://github.com/llvm/llvm-project/commit/9d315bc45f2bb04333b1dd9d06d1f49d981b8283.d

[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-08-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/99300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-08-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 milestoned https://github.com/llvm/llvm-project/pull/99300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-08-07 Thread via cfe-commits
github-actions[bot] wrote: @sharadhr 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 build

[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-08-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: /cherry-pick 9d315bc https://github.com/llvm/llvm-project/pull/99300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -848,7 +862,21 @@ ExprResult Sema::BuildUnresolvedCoawaitExpr(SourceLocation Loc, Expr *Operand, } auto *RD = Promise->getType()->getAsCXXRecordDecl(); - auto *Transformed = Operand; + bool InplaceCall = + isCoroInplaceCall(Operand) && + isAttributedCoroInp

[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-08-07 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 9d315bc https://github.com/llvm/llvm-project/actions/runs/10294654014 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-project/compare) https://github.com/l

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -8119,6 +8119,35 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroAwaitElidableDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_await_elidable]]`` is a class attribute which can be applie

[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-08-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: >From the log, it looks like the git crashes instead of conflicts. @tru would >you like to take look. @sharadhr also if you want to backport this to 19.x, maybe you can try to create a PR to the branch of 19.x branch manually in case the automated cherry-pick doesn't work.

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -5443,24 +5444,38 @@ RValue CodeGenFunction::EmitRValueForField(LValue LV, //======// RValue CodeGenFunction::EmitCallExpr(const CallExpr *E, - ReturnValueSlot ReturnValu

[clang] [clang][ASTMatcher] Add `matchesString` for `StringLiteral` which matches literals on given `RegExp` (PR #102152)

2024-08-07 Thread via cfe-commits
https://github.com/Gitspike updated https://github.com/llvm/llvm-project/pull/102152 >From 3ebc5e1cc8b1b539579859745ac831bdcab79df1 Mon Sep 17 00:00:00 2001 From: hehouhua Date: Wed, 7 Aug 2024 11:55:30 +0800 Subject: [PATCH 1/2] [clang][ASTMatcher] Add matches for StringLiteral which matches

[clang] #101784 part 1: introduce ctyped in an independent manner (PR #101941)

2024-08-07 Thread via cfe-commits
TsXor wrote: I still think we can still do something to stop #101548 from happening again. Here is a script that can locate all `conf.lib.*` calls and find if any of them use an undeclared symbol in `functionList`. Maybe we can add it to test. ```python import ast from typing import Optional, S

[clang] [clang][ASTMatcher] Add `matchesString` for `StringLiteral` which matches literals on given `RegExp` (PR #102152)

2024-08-07 Thread via cfe-commits
Gitspike wrote: > Thank you for this! I think we need to consider some more test cases though, > because string literals aren't trivial. For example: > > * Test the various string literal prefixes like `L` or `u`, etc. How should > this work if the regular expression has a different encoding t

[clang] [C++20] [Modules] Don't set modules owner ship information for builtin declarations (PR #102115)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -2376,6 +2376,12 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, FunctionDecl *New = CreateBuiltin(II, R, ID, Loc); RegisterLocallyScopedExternCDecl(New, S); + // Builtin functions shouldn't be owned by any module. + if (New->hasOwningModule(

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-07 Thread Yuxuan Chen via cfe-commits
@@ -848,7 +862,21 @@ ExprResult Sema::BuildUnresolvedCoawaitExpr(SourceLocation Loc, Expr *Operand, } auto *RD = Promise->getType()->getAsCXXRecordDecl(); - auto *Transformed = Operand; + bool InplaceCall = + isCoroInplaceCall(Operand) && + isAttributedCoroInp

[clang] [HLSL] Split out the ROV attribute from the resource attribute, make it a new spellable attribute. (PR #102414)

2024-08-07 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/102414 Much like #98193, this PR takes some more data out of the resource attribute, specifically the ROV data. This PR introduces a new attribute called HLSLROVAttr, which contains data on whether or not the decl th

[clang] [HLSL] Split out the ROV attribute from the resource attribute, make it a new spellable attribute. (PR #102414)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang-codegen Author: Joshua Batista (bob80905) Changes Much like #98193, this PR takes some more data out of the resource attribute, specifically the ROV data. This PR introduces a new attribute call

[clang] [HLSL] Split out the ROV attribute from the resource attribute, make it a new spellable attribute. (PR #102414)

2024-08-07 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/102414 >From c35e4ec3f8ea27eedc0658921d8d9055451acd91 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 7 Aug 2024 19:34:54 -0700 Subject: [PATCH 1/2] split out ROV from resource attr --- clang/include/clang/

[clang] [Fuchsia][CMake] Remove new/delete from baremetal libc++ (PR #102415)

2024-08-07 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/102415 This is causing issues for some baremetal targets. >From c5a744607dc4a16c67982051befe6681c5c8db3d Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 7 Aug 2024 19:42:39 -0700 Subject: [PATCH] [Fuchsia][CMak

[clang] [Fuchsia][CMake] Remove new/delete from baremetal libc++ (PR #102415)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes This is causing issues for some baremetal targets. --- Full diff: https://github.com/llvm/llvm-project/pull/102415.diff 1 Files Affected: - (modified) clang/cmake/caches/Fuchsia-stage2.cmake (-2) ``

[clang] [clang] Wire -fptrauth-returns to "ptrauth-returns" fn attribute. (PR #102416)

2024-08-07 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha created https://github.com/llvm/llvm-project/pull/102416 We already ended up with -fptrauth-returns, the feature macro, the lang opt, and the actual backend lowering. The only part left is threading it all through PointerAuthOptions, to drive the addition of t

[clang] [clang] Wire -fptrauth-returns to "ptrauth-returns" fn attribute. (PR #102416)

2024-08-07 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl approved this pull request. https://github.com/llvm/llvm-project/pull/102416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement -fptrauth-auth-traps. (PR #102417)

2024-08-07 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha created https://github.com/llvm/llvm-project/pull/102417 This provides -fptrauth-auth-traps, which at the frontend level only controls the addition of the "ptrauth-auth-traps" function attribute. The attribute in turn controls various aspects of backend codege

[clang] [clang][ASTMatcher] Add `matchesString` for `StringLiteral` which matches literals on given `RegExp` (PR #102152)

2024-08-07 Thread via cfe-commits
https://github.com/Gitspike updated https://github.com/llvm/llvm-project/pull/102152 >From 3ebc5e1cc8b1b539579859745ac831bdcab79df1 Mon Sep 17 00:00:00 2001 From: hehouhua Date: Wed, 7 Aug 2024 11:55:30 +0800 Subject: [PATCH 1/2] [clang][ASTMatcher] Add matches for StringLiteral which matches

[clang] [clang] Wire -fptrauth-returns to "ptrauth-returns" fn attribute. (PR #102416)

2024-08-07 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha ready_for_review https://github.com/llvm/llvm-project/pull/102416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement -fptrauth-auth-traps. (PR #102417)

2024-08-07 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha ready_for_review https://github.com/llvm/llvm-project/pull/102417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Wire -fptrauth-returns to "ptrauth-returns" fn attribute. (PR #102416)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Ahmed Bougacha (ahmedbougacha) Changes We already ended up with -fptrauth-returns, the feature macro, the lang opt, and the actual backend lowering. The only part left is threading it all through PointerAuthOptions, to drive the

[clang] [clang] Wire -fptrauth-returns to "ptrauth-returns" fn attribute. (PR #102416)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-x86 Author: Ahmed Bougacha (ahmedbougacha) Changes We already ended up with -fptrauth-returns, the feature macro, the lang opt, and the actual backend lowering. The only part left is threading it all through PointerAu

[clang] [clang] Implement -fptrauth-auth-traps. (PR #102417)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Ahmed Bougacha (ahmedbougacha) Changes This provides -fptrauth-auth-traps, which at the frontend level only controls the addition of the "ptrauth-auth-traps" function attribute. The attribute in turn controls various aspects of b

[clang] [clang] Implement -fptrauth-auth-traps. (PR #102417)

2024-08-07 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl approved this pull request. https://github.com/llvm/llvm-project/pull/102417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Fuchsia][CMake] Remove new/delete from baremetal libc++ (PR #102415)

2024-08-07 Thread via cfe-commits
https://github.com/PiJoules approved this pull request. https://github.com/llvm/llvm-project/pull/102415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fc0802a - [Fuchsia][CMake] Remove new/delete from baremetal libc++ (#102415)

2024-08-07 Thread via cfe-commits
Author: Petr Hosek Date: 2024-08-07T19:53:21-07:00 New Revision: fc0802a1d0bf2ede0ba71df09ddf5e601ab6587b URL: https://github.com/llvm/llvm-project/commit/fc0802a1d0bf2ede0ba71df09ddf5e601ab6587b DIFF: https://github.com/llvm/llvm-project/commit/fc0802a1d0bf2ede0ba71df09ddf5e601ab6587b.diff LO

[clang] [Fuchsia][CMake] Remove new/delete from baremetal libc++ (PR #102415)

2024-08-07 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/102415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/102287 >From 7daf703b8d2602bd13d9eb9a9e6c9487205427b0 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 7 Aug 2024 16:05:44 +0800 Subject: [PATCH 1/2] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable i

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -12432,7 +12432,7 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) { return false; // Variables in other module units shouldn't be forced to be emitted. - if (VD->isInAnotherModuleUnit()) + if (VD->shouldEmitInExternalSource()) ChuanqiXu9 wrote:

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -18484,11 +18484,15 @@ bool Sema::DefineUsedVTables() { bool DefineVTable = true; -// If this class has a key function, but that key function is -// defined in another translation unit, we don't need to emit the -// vtable even though we're using it. c

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -5317,6 +5329,17 @@ void ASTWriter::WriteSpecialDeclRecords(Sema &SemaRef) { } if (!DeleteExprsToAnalyze.empty()) Stream.EmitRecord(DELETE_EXPRS_TO_ANALYZE, DeleteExprsToAnalyze); + + RecordData VTablesToEmit; + for (CXXRecordDecl *RD : PendingEmittingVTables) { +

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -790,6 +790,11 @@ class ASTReader /// the consumer eagerly. SmallVector EagerlyDeserializedDecls; + /// The IDs of all vtables to emit. The referenced declarations are passed + /// to the consumers's HandleVTable eagerly after passing ChuanqiXu9 wrote

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -1124,20 +1124,36 @@ bool Decl::isInAnotherModuleUnit() const { if (!M) return false; + // FIXME or NOTE: maybe we need to be clear about the semantics + // of clang header modules. e.g., if this lives in a clang header + // module included by the current unit, sho

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -1225,13 +1252,7 @@ bool CodeGenVTables::isVTableExternal(const CXXRecordDecl *RD) { const FunctionDecl *Def; // Otherwise, if we don't have a definition of the key function, the // vtable must be defined somewhere else. - if (!keyFunction->hasBody(Def)) -return

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -1216,6 +1228,21 @@ bool CodeGenVTables::isVTableExternal(const CXXRecordDecl *RD) { TSK == TSK_ExplicitInstantiationDefinition) return false; + // Itanium C++ ABI [5.2.3]: + // Virtual tables for dynamic classes are emitted as follows: + // + // - If the cla

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -5163,6 +5168,13 @@ void ASTWriter::PrepareWritingSpecialDecls(Sema &SemaRef) { // Write all of the DeclsToCheckForDeferredDiags. for (auto *D : SemaRef.DeclsToCheckForDeferredDiags) GetDeclRef(D); + + // Write all classes need to emit the vtable definitions if req

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -1081,29 +1081,41 @@ llvm::GlobalVariable::LinkageTypes CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { if (!RD->isExternallyVisible()) return llvm::GlobalVariable::InternalLinkage; - - // We're at the end of the translation unit, so the current key - // f

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
@@ -1529,8 +1529,14 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { if (D->isThisDeclarationADefinition()) Record.AddCXXDefinitionData(D); + if (D->isCompleteDefinition() && D->isInNamedModule()) +Writer.AddDeclRef(D, Writer.ModularCodegenDecls); +

[clang] [Fuchsia][CMake] Remove new/delete from baremetal libc++ (PR #102415)

2024-08-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/1918 Here is the relevant piece of the build log

[clang] [compiler-rt] [llvm] [RISCV] Support new groupid/bitmask for cpu_model (PR #101632)

2024-08-07 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/101632 >From 91ebb0568f28015006e3443221ae51f92c159dfb Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Fri, 2 Aug 2024 01:07:04 -0700 Subject: [PATCH 1/5] [RISCV] Suuport new bitmask for cpu_model --- clang/lib/CodeGen/CG

[clang] [compiler-rt] [llvm] [RISCV] Support new groupid/bitmask for cpu_model (PR #101632)

2024-08-07 Thread Piyou Chen via cfe-commits
@@ -1056,24 +1056,12 @@ constexpr static RISCVExtBit RISCVBitPositions[] = { {"zcf", 1, 5},{"zcmop", 1, 6}, {"zawrs", 1, 7}}; -int RISCVISAInfo::getRISCVFeaturesBitPosition(StringRef Ext) { +std::pair RISCVISAInfo::getRISCVFeaturesBitsInfo(StringRef Ext) { /

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread Owen Pan via cfe-commits
owenca wrote: > I'm sorry I'm not familiar with LLVM release cycle, but is it too late for > this to make it into the `release/19.x` branch? It's not too late, but in general we backport bug fixes only if the bugs are labeled as `invalid-code-generation`, `crash-on-valid`, or `regression`. In

[clang] [clang][ASTMatcher] Add `matchesString` for `StringLiteral` which matches literals on given `RegExp` (PR #102152)

2024-08-07 Thread via cfe-commits
https://github.com/Gitspike updated https://github.com/llvm/llvm-project/pull/102152 >From 3ebc5e1cc8b1b539579859745ac831bdcab79df1 Mon Sep 17 00:00:00 2001 From: hehouhua Date: Wed, 7 Aug 2024 11:55:30 +0800 Subject: [PATCH 1/3] [clang][ASTMatcher] Add matches for StringLiteral which matches

[clang] [C++20] [Modules] Don't set modules owner ship information for builtin declarations (PR #102115)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -2376,6 +2376,12 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, FunctionDecl *New = CreateBuiltin(II, R, ID, Loc); RegisterLocallyScopedExternCDecl(New, S); + // Builtin functions shouldn't be owned by any module. + if (New->hasOwningModule(

[clang] [clang][ASTMatcher] Add `matchesString` for `StringLiteral` which matches literals on given `RegExp` (PR #102152)

2024-08-07 Thread via cfe-commits
https://github.com/Gitspike updated https://github.com/llvm/llvm-project/pull/102152 >From 2d09f0bdc3881f7030d9054045c7839dcc956d22 Mon Sep 17 00:00:00 2001 From: hehouhua Date: Wed, 7 Aug 2024 11:55:30 +0800 Subject: [PATCH 1/3] [clang][ASTMatcher] Add matches for StringLiteral which matches

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-08-07 Thread via cfe-commits
https://github.com/realqhc updated https://github.com/llvm/llvm-project/pull/100684 >From d2169cacc2851db4d57865e26781b93d814ebe80 Mon Sep 17 00:00:00 2001 From: Qihan Cai Date: Fri, 26 Jul 2024 12:26:16 +1000 Subject: [PATCH 1/2] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E4

[clang] [compiler-rt] [llvm] [RISCV] Support new groupid/bitmask for cpu_model (PR #101632)

2024-08-07 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/101632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-07 Thread Yuxuan Chen via cfe-commits
@@ -8119,6 +8119,35 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroAwaitElidableDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_await_elidable]]`` is a class attribute which can be applie

[clang] 8c7a038 - [clang-format] Fix a bug in annotating CastRParen (#102261)

2024-08-07 Thread via cfe-commits
Author: Owen Pan Date: 2024-08-07T21:05:42-07:00 New Revision: 8c7a038f9029c675f2a52ff5e85f7b6005ec7b3e URL: https://github.com/llvm/llvm-project/commit/8c7a038f9029c675f2a52ff5e85f7b6005ec7b3e DIFF: https://github.com/llvm/llvm-project/commit/8c7a038f9029c675f2a52ff5e85f7b6005ec7b3e.diff LOG:

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

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

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, Thanks! https://github.com/llvm/llvm-project/pull/102287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -18075,6 +18075,15 @@ void Sema::ActOnTagFinishDefinition(Scope *S, Decl *TagD, if (NumInitMethods > 1 || !Def->hasInitMethod()) Diag(RD->getLocation(), diag::err_sycl_special_type_num_init_method); } + +// If we're defining a dynamic class in a module

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -18075,6 +18075,15 @@ void Sema::ActOnTagFinishDefinition(Scope *S, Decl *TagD, if (NumInitMethods > 1 || !Def->hasInitMethod()) Diag(RD->getLocation(), diag::err_sycl_special_type_num_init_method); } + +// If we're defining a dynamic class in a module

[clang] [C++20] [Modules] Don't diagnose duplicated implicit decl in multiple named modules (PR #102423)

2024-08-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/102423 Close https://github.com/llvm/llvm-project/issues/102360 Close https://github.com/llvm/llvm-project/issues/102349 http://eel.is/c++draft/basic.def.odr#15.3 makes it clear that the duplicated deinition are n

[clang] [C++20] [Modules] Don't diagnose duplicated implicit decl in multiple named modules (PR #102423)

2024-08-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/102423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Don't diagnose duplicated implicit decl in multiple named modules (PR #102423)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes Close https://github.com/llvm/llvm-project/issues/102360 Close https://github.com/llvm/llvm-project/issues/102349 http://eel.is/c++draft/basic.def.odr#15.3 makes it clear that the duplicated deinit

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-07 Thread Yuxuan Chen via cfe-commits
@@ -8119,6 +8119,35 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroAwaitElidableDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_await_elidable]]`` is a class attribute which can be applie

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-07 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 deleted https://github.com/llvm/llvm-project/pull/99282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-07 Thread Yuxuan Chen via cfe-commits
@@ -8119,6 +8119,35 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroAwaitElidableDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_await_elidable]]`` is a class attribute which can be applie

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/102287 >From 7daf703b8d2602bd13d9eb9a9e6c9487205427b0 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 7 Aug 2024 16:05:44 +0800 Subject: [PATCH 1/3] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable i

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Thanks for quick reviewing. https://github.com/llvm/llvm-project/pull/102287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 847f9cb - Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (#102287)

2024-08-07 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-08-08T13:14:09+08:00 New Revision: 847f9cb0e868c8ec34f9aa86fdf846f8c4e0388b URL: https://github.com/llvm/llvm-project/commit/847f9cb0e868c8ec34f9aa86fdf846f8c4e0388b DIFF: https://github.com/llvm/llvm-project/commit/847f9cb0e868c8ec34f9aa86fdf846f8c4e0388b.diff LO

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/102287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I'd like to backport this tomorrow since I‘d like to see if there is any regression reports. https://github.com/llvm/llvm-project/pull/102287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang-tools-extra] 3c9e345 - [clang-doc] fix flaky test in clang-doc (#101387)

2024-08-07 Thread via cfe-commits
Author: PeterChou1 Date: 2024-08-08T01:15:21-04:00 New Revision: 3c9e3457d7e3153f449bef047d4deb297126f446 URL: https://github.com/llvm/llvm-project/commit/3c9e3457d7e3153f449bef047d4deb297126f446 DIFF: https://github.com/llvm/llvm-project/commit/3c9e3457d7e3153f449bef047d4deb297126f446.diff LO

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-07 Thread via cfe-commits
https://github.com/PeterChou1 closed https://github.com/llvm/llvm-project/pull/101387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >