[clang] [clang][ASTImporter] import InstantiatedFromMember of ClassTemplateSpecializationDecl (PR #76493)

2023-12-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes import of `ClassTemplateSpecializationDecl` didn't set `InstantiatedFromMember` and this makes ast-dump crash. import and set `InstantiatedFromMember`. fix

[clang] [clang][ASTImporter] import InstantiatedFromMember of ClassTemplateSpecializationDecl (PR #76493)

2023-12-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/76493 import of `ClassTemplateSpecializationDecl` didn't set `InstantiatedFromMember` and this makes ast-dump crash. import and set `InstantiatedFromMember`. fix

[clang-tools-extra] [clangd] Avoid crash when summarizing pointer-to-member expr for block-end hint (PR #76492)

2023-12-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Nathan Ridge (HighCommander4) Changes Fixes https://github.com/clangd/clangd/issues/1873 --- Full diff: https://github.com/llvm/llvm-project/pull/76492.diff 2 Files Affected: - (modified) clang-tools-extra/clangd/InlayHints.cpp (+1-1)

[clang-tools-extra] [clangd] Avoid crash when summarizing pointer-to-member expr for block-end hint (PR #76492)

2023-12-27 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/76492 Fixes https://github.com/clangd/clangd/issues/1873 >From b60a2515bbfbfc79bc3b0bb81ef6fe1db13404bd Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 28 Dec 2023 02:47:04 -0500 Subject: [PATCH]

[clang] [RISCV] Prevent checkRVVTypeSupport from issuing more than 1 diagnostic. (PR #74950)

2023-12-27 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/74950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 471f8f5 - [RISCV] Prevent checkRVVTypeSupport from issuing more than 1 diagnostic. (#74950)

2023-12-27 Thread via cfe-commits
Author: Craig Topper Date: 2023-12-27T23:44:45-08:00 New Revision: 471f8f50d0790cd7e77b8b385d8592c95df53974 URL: https://github.com/llvm/llvm-project/commit/471f8f50d0790cd7e77b8b385d8592c95df53974 DIFF: https://github.com/llvm/llvm-project/commit/471f8f50d0790cd7e77b8b385d8592c95df53974.diff

[clang] [RISCV] Prevent checkRVVTypeSupport from issuing more than 1 diagnostic. (PR #74950)

2023-12-27 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/74950 >From 7675400ba14c6b747fd8ed8b821059fbdb54a3ef Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sat, 9 Dec 2023 12:46:48 -0800 Subject: [PATCH 1/2] [RISCV] Prevent checkRVVTypeSupport from issuing more than 1

[clang] [RISCV] Prevent checkRVVTypeSupport from issuing more than 1 diagnostic. (PR #74950)

2023-12-27 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD approved this pull request. Looks good since we have just landed #74949. https://github.com/llvm/llvm-project/pull/74950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [RISCV] Refactor checkRVVTypeSupport to use BuiltinVectorTypeInfo. (PR #74949)

2023-12-27 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/74949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9807305 - [RISCV] Refactor checkRVVTypeSupport to use BuiltinVectorTypeInfo. (#74949)

2023-12-27 Thread via cfe-commits
Author: Craig Topper Date: 2023-12-27T21:53:27-08:00 New Revision: 98073057ee45bc4a9256ecc70dc3da20b0fd5d3b URL: https://github.com/llvm/llvm-project/commit/98073057ee45bc4a9256ecc70dc3da20b0fd5d3b DIFF: https://github.com/llvm/llvm-project/commit/98073057ee45bc4a9256ecc70dc3da20b0fd5d3b.diff

[clang] [RISCV] Refactor checkRVVTypeSupport to use BuiltinVectorTypeInfo. (PR #74949)

2023-12-27 Thread Craig Topper via cfe-commits
topperc wrote: > Looks good. > > If I understand correctly, you mean that `vbool64_t` should emit diagnosis of > requiring `zve64x` and should not emit error of `zve32x.` Correct. Since vbool64_t requires SEW/LMUL==64 which is only possible with SEW=8 LMUL=1/8, SEW=16 LMUL=1/4 or SEW=32

[clang] [RISCV] Prevent checkRVVTypeSupport from issuing more than 1 diagnostic. (PR #74950)

2023-12-27 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD edited https://github.com/llvm/llvm-project/pull/74950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Refactor checkRVVTypeSupport to use BuiltinVectorTypeInfo. (PR #74949)

2023-12-27 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD approved this pull request. Looks good. If I understand correctly, you mean that `vbool64_t` should emit diagnosis of requiring `zve64x` and should not emit error of `zve32x.` https://github.com/llvm/llvm-project/pull/74949

[clang] [llvm] [RISCV][MC] Add support for experimental Zcmop extension (PR #76395)

2023-12-27 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp closed https://github.com/llvm/llvm-project/pull/76395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 13cdee9 - [RISCV][MC] Add support for experimental Zcmop extension (#76395)

2023-12-27 Thread via cfe-commits
Author: Wang Pengcheng Date: 2023-12-28T13:03:16+08:00 New Revision: 13cdee9047d24d84505c469481563c3fb55e4131 URL: https://github.com/llvm/llvm-project/commit/13cdee9047d24d84505c469481563c3fb55e4131 DIFF:

[clang] [RISCV][NFC] Use RISCVISAInfo instead of string comparison (PR #76387)

2023-12-27 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp closed https://github.com/llvm/llvm-project/pull/76387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 705065f - [RISCV][NFC] Use RISCVISAInfo instead of string comparison (#76387)

2023-12-27 Thread via cfe-commits
Author: Wang Pengcheng Date: 2023-12-28T13:00:43+08:00 New Revision: 705065f365a9df5c26bd37f2a3380427da1b1b7f URL: https://github.com/llvm/llvm-project/commit/705065f365a9df5c26bd37f2a3380427da1b1b7f DIFF:

[clang] [RISCV][NFC] Use errorToBool (PR #76429)

2023-12-27 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp closed https://github.com/llvm/llvm-project/pull/76429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5c27e00 - [RISCV][NFC] Use errorToBool (#76429)

2023-12-27 Thread via cfe-commits
Author: Wang Pengcheng Date: 2023-12-28T12:59:11+08:00 New Revision: 5c27e00055e920c435fdb3883e233b3533576559 URL: https://github.com/llvm/llvm-project/commit/5c27e00055e920c435fdb3883e233b3533576559 DIFF:

[clang] [Clang] support vector subscript expressions in constant evaluator (WIP) (PR #76379)

2023-12-27 Thread Vikram Hegde via cfe-commits
vikramRH wrote: Putting this on hold hold as @yuanfang-chen already has a PR https://github.com/llvm/llvm-project/pull/76379 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] support vector subscript expressions in constant evaluator (WIP) (PR #76379)

2023-12-27 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH closed https://github.com/llvm/llvm-project/pull/76379 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Fix sysroot flag handling in CommandMangler to prevent duplicates (PR #75694)

2023-12-27 Thread via cfe-commits
kon72 wrote: Hello @HighCommander4 , Could you take a look at this change? Thanks! https://github.com/llvm/llvm-project/pull/75694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Avoid printing overly large integer. (PR #75902)

2023-12-27 Thread Nhat Nguyen via cfe-commits
@@ -17132,6 +17132,10 @@ static bool ConvertAPValueToString(const APValue , QualType T, case BuiltinType::WChar_U: { unsigned TyWidth = Context.getIntWidth(T); assert(8 <= TyWidth && TyWidth <= 32 && "Unexpected integer width"); + if

[clang] 52770d8 - [Serialization] Don't pack bits for the function scope index of ParmVarDecl

2023-12-27 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-28T11:04:11+08:00 New Revision: 52770d83bf00fc56e9496e32f083f0f940bf7315 URL: https://github.com/llvm/llvm-project/commit/52770d83bf00fc56e9496e32f083f0f940bf7315 DIFF: https://github.com/llvm/llvm-project/commit/52770d83bf00fc56e9496e32f083f0f940bf7315.diff

[libcxx] [clang] [libc++] Re-enable the clang_modules_include test for Objective-C++ (PR #66801)

2023-12-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I tried to fix this in https://github.com/llvm/llvm-project/commit/c2c840bd92cfac155f6205ff7505b109b301d389. Sorry for disturbing. https://github.com/llvm/llvm-project/pull/66801 ___ cfe-commits mailing list

[llvm] [clang] [RISCV][MC] Add support for experimental Zcmop extension (PR #76395)

2023-12-27 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/76395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c2c840b - [Modules] Don't prevent @import from ObjectiveC

2023-12-27 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-28T10:45:47+08:00 New Revision: c2c840bd92cfac155f6205ff7505b109b301d389 URL: https://github.com/llvm/llvm-project/commit/c2c840bd92cfac155f6205ff7505b109b301d389 DIFF: https://github.com/llvm/llvm-project/commit/c2c840bd92cfac155f6205ff7505b109b301d389.diff

[clang] [llvm] [RISCV][MC] Add support for experimental Zcmop extension (PR #76395)

2023-12-27 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk approved this pull request. LGTM. But please wait for @topperc's review. https://github.com/llvm/llvm-project/pull/76395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][RISCV] Forward --no-relax option to linker for RISC-V (PR #76432)

2023-12-27 Thread Craig Topper via cfe-commits
topperc wrote: Should this also be done in `tools::gnutools::Linker::ConstructJob`? https://github.com/llvm/llvm-project/pull/76432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Chuanqi Xu via cfe-commits
@@ -602,6 +602,16 @@ class Driver { // FIXME: This should be in CompilationInfo. std::string GetProgramPath(StringRef Name, const ToolChain ) const; + /// GetModuleManifestPath - Lookup the name of the Standard library manifest. + /// + /// \param C - The compilation.

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Chuanqi Xu via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation ) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" ChuanqiXu9 wrote: Do we need the prefix? I am

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,15 @@ +// Test that -print-library-module-manifest-path finds the correct file. + +// RUN: %clang -print-library-module-manifest-path \ +// RUN: -stdlib=libc++ \ +// RUN: --sysroot=%S/Inputs/cxx23_modules \ +// RUN: --target=x86_64-linux-gnu 2>&1 \ +// RUN:

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Chuanqi Xu via cfe-commits
@@ -602,6 +602,16 @@ class Driver { // FIXME: This should be in CompilationInfo. std::string GetProgramPath(StringRef Name, const ToolChain ) const; + /// GetModuleManifestPath - Lookup the name of the Standard library manifest. + /// + /// \param C - The compilation.

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Chuanqi Xu via cfe-commits
@@ -5280,6 +5280,9 @@ def print_resource_dir : Flag<["-", "--"], "print-resource-dir">, def print_search_dirs : Flag<["-", "--"], "print-search-dirs">, HelpText<"Print the paths used for finding libraries and programs">, Visibility<[ClangOption, CLOption]>; +def

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Chuanqi Xu via cfe-commits
@@ -602,6 +602,16 @@ class Driver { // FIXME: This should be in CompilationInfo. std::string GetProgramPath(StringRef Name, const ToolChain ) const; + /// GetModuleManifestPath - Lookup the name of the Standard library manifest. ChuanqiXu9 wrote:

[mlir] [compiler-rt] [clang] [openmp] [llvm] [flang] [lld] [libc] [clang-tools-extra] [X86] Remove RAO-INT from Grandridge (PR #76420)

2023-12-27 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf closed https://github.com/llvm/llvm-project/pull/76420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 19e7846 - [X86] Remove RAO-INT from Grandridge (#76420)

2023-12-27 Thread via cfe-commits
Author: Freddy Ye Date: 2023-12-28T10:06:54+08:00 New Revision: 19e784604c70d27cd6f3b2cf5d42e4363af12264 URL: https://github.com/llvm/llvm-project/commit/19e784604c70d27cd6f3b2cf5d42e4363af12264 DIFF: https://github.com/llvm/llvm-project/commit/19e784604c70d27cd6f3b2cf5d42e4363af12264.diff

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-12-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I finally had time to debug this: The reason for modules being involved here > is because the serialization code calls `ParmVarDecl::getDefaultArg()` which > strips the outermost `FullExpr`, such as `ExprWithCleanups`. A potential fix > is in #76473 though I'm not really

[libcxx] [clang] [libc++] Re-enable the clang_modules_include test for Objective-C++ (PR #66801)

2023-12-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > https://reviews.llvm.org/D158694 The motivation of my change is that I find multiple people are trying to fake `import std` from clang modules. This is not wanted. So I tried to ban it. I'll try to fix it or revert it later today if I didn't.

[clang] [clang] Add basic support for #embed (PR #76480)

2023-12-27 Thread Junior Rantila via cfe-commits
https://github.com/juniorrantila edited https://github.com/llvm/llvm-project/pull/76480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add basic support for #embed. (PR #76480)

2023-12-27 Thread Junior Rantila via cfe-commits
https://github.com/juniorrantila updated https://github.com/llvm/llvm-project/pull/76480 >From 554b85be15f9ee9767d74db18ef6db75119b308a Mon Sep 17 00:00:00 2001 From: Junior Rantila Date: Wed, 27 Dec 2023 22:00:35 +0100 Subject: [PATCH] [clang] Add basic support for #embed This patch takes

[clang] [clang] Add basic support for #embed. (PR #76480)

2023-12-27 Thread Junior Rantila via cfe-commits
https://github.com/juniorrantila updated https://github.com/llvm/llvm-project/pull/76480 >From a51561dcfb9877c0881651ecdc9de8928991506c Mon Sep 17 00:00:00 2001 From: Junior Rantila Date: Wed, 27 Dec 2023 22:00:35 +0100 Subject: [PATCH] [clang] Add basic support for #embed. This patch takes

[clang] [clang] Add basic support for #embed. (PR #76480)

2023-12-27 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 38c9390b59c4d2b9181614d6a909887497d3692f 00e9c665c18c1efafc15e293ea6dc35b1ed32e48 --

[clang-tools-extra] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)

2023-12-27 Thread via cfe-commits
https://github.com/Da-Viper updated https://github.com/llvm/llvm-project/pull/76117 >From 97eeda4684804229d9faad19ea7b7888dcd91786 Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Thu, 21 Dec 2023 02:30:34 + Subject: [PATCH 1/2] Fix #75686: add iter_swap and iter_move to the matched name

[clang] [clang] Add basic support for #embed. (PR #76480)

2023-12-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Junior Rantila (juniorrantila) Changes This patch takes the first steps toward C23 #embed support. We can include binary files, but embed-parameter-sequences are not implemented. Adding the embedded file to the -M dependency array is

[clang] [clang] Add basic support for #embed. (PR #76480)

2023-12-27 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] [clang] Add basic support for #embed. (PR #76480)

2023-12-27 Thread Junior Rantila via cfe-commits
https://github.com/juniorrantila created https://github.com/llvm/llvm-project/pull/76480 This patch takes the first steps toward C23 #embed support. We can include binary files, but embed-parameter-sequences are not implemented. Adding the embedded file to the -M dependency array is also not

[compiler-rt] [flang] [libc] [lld] [mlir] [clang] [clang-tools-extra] [openmp] [llvm] [X86] Remove RAO-INT from Grandridge (PR #76420)

2023-12-27 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/76420 >From ae1d12c24facb36323b9b46a73a1fbc3edff4dc8 Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Wed, 27 Dec 2023 10:33:30 +0800 Subject: [PATCH] [X86] Remove RAO-INT from Grandridge According to latest spec:

[compiler-rt] [clang-tools-extra] [clang] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > > @teresajohnson I mentioned the same thing on > > [discourse](https://discourse.llvm.org/t/pgo-are-the-llvm-profile-functions-stable-c-apis-across-llvm-releases/75832/5) > > but it seems like linking on AIX does not support this model. > > I see. Perhaps instead of

[compiler-rt] [clang-tools-extra] [clang] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
@@ -100,12 +103,6 @@ ValueProfNode *__llvm_profile_begin_vnodes(); ValueProfNode *__llvm_profile_end_vnodes(); uint32_t *__llvm_profile_begin_orderfile(); -/*! - * \brief Clear profile counters to zero. - * - */ -void __llvm_profile_reset_counters(void);

[compiler-rt] [clang-tools-extra] [clang] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/76471 >From 6c9381ec324595947237bd25642b03ab40b6a4df Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 27 Dec 2023 13:05:01 -0500 Subject: [PATCH 1/6] Initial commit --- .../ExpandModularHeadersPPCallbacks.cpp

[clang] [clang-tools-extra] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Snehasish Kumar via cfe-commits
https://github.com/snehasish edited https://github.com/llvm/llvm-project/pull/76471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Snehasish Kumar via cfe-commits
@@ -100,12 +103,6 @@ ValueProfNode *__llvm_profile_begin_vnodes(); ValueProfNode *__llvm_profile_end_vnodes(); uint32_t *__llvm_profile_begin_orderfile(); -/*! - * \brief Clear profile counters to zero. - * - */ -void __llvm_profile_reset_counters(void);

[clang-tools-extra] [clangd] check for synthesized symbols when tracking include locations (PR #75128)

2023-12-27 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @kadircet gentle ping https://github.com/llvm/llvm-project/pull/75128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-12-27 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: I finally had time to debug this: The reason for modules being involved here is because the serialization code calls `ParmVarDecl::getDefaultArg()` which strips the outermost `FullExpr`, such as `ExprWithCleanups`. A potential fix is in

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-12-27 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo updated https://github.com/llvm/llvm-project/pull/69076 >From a55ca99a373b17501d56d18af9e8aa2dc2cbcea0 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Sat, 14 Oct 2023 20:10:28 +0200 Subject: [PATCH] Fix crash with modules and constexpr destructor With modules,

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
@@ -100,12 +103,6 @@ ValueProfNode *__llvm_profile_begin_vnodes(); ValueProfNode *__llvm_profile_end_vnodes(); uint32_t *__llvm_profile_begin_orderfile(); -/*! - * \brief Clear profile counters to zero. - * - */ -void __llvm_profile_reset_counters(void);

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/76471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/76471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
@@ -100,12 +103,6 @@ ValueProfNode *__llvm_profile_begin_vnodes(); ValueProfNode *__llvm_profile_end_vnodes(); uint32_t *__llvm_profile_begin_orderfile(); -/*! - * \brief Clear profile counters to zero. - * - */ -void __llvm_profile_reset_counters(void);

[clang] [Serialization] Fix instantiated default arguments (PR #76473)

2023-12-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Jonas Hahnfeld (hahnjo) Changes `ParmVarDecl::getDefaultArg()` strips the outermost `FullExpr`, such as `ExprWithCleanups`. This leads to an `llvm_unreachable` being executed with the added test `clang/test/Modules/pr68702.cpp`;

[clang] [Serialization] Fix instantiated default arguments (PR #76473)

2023-12-27 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/76473 `ParmVarDecl::getDefaultArg()` strips the outermost `FullExpr`, such as `ExprWithCleanups`. This leads to an `llvm_unreachable` being executed with the added test `clang/test/Modules/pr68702.cpp`; instead use

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Snehasish Kumar via cfe-commits
@@ -44,6 +44,7 @@ endif(COMPILER_RT_BUILD_ORC) if (COMPILER_RT_BUILD_PROFILE) set(PROFILE_HEADERS profile/InstrProfData.inc +profile/instr_prof_interface.h snehasish wrote: Good point, looks like we treat `interface` filenames with snake case as

[clang-tools-extra] [clang] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Snehasish Kumar via cfe-commits
@@ -100,12 +103,6 @@ ValueProfNode *__llvm_profile_begin_vnodes(); ValueProfNode *__llvm_profile_end_vnodes(); uint32_t *__llvm_profile_begin_orderfile(); -/*! - * \brief Clear profile counters to zero. - * - */ -void __llvm_profile_reset_counters(void);

[clang-tools-extra] [clang] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
@@ -100,12 +103,6 @@ ValueProfNode *__llvm_profile_begin_vnodes(); ValueProfNode *__llvm_profile_end_vnodes(); uint32_t *__llvm_profile_begin_orderfile(); -/*! - * \brief Clear profile counters to zero. - * - */ -void __llvm_profile_reset_counters(void);

[clang] [compiler-rt] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu commented: Thanks so much @snehasish for the fast review! I have two questions regarding your comments. I will address the remaining comments soon as well! https://github.com/llvm/llvm-project/pull/76471 ___ cfe-commits

[clang-tools-extra] [clang] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
@@ -44,6 +44,7 @@ endif(COMPILER_RT_BUILD_ORC) if (COMPILER_RT_BUILD_PROFILE) set(PROFILE_HEADERS profile/InstrProfData.inc +profile/instr_prof_interface.h qiongsiwu wrote: Yes absolutely! That said, I am following the existing convention for

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/76471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [compiler-rt] [clang] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Teresa Johnson via cfe-commits
teresajohnson wrote: > @teresajohnson I mentioned the same thing on > [discourse](https://discourse.llvm.org/t/pgo-are-the-llvm-profile-functions-stable-c-apis-across-llvm-releases/75832/5) > but it seems like linking on AIX does not support this model. I see. Perhaps instead of defining

[clang-tools-extra] [clang] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/76471 >From 6c9381ec324595947237bd25642b03ab40b6a4df Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 27 Dec 2023 13:05:01 -0500 Subject: [PATCH 1/5] Initial commit --- .../ExpandModularHeadersPPCallbacks.cpp

[clang-tools-extra] [clang] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Snehasish Kumar via cfe-commits
@@ -1364,12 +1364,22 @@ static void InitializePredefinedMacros(const TargetInfo , TI.getTargetDefines(LangOpts, Builder); } +static void InitializePGOProfileMacros(const CodeGenOptions , snehasish wrote: There are IR PGO users (e.g. Rust) which don't use

[clang-tools-extra] [clang] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Snehasish Kumar via cfe-commits
@@ -44,6 +44,7 @@ endif(COMPILER_RT_BUILD_ORC) if (COMPILER_RT_BUILD_PROFILE) set(PROFILE_HEADERS profile/InstrProfData.inc +profile/instr_prof_interface.h snehasish wrote: Can you rename the header to follow the existing CamelCase convention?

[clang-tools-extra] [compiler-rt] [clang] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Snehasish Kumar via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_profgen %s -S -emit-llvm -o - | FileCheck %s --check-prefix=PROFGEN +// RUN: %clang_profgen -o %t %s +// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t +// RUN: llvm-profdata merge -o %t.profdata %t.profraw +// RUN: %clang_profuse=%t.profdata %s

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Snehasish Kumar via cfe-commits
@@ -100,12 +103,6 @@ ValueProfNode *__llvm_profile_begin_vnodes(); ValueProfNode *__llvm_profile_end_vnodes(); uint32_t *__llvm_profile_begin_orderfile(); -/*! - * \brief Clear profile counters to zero. - * - */ -void __llvm_profile_reset_counters(void);

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/76471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Snehasish Kumar via cfe-commits
snehasish wrote: @teresajohnson I mentioned the same thing on [discourse](https://discourse.llvm.org/t/pgo-are-the-llvm-profile-functions-stable-c-apis-across-llvm-releases/75832/5) but it seems like linking on AIX does not support this model. https://github.com/llvm/llvm-project/pull/76471

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Teresa Johnson via cfe-commits
teresajohnson wrote: The way we have done this in the past is to declare these as weak symbols and check if they exist before calling. E.g.: ``` extern "C" __attribute__((weak)) int __llvm_profile_dump(void); if (__llvm_profile_dump) if (__llvm_profile_dump() != 0) { ... ``` Not

[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/76446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread Gábor Horváth via cfe-commits
@@ -1052,18 +1052,92 @@ libclang Static Analyzer --- +- Implemented the ``[[clang::suppress]]`` attribute for suppressing diagnostics + of static analysis tools, such as the Clang Static Analyzer. + `Documentation

[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread Gábor Horváth via cfe-commits
@@ -1072,16 +1146,36 @@ Static Analyzer Read the PR for the details. (`#66086 `_) +- Other taint-related improvements. + (`#66358 `_, + `#66074

[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/76446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Note to reviewers: I am only adding these three PGO functions because I am not sure if more should be added. Please let me know, and I will revise the PR. https://github.com/llvm/llvm-project/pull/76471 ___ cfe-commits mailing list

[clang] [compiler-rt] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qiongsi Wu (qiongsiwu) Changes This PR exposes three PGO functions `__llvm_profile_reset_counters`, `__llvm_profile_dump` and `__llvm_orderfile_dump` to user programs through the new header `instr_prof_interface.h` under

[clang] [compiler-rt] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-27 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/76471 This PR exposes three PGO functions `__llvm_profile_reset_counters`, `__llvm_profile_dump` and `__llvm_orderfile_dump` to user programs through the new header `instr_prof_interface.h` under

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-27 Thread Danny Mösch via cfe-commits
SimplyDanny wrote: > I think that both IgnoreMacros and StrictMode(false) could be needed. If > StrictMode is false then only returnStmt that got compoundStmt as parent > should be check, to reduce impact. Fair points. Both options are added now. However, I'm not sure about the name of the

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-27 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/76249 From 0257d24b12fe60d7d0fd758f4e843db3caf9a623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Fri, 22 Dec 2023 17:09:59 +0100 Subject: [PATCH 01/13] [clang-tidy] Add check

[clang] [RISCV][NFC] Use RISCVISAInfo instead of string comparison (PR #76387)

2023-12-27 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/76387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV][NFC] Use errorToBool (PR #76429)

2023-12-27 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/76429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2023-12-27 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman updated https://github.com/llvm/llvm-project/pull/76466 >From 4caf5b3c779bf18236b4b0be5bc7147d10339f2b Mon Sep 17 00:00:00 2001 From: David Goldman Date: Tue, 26 Dec 2023 15:59:01 -0500 Subject: [PATCH 1/6] [clangd][SymbolCollector] Treat ObjC methods as spelled

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2023-12-27 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 8b485070844d03cda467e75aa8c924184ba671cf 76385b51db0e33a25df9646eb6d59f04a4f65af7 --

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2023-12-27 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman updated https://github.com/llvm/llvm-project/pull/76466 >From 4caf5b3c779bf18236b4b0be5bc7147d10339f2b Mon Sep 17 00:00:00 2001 From: David Goldman Date: Tue, 26 Dec 2023 15:59:01 -0500 Subject: [PATCH 1/5] [clangd][SymbolCollector] Treat ObjC methods as spelled

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2023-12-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: David Goldman (DavidGoldman) Changes This is based on top of #76410 --- Patch is 37.52 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/76466.diff 11 Files Affected: - (modified)

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2023-12-27 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman created https://github.com/llvm/llvm-project/pull/76466 This is based on top of #76410 >From 4caf5b3c779bf18236b4b0be5bc7147d10339f2b Mon Sep 17 00:00:00 2001 From: David Goldman Date: Tue, 26 Dec 2023 15:59:01 -0500 Subject: [PATCH 1/4]

[libcxx] [clang] [libc++] Re-enable the clang_modules_include test for Objective-C++ (PR #66801)

2023-12-27 Thread Mark de Wever via cfe-commits
mordante wrote: > @mordante I'm not certain what's going on here, I get > > ``` > [...]/clang_modules_include.gen.py/__std_clang_module.compile.pass.mm:22:2: > error: import of module 'std' imported non C++20 importable modules >22 | @import std; > | ^ > 1 error generated. > ``` >

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,15 @@ +// Test that -print-library-module-manifest-path finds the correct file. + +// RUN: %clang -print-library-module-manifest-path \ mordante wrote: I wasn't aware of that. I got used to using one dash using clang.

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Mark de Wever via cfe-commits
@@ -6135,6 +6141,40 @@ std::string Driver::GetProgramPath(StringRef Name, const ToolChain ) const { return std::string(Name); } +std::string Driver::GetModuleManifestPath(const Compilation , + const ToolChain ) const { + + switch

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Thorsten Schütt via cfe-commits
@@ -6135,6 +6141,40 @@ std::string Driver::GetProgramPath(StringRef Name, const ToolChain ) const { return std::string(Name); } +std::string Driver::GetModuleManifestPath(const Compilation , + const ToolChain ) const { + + switch

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Thorsten Schütt via cfe-commits
@@ -6135,6 +6141,40 @@ std::string Driver::GetProgramPath(StringRef Name, const ToolChain ) const { return std::string(Name); } +std::string Driver::GetModuleManifestPath(const Compilation , + const ToolChain ) const { + + switch

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Thorsten Schütt via cfe-commits
@@ -6135,6 +6141,40 @@ std::string Driver::GetProgramPath(StringRef Name, const ToolChain ) const { return std::string(Name); } +std::string Driver::GetModuleManifestPath(const Compilation , + const ToolChain ) const { + + switch

[clang-tools-extra] [flang] [llvm] [clang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-27 Thread Peter Klausler via cfe-commits
@@ -173,5 +173,70 @@ RT_API_ATTRS void ShallowCopy(const Descriptor , const Descriptor ) { ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous()); } +RT_API_ATTRS const char *EnsureNullTerminated( +const char *str, size_t length, Terminator ) {

  1   2   >