[clang] [codegen] Emit missing cleanups for stmt-expr and coro suspensions [take-2] (PR #85398)

2024-04-14 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: [ayermolo](https://github.com/ayermolo) Thanks for the reproducer. I was able to reproduce it. Sent out fix https://github.com/llvm/llvm-project/pull/88670 https://github.com/llvm/llvm-project/pull/85398 ___ cfe-commits mailing list cfe-

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-14 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 edited https://github.com/llvm/llvm-project/pull/88636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-14 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/88636 >From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Sat, 13 Apr 2024 23:36:12 +0300 Subject: [PATCH 1/4] readability-string-compare: check std::string_view, allow c

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-14 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/88636 >From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Sat, 13 Apr 2024 23:36:12 +0300 Subject: [PATCH 1/5] readability-string-compare: check std::string_view, allow c

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-14 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/88636 >From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Sat, 13 Apr 2024 23:36:12 +0300 Subject: [PATCH 1/6] readability-string-compare: check std::string_view, allow c

[clang] [clang-format] New clang-format-indent-mode for Emacs (PR #78904)

2024-04-14 Thread Kirill Bobyrev via cfe-commits
kirillbobyrev wrote: I'm sorry, I haven't touched Emacs and its Clang-Format integration for 8 years, so I am not very qualified to review this. I would advise to use clangd + LSP integration instead. https://github.com/llvm/llvm-project/pull/78904 _

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-14 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 edited https://github.com/llvm/llvm-project/pull/88636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-14 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @mizvekov I totally forgot about this PR, sorry! I'll add a test and merge tomorrow :) https://github.com/llvm/llvm-project/pull/68222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang-tools-extra] Include cmath to fix build error on mac os 10.14 (PR #88665)

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

[clang-tools-extra] Include cmath to fix build error on mac os 10.14 (PR #88665)

2024-04-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/88665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] a5f5417 - Include cmath to fix build error on mac os 10.14 (#88665)

2024-04-14 Thread via cfe-commits
Author: Zentrik Date: 2024-04-15T00:21:06+02:00 New Revision: a5f54175dcf120180c3d91bbc13062bbf8f42f61 URL: https://github.com/llvm/llvm-project/commit/a5f54175dcf120180c3d91bbc13062bbf8f42f61 DIFF: https://github.com/llvm/llvm-project/commit/a5f54175dcf120180c3d91bbc13062bbf8f42f61.diff LOG:

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-14 Thread Matheus Izvekov via cfe-commits
@@ -1061,6 +1070,16 @@ CodeGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { CI.getPreprocessor().addPPCallbacks(std::move(Callbacks)); } + if (CI.getFrontendOpts().GenReducedBMI && + !CI.getFrontendOpts().ModuleOutputPath.empty()) { +std:

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

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

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-14 Thread Matheus Izvekov via cfe-commits
@@ -4045,6 +4045,24 @@ static bool RenderModulesOptions(Compilation &C, const Driver &D, // module fragment. CmdArgs.push_back("-fskip-odr-check-in-gmf"); + if (Args.hasArg(options::OPT_modules_reduced_bmi) && + (Input.getType() == driver::types::TY_CXXModule || +

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. I share the objections that it may be too soon to introduce a driver flag for this. Only a frontend flag is ok for now, but it's non blocking on my side because it doesn't look like it will be particularly hard to deprecate it later. http

[clang] [flang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #88661)

2024-04-14 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. lg, but update the commit message `Pull Request: https://github.com/llvm/llvm-project/pull/87866`, that's obsolete https://github.com/llvm/llvm-project/pull/88661 ___ cfe-commits mailing list cfe

[clang] [clang] Fix high memory consumption during pack deduction (PR #88637)

2024-04-14 Thread via cfe-commits
@@ -831,7 +831,7 @@ class PackDeductionScope { if (IsPartiallyExpanded) PackElements += NumPartialPackArgs; else if (IsExpanded) - PackElements += *FixedNumExpansions; + PackElements += FixedNumExpansions.value_or(1); term-est wrote: >c

[clang] [CGBuiltin] Use freeze instruction to create an undef value instead of zero (PR #86967)

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

[clang] [clang] Fix high memory consumption during pack deduction (PR #88637)

2024-04-14 Thread via cfe-commits
term-est wrote: Unfortunately I am unable to generate a MRE at this time. I was hoping for a ~100loc reproducable example, but all tools either spit out hundreds of thousands of lines long preprocessed files or doesn't work at all. I'll talk with my company to see if they would allow me to sha

[clang] [flang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #88661)

2024-04-14 Thread Fangrui Song via cfe-commits
MaskRay wrote: Thanks for the `-resource-dir=` suggestion, but I think we can push this part separately to make tests more stable. I am landing it separately and will than reland #87866 without changing the commit message https://github.com/llvm/llvm-project/pull/88661 __

[clang] 9f43a41 - [Driver,test] Make Android runtime tests resisent to #87866 change

2024-04-14 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-04-14T17:04:03-07:00 New Revision: 9f43a41db37253685c5ed428c215528eb92bbd43 URL: https://github.com/llvm/llvm-project/commit/9f43a41db37253685c5ed428c215528eb92bbd43 DIFF: https://github.com/llvm/llvm-project/commit/9f43a41db37253685c5ed428c215528eb92bbd43.diff

[clang] 1693009 - [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin

2024-04-14 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-04-14T17:05:55-07:00 New Revision: 1693009679313282afbed38778dd3fad62641e1b URL: https://github.com/llvm/llvm-project/commit/1693009679313282afbed38778dd3fad62641e1b DIFF: https://github.com/llvm/llvm-project/commit/1693009679313282afbed38778dd3fad62641e1b.diff

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

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

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

2024-04-14 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Thanks @AlexVlx for this change. This should work fine for SPIRV-LLVM-Translator (and SPIR-V backend). Adding @michalpaszkowski for input from SPIR-V backend side. Recently, this restriction on LLVM IR input to our translator was docuemnted: https://github.com/KhronosGroup/SPIR

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

2024-04-14 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > Thanks @AlexVlx for this change. This should work fine for > SPIRV-LLVM-Translator (and SPIR-V backend). Adding @michalpaszkowski for > input from SPIR-V backend side. Recently, this restriction on LLVM IR input > to our translator was docuemnted: > https://github.com/Khronos

[clang] Allow struct q{int q;~q();} (#88597) (PR #88673)

2024-04-14 Thread via cfe-commits
https://github.com/nabijaczleweli created https://github.com/llvm/llvm-project/pull/88673 Based on https://github.com/llvm/llvm-project/issues/88597#issuecomment-2053354660 From 021cd0e6a8641cd0487f5d00f9c86fb8ab56dd9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Mon, 1

[clang] Allow struct q{int q;~q();} (#88597) (PR #88673)

2024-04-14 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] Allow struct q{int q;~q();} (#88597) (PR #88673)

2024-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: наб (nabijaczleweli) Changes Based on https://github.com/llvm/llvm-project/issues/88597#issuecomment-2053354660 --- Full diff: https://github.com/llvm/llvm-project/pull/88673.diff 2 Files Affected: - (modified) clang/include/clang/Basi

[clang] Allow struct q{int q;~q();} (#88597) (PR #88673)

2024-04-14 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 9f43a41db37253685c5ed428c215528eb92bbd43 021cd0e6a8641cd0487f5d00f9c86fb8ab56dd9a --

[clang] [llvm] [HLSL][SPIRV] Add any intrinsic lowering (PR #88325)

2024-04-14 Thread Michal Paszkowski via cfe-commits
https://github.com/michalpaszkowski approved this pull request. https://github.com/llvm/llvm-project/pull/88325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From 59f281786a8c84ecfd7f5ddcfce6251c43ef2c72 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH] [C++20] [Modules] Introduce -fgen-reduced-bmi --- clang/include

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-14 Thread Chuanqi Xu via cfe-commits
@@ -4045,6 +4045,24 @@ static bool RenderModulesOptions(Compilation &C, const Driver &D, // module fragment. CmdArgs.push_back("-fskip-odr-check-in-gmf"); + if (Args.hasArg(options::OPT_modules_reduced_bmi) && + (Input.getType() == driver::types::TY_CXXModule || +

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-14 Thread Chuanqi Xu via cfe-commits
@@ -1061,6 +1070,16 @@ CodeGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { CI.getPreprocessor().addPPCallbacks(std::move(Callbacks)); } + if (CI.getFrontendOpts().GenReducedBMI && + !CI.getFrontendOpts().ModuleOutputPath.empty()) { +std:

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

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

[clang] f811d7b - [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (#85050)

2024-04-14 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-04-15T11:55:45+08:00 New Revision: f811d7b50957b801788d7b171ddeb25b1fda415a URL: https://github.com/llvm/llvm-project/commit/f811d7b50957b801788d7b171ddeb25b1fda415a DIFF: https://github.com/llvm/llvm-project/commit/f811d7b50957b801788d7b171ddeb25b1fda415a.diff LO

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

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

[clang] Allow struct q{int q;~q();} (#88597) (PR #88673)

2024-04-14 Thread via cfe-commits
https://github.com/nabijaczleweli updated https://github.com/llvm/llvm-project/pull/88673 From bfbbc19adfac17c8f8230dbe0928a3ec299ce0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Mon, 15 Apr 2024 03:52:50 +0200 Subject: [PATCH] Allow struct q{int q;~q();} (#88597) ---

[clang-tools-extra] [clang-tidy][NFC] Fix `linuxkernel-must-check-errs` documentation file name (PR #88655)

2024-04-14 Thread via cfe-commits
@@ -299,6 +299,10 @@ Miscellaneous ``--format`` option is specified. Now :program:`clang-apply-replacements` applies formatting only with the option. +- Fixed the :doc:`linuxkernel-must-check-errs + ` documentation to consistently + use the check's proper name.

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-14 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > The failures are related to new diagnostics that are issued as a side effect > of running additional checks in BuildDeclarationNameExpr(). A closer investigation has revealed that this diagnosis wasn't quite accurate. The three `SemaCXX` failures were not in fact caused

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-04-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/66462 >From 32010ae7e0a47cd4a70a9401980b32ed1d3e10f6 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 15 Sep 2023 11:33:53 +0800 Subject: [PATCH] [clangd] [C++20] [Modules] Introduce initial support for C++20 M

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-04-14 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > @sam-mccall gentle ping~ > > @ChuanqiXu9 hi, can your patch add support msvc module with *.ixx suffix > source? I use xmake to generate compile database, clangd cant work properly. hi, did you meet problems when testing this? I took a quick look and I don't see I treated

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

2024-04-14 Thread Michal Paszkowski via cfe-commits
https://github.com/michalpaszkowski approved this pull request. LGTM (from the SPIR-V backend side)! https://github.com/llvm/llvm-project/pull/88455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] Carving out -Wformat warning about scoped enums into a subwarning (PR #88595)

2024-04-14 Thread Karl-Johan Karlsson via cfe-commits
@@ -12,8 +12,8 @@ // RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -std=c11 -fsyntax-only -Wformat -verify=okay %s // Verify that -Wformat-signedness with -Wno-format are not reported (gcc compat). karka228 wrote: The -Wformat-signedness warning was implement

[clang] Carving out -Wformat warning about scoped enums into a subwarning (PR #88595)

2024-04-14 Thread Karl-Johan Karlsson via cfe-commits
@@ -218,5 +218,5 @@ void test_printf_unsigned_priX16(uint16_t x) { void test_suppress(int x) karka228 wrote: Same as above about gcc compatibility. The comment need at least to be updated. https://github.com/llvm/llvm-project/pull/88595

[clang] [Clang][AArch64] Extend diagnostics when warning non/streaming about … (PR #88380)

2024-04-14 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/88380 >From 48659137fa681d2e3fe32490cc8b565f8771ccbf Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Thu, 11 Apr 2024 10:59:49 + Subject: [PATCH 1/2] [Clang][AArch64] Extend diagnostics when warning

[clang] [clang][Sema] Preserve the initializer of invalid VarDecls (PR #88645)

2024-04-14 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/88645 >From 97170ed63643832f305254ba1788b99f90f9330d Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 14 Apr 2024 02:41:48 -0400 Subject: [PATCH] [clang][Sema] Preserve the initializer of invalid VarDecls

[clang] 46131aa - Revert "Reapply "[Clang][Sema] Fix crash when 'this' is used in a dependent class scope function template specialization that instantiates to a static member function (#87541)" (#883

2024-04-14 Thread Mikhail Goncharov via cfe-commits
Author: Mikhail Goncharov Date: 2024-04-15T08:41:32+02:00 New Revision: 46131aaf616c5cd97df0ec376a7e6ba475e1913c URL: https://github.com/llvm/llvm-project/commit/46131aaf616c5cd97df0ec376a7e6ba475e1913c DIFF: https://github.com/llvm/llvm-project/commit/46131aaf616c5cd97df0ec376a7e6ba475e1913c.d

[clang] [clang][Sema] Preserve the initializer of invalid VarDecls (PR #88645)

2024-04-14 Thread Nathan Ridge via cfe-commits
@@ -13435,8 +13435,7 @@ void Sema::checkNonTrivialCUnion(QualType QT, SourceLocation Loc, void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { // If there is no declaration, there was an error parsing it. Just ignore // the initializer. - if (!R

[clang] [clang][Sema] Preserve the initializer of invalid VarDecls (PR #88645)

2024-04-14 Thread Nathan Ridge via cfe-commits
@@ -13456,6 +13455,14 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { return; } + if (VDecl->isInvalidDecl()) { +CorrectDelayedTyposInExpr(Init, VDecl); +VDecl->setInit( +CreateRecoveryExpr(Init->getBeginLoc(), Init->ge

[clang] [clang][Sema] Preserve the initializer of invalid VarDecls (PR #88645)

2024-04-14 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Thanks for the improvement! > > Can you also add a test case? Thanks for the feedback! I added a new test case. However, the patch currently fails two existing test cases: Clang :: Parser/cxx-class.cpp Clang :: SemaCXX/cxx1z-init-statement.cpp I will leave the PR

[clang] [Clang][AArch64] Extend diagnostics when warning non/streaming about … (PR #88380)

2024-04-14 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/88380 >From 48659137fa681d2e3fe32490cc8b565f8771ccbf Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Thu, 11 Apr 2024 10:59:49 + Subject: [PATCH 1/3] [Clang][AArch64] Extend diagnostics when warning

<    1   2