[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

[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

[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

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

[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] [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 , StringRef InFile) { CI.getPreprocessor().addPPCallbacks(std::move(Callbacks)); } + if (CI.getFrontendOpts().GenReducedBMI && + !CI.getFrontendOpts().ModuleOutputPath.empty()) { +

[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 , const Driver , // 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
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] [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] 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] 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] 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,

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

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

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

[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

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

[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
@@ -831,7 +831,7 @@ class PackDeductionScope { if (IsPartiallyExpanded) PackElements += NumPartialPackArgs; else if (IsExpanded) - PackElements += *FixedNumExpansions; + PackElements += FixedNumExpansions.value_or(1); term-est wrote:

[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

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

[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 , const Driver , // 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 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
@@ -1061,6 +1070,16 @@ CodeGenAction::CreateASTConsumer(CompilerInstance , StringRef InFile) { CI.getPreprocessor().addPPCallbacks(std::move(Callbacks)); } + if (CI.getFrontendOpts().GenReducedBMI && + !CI.getFrontendOpts().ModuleOutputPath.empty()) { +

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

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

[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

[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

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

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Utkarsh Saxena (usx95) Changes Instead of directly pushing the `Destroy`, we should use `pushFullExprCleanup` which handles conditional branches. This fixes a backend crash due to 89ba7e183e6e2c64370ed1b963e54c06352211db. Tested: ```sh

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review https://github.com/llvm/llvm-project/pull/88670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/88670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/88670 Instead of directly pushing the `Destroy`, we should use `pushFullExprCleanup` which handles conditional branches. This fixes a backend crash due to 89ba7e183e6e2c64370ed1b963e54c06352211db. Tested: ```

[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
@@ -7,42 +7,70 @@ //===--===// #include "StringCompareCheck.h" -#include "../utils/FixItHintUtils.h" +#include "../utils/OptionsUtils.h" #include "clang/AST/ASTContext.h" #include

[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 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 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][Sema] Preserve the initializer of invalid VarDecls (PR #88645)

2024-04-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov requested changes to this pull request. Thanks for the improvement! Can you also add a test case? https://github.com/llvm/llvm-project/pull/88645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-14 Thread Matheus Izvekov 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(),

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

2024-04-14 Thread Matheus Izvekov 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

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

2024-04-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/88645 ___ 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 Matheus Izvekov via cfe-commits
mizvekov wrote: @sdkrystian ping, do you still intend to continue this? Just adding your example as a test case would be fine. https://github.com/llvm/llvm-project/pull/68222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-14 Thread Alexander Yermolovich via cfe-commits
ayermolo wrote: @usx95 can you repro? Also is there ETA on a fix, and if not can you revert this? https://github.com/llvm/llvm-project/pull/85398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-14 Thread via cfe-commits
https://github.com/Zentrik edited 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] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-14 Thread Alex Voicu via cfe-commits
@@ -3581,8 +3582,10 @@ ConstantAddress CodeGenModule::GetAddrOfTemplateParamObject( isExternallyVisible(TPO->getLinkageAndVisibility().getLinkage()) ? llvm::GlobalValue::LinkOnceODRLinkage : llvm::GlobalValue::InternalLinkage; - auto *GV = new

[clang] [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (PR #88666)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: `Sema.h` changes look good. https://github.com/llvm/llvm-project/pull/88666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] revert to string << string handling to previous default (PR #88490)

2024-04-14 Thread Owen Pan via cfe-commits
owenca wrote: Please see https://github.com/llvm/llvm-project/issues/88483#issuecomment-2053928993 and Conversation in #69859, which was the first attempt at adding an option for breaking consecutive stream insertion operations. Instead of handling everything specified in

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

2024-04-14 Thread via cfe-commits
https://github.com/Zentrik updated https://github.com/llvm/llvm-project/pull/88665 >From cdd250c837b9f1b2c35fa12b170c342f6d1ce295 Mon Sep 17 00:00:00 2001 From: Zentrik Date: Sun, 14 Apr 2024 17:28:18 +0100 Subject: [PATCH 1/2] Include cmath to fix build error on mac os 10.14 ---

[clang] [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (PR #88666)

2024-04-14 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/88666 >From 8d48a0bd1cf15b9cf00bc294912b674b5f94a11c Mon Sep 17 00:00:00 2001 From: yronglin Date: Mon, 15 Apr 2024 00:36:06 +0800 Subject: [PATCH 1/2] [Clang] Allow the value of unroll count to be zero in '#pragma

[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
@@ -7,42 +7,70 @@ //===--===// #include "StringCompareCheck.h" -#include "../utils/FixItHintUtils.h" +#include "../utils/OptionsUtils.h" #include "clang/AST/ASTContext.h" #include

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

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

[clang] [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (PR #88666)

2024-04-14 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/88666 >From 8d48a0bd1cf15b9cf00bc294912b674b5f94a11c Mon Sep 17 00:00:00 2001 From: yronglin Date: Mon, 15 Apr 2024 00:36:06 +0800 Subject: [PATCH] [Clang] Allow the value of unroll count to be zero in '#pragma GCC

[clang] [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (PR #88666)

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

[clang] [Clang] Allow the value of unroll count to be zero in '#pragma GCC unroll' and '#pragma unroll' (PR #88666)

2024-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes Fixes https://github.com/llvm/llvm-project/issues/88624 GCC allows the value of loop unroll count to be zero, and the values of 0 and 1 block any unrolling of the loop. This PR aims to make clang keeps the same

[clang] [Clang] Allow the value of unroll count to be zero in '#pragma GCC unroll' and '#pragma unroll' (PR #88666)

2024-04-14 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/88666 Fixes https://github.com/llvm/llvm-project/issues/88624 GCC allows the value of loop unroll count to be zero, and the values of 0 and 1 block any unrolling of the loop. This PR aims to make clang keeps the

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

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 b8d0cba14bcfc5c1c2f7a878ad9eaa12b6a590b6 cdd250c837b9f1b2c35fa12b170c342f6d1ce295 --

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

2024-04-14 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM

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

2024-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (Zentrik) Changes This should fix #88664. --- Full diff: https://github.com/llvm/llvm-project/pull/88665.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp (+1) ``diff

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

2024-04-14 Thread via cfe-commits
https://github.com/Zentrik created https://github.com/llvm/llvm-project/pull/88665 This should fix #88664. >From cdd250c837b9f1b2c35fa12b170c342f6d1ce295 Mon Sep 17 00:00:00 2001 From: Zentrik Date: Sun, 14 Apr 2024 17:28:18 +0100 Subject: [PATCH] Include cmath to fix build error on mac os

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

2024-04-14 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa edited https://github.com/llvm/llvm-project/pull/88661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-14 Thread YunQiang Su via cfe-commits
wzssyqa wrote: New PR with my resource-dir patch: https://github.com/llvm/llvm-project/pull/88661 https://github.com/llvm/llvm-project/pull/87866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: YunQiang Su (wzssyqa) Changes Follow-up to #81037. ToolChain::LibraryPaths holds the new compiler-rt library directory (e.g. `/tmp/Debug/lib/clang/19/lib/x86_64-unknown-linux-gnu`). However, it might be empty when the directory

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

2024-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver @llvm/pr-subscribers-backend-risc-v Author: YunQiang Su (wzssyqa) Changes Follow-up to #81037. ToolChain::LibraryPaths holds the new compiler-rt library directory (e.g. `/tmp/Debug/lib/clang/19/lib/x86_64-unknown-linux-gnu`). However, it

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

2024-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: YunQiang Su (wzssyqa) Changes Follow-up to #81037. ToolChain::LibraryPaths holds the new compiler-rt library directory (e.g. `/tmp/Debug/lib/clang/19/lib/x86_64-unknown-linux-gnu`). However, it might be empty when the directory does not

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

2024-04-14 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa created https://github.com/llvm/llvm-project/pull/88661 Follow-up to #81037. ToolChain::LibraryPaths holds the new compiler-rt library directory (e.g. `/tmp/Debug/lib/clang/19/lib/x86_64-unknown-linux-gnu`). However, it might be empty when the directory does not

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

2024-04-14 Thread Piotr Zegar via cfe-commits
@@ -7,42 +7,70 @@ //===--===// #include "StringCompareCheck.h" -#include "../utils/FixItHintUtils.h" +#include "../utils/OptionsUtils.h" #include "clang/AST/ASTContext.h" #include

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

2024-04-14 Thread Piotr Zegar via cfe-commits
@@ -20,13 +21,17 @@ namespace clang::tidy::readability { /// http://clang.llvm.org/extra/clang-tidy/checks/readability/string-compare.html class StringCompareCheck : public ClangTidyCheck { public: - StringCompareCheck(StringRef Name, ClangTidyContext *Context) - :

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

2024-04-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. - Missing storeOptions - Some other tiny nits. Would be nice to get rid of lambda RegisterForClasses as it's not needed, and have common handling. https://github.com/llvm/llvm-project/pull/88636

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

2024-04-14 Thread Piotr Zegar via cfe-commits
@@ -7,42 +7,70 @@ //===--===// #include "StringCompareCheck.h" -#include "../utils/FixItHintUtils.h" +#include "../utils/OptionsUtils.h" #include "clang/AST/ASTContext.h" #include

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

2024-04-14 Thread Piotr Zegar via cfe-commits
@@ -7,42 +7,70 @@ //===--===// #include "StringCompareCheck.h" -#include "../utils/FixItHintUtils.h" +#include "../utils/OptionsUtils.h" #include "clang/AST/ASTContext.h" #include

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

2024-04-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL 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] Fix high memory consumption during pack deduction (PR #88637)

2024-04-14 Thread Thorsten Schütt via cfe-commits
@@ -831,7 +831,7 @@ class PackDeductionScope { if (IsPartiallyExpanded) PackElements += NumPartialPackArgs; else if (IsExpanded) - PackElements += *FixedNumExpansions; + PackElements += FixedNumExpansions.value_or(1); tschuett wrote:

[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/2] readability-string-compare: check std::string_view, allow

[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
@@ -50,5 +52,32 @@ Examples: } The above code examples show the list of if-statements that this check will -give a warning for. All of them uses ``compare`` to check if equality or +give a warning for. All of them use ``compare`` to check equality or inequality of two

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

2024-04-14 Thread via cfe-commits
@@ -50,5 +52,32 @@ Examples: } The above code examples show the list of if-statements that this check will -give a warning for. All of them uses ``compare`` to check if equality or +give a warning for. All of them use ``compare`` to check equality or inequality of two

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

2024-04-14 Thread via cfe-commits
@@ -50,5 +52,32 @@ Examples: } The above code examples show the list of if-statements that this check will -give a warning for. All of them uses ``compare`` to check if equality or +give a warning for. All of them use ``compare`` to check equality or inequality of two

[clang] 7cfe736 - [clang] Fix name conflict with `sys/mac.h` on AIX (#88644)

2024-04-14 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-14T17:51:15+04:00 New Revision: 7cfe73624780010ec81ca11c41ebbf214400abdd URL: https://github.com/llvm/llvm-project/commit/7cfe73624780010ec81ca11c41ebbf214400abdd DIFF:

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

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

[clang] [analyzer] Handle builtin functions in MallocChecker (PR #88416)

2024-04-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -214,3 +214,15 @@ void *realloc(void **ptr, size_t size) { realloc(ptr, size); } // no-crash namespace pr46253_paramty2{ void *realloc(void *ptr, int size) { realloc(ptr, size); } // no-crash } // namespace

[clang] [analyzer] Handle builtin functions in MallocChecker (PR #88416)

2024-04-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. High quality code with descent description. Really nice work. Nothing really stood out to me that I'd object. https://github.com/llvm/llvm-project/pull/88416

[clang] [analyzer] Handle builtin functions in MallocChecker (PR #88416)

2024-04-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/88416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-14 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/88642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -997,6 +987,11 @@ class Sema final : public SemaBase { return *OpenACCPtr; } + SemaOpenMP () { +assert(OpenMPPtr); Endilll wrote: Done https://github.com/llvm/llvm-project/pull/88642 ___ cfe-commits

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

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -997,6 +987,11 @@ class Sema final : public SemaBase { return *OpenACCPtr; } + SemaOpenMP () { Endilll wrote: This was discussed back when we started splitting `Sema` up: https://github.com/llvm/llvm-project/pull/84184#discussion_r1520027821. We

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

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -11,6 +11,7 @@ /// //===--===// +#include "clang/Sema/SemaOpenMP.h" Endilll wrote: Main module header goes first per our coding standard:

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

2024-04-14 Thread Alexey Bataev via cfe-commits
@@ -997,6 +987,11 @@ class Sema final : public SemaBase { return *OpenACCPtr; } + SemaOpenMP () { +assert(OpenMPPtr); alexey-bataev wrote: Add assertion message https://github.com/llvm/llvm-project/pull/88642

  1   2   >