[clang] [clang] Fix crash when #embed used in a compound literal (PR #102304)

2024-08-07 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: /cherry-pick 3606d69d0b57dc1d23a4362e376e7ad27f650c27 https://github.com/llvm/llvm-project/pull/102304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash when #embed used in a compound literal (PR #102304)

2024-08-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon milestoned https://github.com/llvm/llvm-project/pull/102304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 f2c760d6fa9ff685584dcb4aa38ae88fee892895 Mon Sep 17 00:00:00 2001 From: hehouhua Date: Wed, 7 Aug 2024 11:55:30 +0800 Subject: [PATCH] [clang][ASTMatcher] Add matches for StringLiteral which matches lite

[clang] 3606d69 - [clang] Fix crash when #embed used in a compound literal (#102304)

2024-08-07 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2024-08-08T08:51:56+02:00 New Revision: 3606d69d0b57dc1d23a4362e376e7ad27f650c27 URL: https://github.com/llvm/llvm-project/commit/3606d69d0b57dc1d23a4362e376e7ad27f650c27 DIFF: https://github.com/llvm/llvm-project/commit/3606d69d0b57dc1d23a4362e376e7ad27f650c

[clang] [clang] Fix crash when #embed used in a compound literal (PR #102304)

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

[clang] [clang][Interp] Properly abort on reads from non-const variables (PR #102426)

2024-08-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/102426 >From fb78d6e1b2b546b0901a4b1ca97ff8eae3cc95cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 8 Aug 2024 08:01:18 +0200 Subject: [PATCH] [clang][Interp] Properly abort on reads from non

[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 a6f4d0d45d1adbfd975cfbea8950a5c1486663bf Mon Sep 17 00:00:00 2001 From: hehouhua Date: Wed, 7 Aug 2024 11:55:30 +0800 Subject: [PATCH 1/5] [clang][ASTMatcher] Add matches for StringLiteral which matches

[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 a6f4d0d45d1adbfd975cfbea8950a5c1486663bf Mon Sep 17 00:00:00 2001 From: hehouhua Date: Wed, 7 Aug 2024 11:55:30 +0800 Subject: [PATCH 1/5] [clang][ASTMatcher] Add matches for StringLiteral which matches

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-07 Thread via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %check_clang_tidy %s bugprone-public-enable-shared-from-this %t -- -- + +namespace std { + +template class enable_shared_from_this {}; + +class BadExample : enable_shared_from_this {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: class BadExa

[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/4] [clang][ASTMatcher] Add matches for StringLiteral which matches

[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/4] [clang][ASTMatcher] Add matches for StringLiteral which matches

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

2024-08-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted 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] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread Pierre Jolivet via cfe-commits
prj- wrote: Thank you very much. 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] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

2024-08-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted 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] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

2024-08-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted 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-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-07 Thread via cfe-commits
@@ -98,6 +98,11 @@ Improvements to clang-tidy New checks ^^ +- New :doc:`bugprone-public-enable-shared-from-this + ` check. + + Checks if a class deriving from enable_shared_from_this has public access specifiers, because otherwise the program will crash when shared

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-07 Thread via cfe-commits
@@ -0,0 +1,45 @@ +//===--- PublicEnableSharedFromThisCheck.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-Identif

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-07 Thread via cfe-commits
@@ -139,6 +140,8 @@ class BugproneModule : public ClangTidyModule { "bugprone-inaccurate-erase"); CheckFactories.registerCheck( "bugprone-incorrect-enable-if"); +CheckFactories.registerCheck( +"bugprone-public-enable-shared-from-this"); -

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

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

[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-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

[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] 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] 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] 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
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] 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] [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] [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] [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 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] 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] 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
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] [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] 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] [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] [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] [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] [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] [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 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] [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-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] [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] [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] [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] 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] 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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] [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] 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 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] [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] [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] 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] 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] 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 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][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] 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] 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] 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] [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] [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] [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] [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 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] [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] [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] [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] #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
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] [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][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
@@ -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 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
@@ -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 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] [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
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 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] 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 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] [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] [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] [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] [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] [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

  1   2   3   4   5   6   >