[clang] [Clang][HIP] Suppress availability diagnostics for mismatched host/device overloads (PR #93546)

2024-05-28 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: > If we are adding a special case for handling overloads, perhaps a better > approach would be to consider inferring the caller context from the > enveloping function declaration attributes, and allow overload resolution to > pick a device function instead. It would avoid the

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-28 Thread via cfe-commits
https://github.com/Discookie updated https://github.com/llvm/llvm-project/pull/91951 >From 69cbd3da19eb0f8eb6758782b46daf99b5b79ea4 Mon Sep 17 00:00:00 2001 From: Viktor Date: Mon, 6 May 2024 06:11:58 + Subject: [PATCH 01/10] Add `bugprone-virtual-arithmetic` check Finds pointer arithmetic

[clang] [NFC] Construct Twines before concatenation (PR #90728)

2024-05-28 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/90728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 476a6d8 - [NFC] Construct Twines before concatenation (#90728)

2024-05-28 Thread via cfe-commits
Author: MagentaTreehouse Date: 2024-05-28T23:12:26-07:00 New Revision: 476a6d81a3648cf638400632c098e9f0ed025f8f URL: https://github.com/llvm/llvm-project/commit/476a6d81a3648cf638400632c098e9f0ed025f8f DIFF: https://github.com/llvm/llvm-project/commit/476a6d81a3648cf638400632c098e9f0ed025f8f.di

[clang] [NFC] Construct Twines before concatenation (PR #90728)

2024-05-28 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM. This avoids a temporary std::string, which might need a memory allocation. https://github.com/llvm/llvm-project/pull/90728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > :( My goal now is to fix xtensor implementation/original tests, so this is > not a question of reduction. I need to understand where the compiler picked a > different specialization with relaxed argument matching. So from the reduction you can see you have a problem where `sv

[clang] [C++20] [Modules] Don't generate the defintition for non-const available external variables (PR #93530)

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

[clang] b0f10a1 - [C++20] [Modules] Don't generate the defintition for non-const available external variables (#93530)

2024-05-28 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-05-29T13:39:57+08:00 New Revision: b0f10a1dc34aa1b73faeeabdc2d348074a02c75d URL: https://github.com/llvm/llvm-project/commit/b0f10a1dc34aa1b73faeeabdc2d348074a02c75d DIFF: https://github.com/llvm/llvm-project/commit/b0f10a1dc34aa1b73faeeabdc2d348074a02c75d.diff LO

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-28 Thread Matheus Izvekov via cfe-commits
@@ -947,6 +947,26 @@ void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef Label) { }); } +void TextNodeDumper::dumpTemplateArgument(const TemplateArgument &TA) { + llvm::SmallString<128> Str; + { +llvm::raw_svector_ostream SS(Str); +TA.print(PrintPolicy, SS,

[clang] [C++20] [Modules] Don't generate the defintition for non-const available external variables (PR #93530)

2024-05-28 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/93530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Don't generate the defintition for non-const available external variables (PR #93530)

2024-05-28 Thread Chuanqi Xu via cfe-commits
@@ -5341,6 +5341,15 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, !IsDefinitionAvailableExternally && D->needsDestruction(getContext()) == QualType::DK_cxx_destructor; + // It is helpless to emit the definition for an available_externally varia

[clang] [C++20] [Modules] Don't generate the defintition for non-const available external variables (PR #93530)

2024-05-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/93530 >From ebe47b2b411d7623ddafadad45a9be25913fe1c1 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 29 May 2024 10:48:51 +0800 Subject: [PATCH] [C++20] [Modules] Don't generate the defintition for non-const a

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-28 Thread via cfe-commits
eaeltsin wrote: :( My goal now is to fix xtensor implementation/original tests, so this is not a question of reduction. I need to understand where the compiler picked a different specialization with relaxed argument matching. https://github.com/llvm/llvm-project/pull/89807 __

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: No, I never used templight for this. I don't know of any easy to use tools that would work for a complex sample without modification. Otherwise, the reduction wasn't difficult, it was mostly that creduce / cvise are lacking steps to reduce template type aliases, and the typedef

[clang] [Clang][Sema] Use StructuralValues to model dependent NTTP arguments (PR #93556)

2024-05-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/93556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bb42511 - [Clang][Sema] Use StructuralValues to model dependent NTTP arguments (#93556)

2024-05-28 Thread via cfe-commits
Author: Younan Zhang Date: 2024-05-29T12:58:44+08:00 New Revision: bb42511f64fd44f2ff1beb0dd38a653a8f2c20df URL: https://github.com/llvm/llvm-project/commit/bb42511f64fd44f2ff1beb0dd38a653a8f2c20df DIFF: https://github.com/llvm/llvm-project/commit/bb42511f64fd44f2ff1beb0dd38a653a8f2c20df.diff

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-28 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: @vvd170501 I need to specify a commit message when merging. Github offers the PR description by default, but it seems slightly out of date (and some of it seems unnecessary). I would like to revise it as follows, could you look it over please: ``` [clangd] Add config opt

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-28 Thread via cfe-commits
eaeltsin wrote: Thanks @mizvekov ! This explanation sheds some light on why the original tests diverge in behavior so much, will look further. Is there a way to dump which template was picked for which instantiation? (I tried templight but it doesn't seem to handle this case yet, for me it wen

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-28 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Since the patch is approved, and as far as I can tell there aren't any comments remaining to be addressed, I will go ahead and merge this. https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@l

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Fangrui Song (MaskRay) Changes In GCC, `#pragma GCC diagnostic warning "-Wfoo"` overrides command-line `-Werror=foo` and errors that can become warnings (pedwarn with -pedantic-errors and permerror). ``` #pragma GCC diagnostic warn

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-05-28 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/93647 In GCC, `#pragma GCC diagnostic warning "-Wfoo"` overrides command-line `-Werror=foo` and errors that can become warnings (pedwarn with -pedantic-errors and permerror). ``` #pragma GCC diagnostic warning "-Wnarro

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @eaeltsin You example boils down to https://godbolt.org/z/axnanxP1z: ```C++ template struct xtype_for_shape; template class S, class X, long N> struct xtype_for_shape> {}; template struct svector; template struct xtype_for_shape>; ``` There is wide divergence between implement

[clang] [C++20] [Modules] Don't generate the defintition for non-const available external variables (PR #93530)

2024-05-28 Thread Eli Friedman via cfe-commits
@@ -5341,6 +5341,15 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, !IsDefinitionAvailableExternally && D->needsDestruction(getContext()) == QualType::DK_cxx_destructor; + // It is helpless to emit the definition for an available_externally varia

[clang] [C++20] [Modules] Don't generate the defintition for non-const available external variables (PR #93530)

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

[clang] [C++20] [Modules] Don't generate the defintition for non-const available external variables (PR #93530)

2024-05-28 Thread Chuanqi Xu via cfe-commits
@@ -5341,6 +5341,15 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, !IsDefinitionAvailableExternally && D->needsDestruction(getContext()) == QualType::DK_cxx_destructor; + // It is helpless to emit the definition for an available_externally varia

[clang] [clang codegen] Delete unnecessary GEP cleanup code. (PR #90303)

2024-05-28 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/90303 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cbf6e93 - [clang codegen] Delete unnecessary GEP cleanup code. (#90303)

2024-05-28 Thread via cfe-commits
Author: Eli Friedman Date: 2024-05-28T20:47:49-07:00 New Revision: cbf6e93ceee7b9de2b7c3e7e8cea3a972eda0e75 URL: https://github.com/llvm/llvm-project/commit/cbf6e93ceee7b9de2b7c3e7e8cea3a972eda0e75 DIFF: https://github.com/llvm/llvm-project/commit/cbf6e93ceee7b9de2b7c3e7e8cea3a972eda0e75.diff

[clang] [llvm] [clang] Add tanf16 builtin and support for tan constrained intrinsic (PR #93314)

2024-05-28 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/93314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Don't generate the defintition for non-const available external variables (PR #93530)

2024-05-28 Thread Eli Friedman via cfe-commits
@@ -5341,6 +5341,15 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, !IsDefinitionAvailableExternally && D->needsDestruction(getContext()) == QualType::DK_cxx_destructor; + // It is helpless to emit the definition for an available_externally varia

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-28 Thread Samuel Marks via cfe-commits
@@ -67,15 +67,13 @@ On Unix-like Systems Build LLVM and Clang: cd llvm-project -mkdir build (in-tree build is not supported) -cd build This builds both LLVM and Clang in release mode. Alternatively, if you need a debug build, switch Release to Deb

[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)

2024-05-28 Thread Kohei Asano via cfe-commits
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)

2024-05-28 Thread Kohei Asano via cfe-commits
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-28 Thread Damyan Pepper via cfe-commits
@@ -345,25 +347,26 @@ class DiagnoseHLSLAvailability // Helper methods for dealing with current stage context / environment void SetShaderStageContext(HLSLShaderAttr::ShaderType ShaderType) { +static_assert(HLSLShaderAttr::ShaderTypeMaxValue < 31, + "S

[clang] [clang-format] add an option to insert a space only for non-code block empty braces (PR #93634)

2024-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kohei Asano (khei4) Changes # What This patch introduces an option to insert a space between empty braces, especially for empty initializer. # Motivation WebKit has [its own `.clang-format` ](https://github.com/WebKit/WebKit/blob/main/

[clang] [clang-format] add an option to insert a space only for non-code block empty braces (PR #93634)

2024-05-28 Thread Kohei Asano via cfe-commits
https://github.com/khei4 created https://github.com/llvm/llvm-project/pull/93634 # What This patch introduces an option to insert a space between empty braces, especially for empty initializer. # Motivation WebKit has [its own `.clang-format` ](https://github.com/WebKit/WebKit/blob/main/.cla

[clang] [C++20] [Modules] Don't generate the defintition for non-const available external variables (PR #93530)

2024-05-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I think if a variable is GVA_AvailableExternally, and we can't emit a > constant, we should just completely skip emitting the definition: there isn't > any point to emitting an available_externally definition that doesn't > actually contain any information the optimizer can

[clang] [C++20] [Modules] Don't generate the defintition for non-const available external variables (PR #93530)

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

[clang] [C++20] [Modules] Don't generate the defintition for non-const available external variables (PR #93530)

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

[clang] [C++20] [Modules] Don't mark variables from other modules as constant if its initializer is not constant (PR #93530)

2024-05-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/93530 >From 05542b6176a84888438dd8c6cc9a86cb6f1b7282 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 29 May 2024 10:48:51 +0800 Subject: [PATCH] [C++20] [Modules] Don't generate the defintition for non-const a

[clang] [C++20] [Modules] Don't mark variables from other modules as constant if its initializer is not constant (PR #93530)

2024-05-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/93530 >From eaf720ca9d3a6a576eefbf9ac553b108611ec00d Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 29 May 2024 10:48:51 +0800 Subject: [PATCH] [C++20] [Modules] Don't generate the defintition for non-const a

[clang] [clang-format] Insert a space between a keyword and a literal (PR #93632)

2024-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #93603. --- Full diff: https://github.com/llvm/llvm-project/pull/93632.diff 4 Files Affected: - (modified) clang/lib/Format/FormatToken.h (+23) - (modified) clang/lib/Format/TokenAnnotator.cpp (+6

[clang] [clang-format] Insert a space between a keyword and a literal (PR #93632)

2024-05-28 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/93632 Fixes #93603. >From be3cb7662b789c7ffa61aab55c9390543cbab2ca Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 28 May 2024 19:36:36 -0700 Subject: [PATCH] [clang-format] Insert a space between a keyword and a li

[clang] [clang-tools-extra] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] Fix SyntaxWarning messages from python 3.12 (PR #86806)

2024-05-28 Thread via cfe-commits
AngryLoki wrote: This is going nowhere, I'll close it and create a separate PR for libcxx. Also `transitive_includes.gen.py` somehow (due to automatic git conflict resolution?) got damaged indentations, so it would require new review anyways. https://github.com/llvm/llvm-project/pull/86806

[clang] [clang-tools-extra] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] Fix SyntaxWarning messages from python 3.12 (PR #86806)

2024-05-28 Thread via cfe-commits
https://github.com/AngryLoki closed https://github.com/llvm/llvm-project/pull/86806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Use StructuralValues to model dependent NTTP arguments (PR #93556)

2024-05-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/93556 >From 76639804b9e5391169e76c5b07650c11d64003de Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 28 May 2024 22:11:25 +0800 Subject: [PATCH 1/2] [Clang][Sema] Use StructuralValues to model dependent NTTP ar

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: BTW, for the series patches, it may be better to use stacked PR (we use stacked PR by the method in https://llvm.org/docs/GitHub.html) if you have following patches (and it looks like you have a lot). Also, as a downstream vendor, I hope we can land the (large, NFC) patch ser

[clang] [Clang][Sema] Use StructuralValues to model dependent NTTP arguments (PR #93556)

2024-05-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/93556 >From 76639804b9e5391169e76c5b07650c11d64003de Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 28 May 2024 22:11:25 +0800 Subject: [PATCH] [Clang][Sema] Use StructuralValues to model dependent NTTP argume

[libcxx] [libcxxabi] [libunwind] [runtimes][CMake] Simplify the propagation of test dependencies (PR #93558)

2024-05-28 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/93558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [libcxxabi] [libunwind] [runtimes][CMake] Simplify the propagation of test dependencies (PR #93558)

2024-05-28 Thread Louis Dionne via cfe-commits
ldionne wrote: CI failure is an android fluke, merging! https://github.com/llvm/llvm-project/pull/93558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] bd135c3 - [runtimes][CMake] Simplify the propagation of test dependencies (#93558)

2024-05-28 Thread via cfe-commits
Author: Louis Dionne Date: 2024-05-28T18:31:01-07:00 New Revision: bd135c3b9fb57e6346e4a790945809617388ca9b URL: https://github.com/llvm/llvm-project/commit/bd135c3b9fb57e6346e4a790945809617388ca9b DIFF: https://github.com/llvm/llvm-project/commit/bd135c3b9fb57e6346e4a790945809617388ca9b.diff

[libunwind] 633ea41 - [runtimes] Reintroduce a way to select the compiler used for the test suite (#93542)

2024-05-28 Thread via cfe-commits
Author: Louis Dionne Date: 2024-05-28T18:29:47-07:00 New Revision: 633ea41b54bf7b2f10850bbd5ba3c4ab06081595 URL: https://github.com/llvm/llvm-project/commit/633ea41b54bf7b2f10850bbd5ba3c4ab06081595 DIFF: https://github.com/llvm/llvm-project/commit/633ea41b54bf7b2f10850bbd5ba3c4ab06081595.diff

[libcxx] [libcxxabi] [libunwind] [runtimes] Reintroduce a way to select the compiler used for the test suite (PR #93542)

2024-05-28 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/93542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add IRNormalizer Pass (PR #68176)

2024-05-28 Thread Justin Fargnoli via cfe-commits
justinfargnoli wrote: TODO: Sort function order https://github.com/llvm/llvm-project/pull/68176 ___ 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] [libcxx] [lld] [lldb] [llvm] [mlir] Fix SyntaxWarning messages from python 3.12 (PR #86806)

2024-05-28 Thread Louis Dionne via cfe-commits
ldionne wrote: Can we either finish this up or close it, please? I'd like to tidy up the libc++ review queue. https://github.com/llvm/llvm-project/pull/86806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-28 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. libcxx/ changes LGTM. https://github.com/llvm/llvm-project/pull/93417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-28 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93131 >From a8f15038fa0fbe3ba55d136eb459f511d73b0b34 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Wed, 22 May 2024 23:41:35 -0400 Subject: [PATCH] [clang][AST] fix ast-print of `extern ` with >=2 declarat

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-28 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93131 >From 0fd91ab5ba81c42594551d2662534d8a76c60d77 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Wed, 22 May 2024 23:41:35 -0400 Subject: [PATCH] [clang][AST] fix ast-print of `extern ` with >=2 declarat

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-28 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93131 >From b67bd3dc6a47aad978b699ae5451b5a595479546 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Wed, 22 May 2024 23:41:35 -0400 Subject: [PATCH] [clang][AST] fix ast-print of `extern ` with >=2 declarat

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-28 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 2ba08386156ef25913b1bee170d8fe95aaceb234 ae5225aa51a0a8f79ed134d9d5013d5774d2c04d --

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-28 Thread via cfe-commits
https://github.com/huixie90 updated https://github.com/llvm/llvm-project/pull/93131 >From ae5225aa51a0a8f79ed134d9d5013d5774d2c04d Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Wed, 22 May 2024 23:41:35 -0400 Subject: [PATCH] [clang][AST] fix ast-print of `extern ` with >=2 declarators

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-28 Thread Artem Yurchenko via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +// CHECK: extern "C" int printf(const char *, ...); +extern "C" int printf(const char *...); + +// CHECK: extern "C++" { temyurchenko wrote: Hopefully, the new implementation has fixed the

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-28 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93131 >From 3e19f7566f8dc96116c463e7c4fae0c094d3640c Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Wed, 22 May 2024 23:41:35 -0400 Subject: [PATCH] [clang][AST] fix ast-print of `extern ` with >=2 declarat

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-28 Thread via cfe-commits
codectile wrote: @justincady Could you please provide us with an example usage of `-exclude-header-filter` ? https://github.com/llvm/llvm-project/pull/91400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-28 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov edited https://github.com/llvm/llvm-project/pull/93623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-28 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov updated https://github.com/llvm/llvm-project/pull/93623 >From 5cbb966128b63212dcf9f2284b9f58fbcd12cee6 Mon Sep 17 00:00:00 2001 From: martinboehme Date: Wed, 29 May 2024 07:23:35 +0800 Subject: [PATCH 1/2] [clang-tidy] Let bugprone-use-after-move ignore the moved va

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-28 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov updated https://github.com/llvm/llvm-project/pull/93623 >From 5fc21145abde56096b607cf123f529f97b458252 Mon Sep 17 00:00:00 2001 From: martinboehme Date: Wed, 29 May 2024 07:23:35 +0800 Subject: [PATCH 1/2] [clang-tidy] Let bugprone-use-after-move ignore the moved va

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-28 Thread Kefu Chai via cfe-commits
tchaikov wrote: @martinboehme hello Martin, I resurrected your change at https://reviews.llvm.org/D145581?id=503330#inline-1406063 and posted here in hope that we can continue your efforts and finally land the change in main branch. Hope you don't mind that I created this without your permissi

[clang] [llvm] [WebAssembly] Implement all f16x8 binary instructions. (PR #93360)

2024-05-28 Thread Brendan Dahl via cfe-commits
https://github.com/brendandahl closed https://github.com/llvm/llvm-project/pull/93360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 60bce6e - [WebAssembly] Implement all f16x8 binary instructions. (#93360)

2024-05-28 Thread via cfe-commits
Author: Brendan Dahl Date: 2024-05-28T16:33:20-07:00 New Revision: 60bce6eab4d734b86f49b7638856eb8899bc89e8 URL: https://github.com/llvm/llvm-project/commit/60bce6eab4d734b86f49b7638856eb8899bc89e8 DIFF: https://github.com/llvm/llvm-project/commit/60bce6eab4d734b86f49b7638856eb8899bc89e8.diff

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-28 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov updated https://github.com/llvm/llvm-project/pull/93623 >From 5fc21145abde56096b607cf123f529f97b458252 Mon Sep 17 00:00:00 2001 From: martinboehme Date: Wed, 29 May 2024 07:23:35 +0800 Subject: [PATCH 1/2] [clang-tidy] Let bugprone-use-after-move ignore the moved va

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-28 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov edited https://github.com/llvm/llvm-project/pull/93623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-28 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-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-28 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov created https://github.com/llvm/llvm-project/pull/93623 This eliminates false positives in bugprone-use-after-move where a variable is used in the callee and moved from in the arguments. We introduce one special case: If the callee is a MemberExpr with a DeclRefExpr

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-05-28 Thread Jonas Devlieghere via cfe-commits
JDevlieghere wrote: `LLDB_CURSES_LIBS` is scoped to lldbCore, which the EditLine unit test isn't linking. If its also necessary in Host, then we should hoist it up and link both libraries against it. Anyway, that also means my initial assessment was wrong. I looked for the header include but

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-28 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: FYI this patch messes up some diagnostics with `-Wunreachable-code`: https://godbolt.org/z/6TEdrx55d If the unreachable code is a constructor with a default parameter that is a builtin function, clang incorrectly highlights the call to the builtin instead of the call to the c

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-05-28 Thread via cfe-commits
jimingham wrote: This patch has been causing the Darwin bots on GreenDragon to fail consistently since it was submitted. The problem is that the lldb/unitest/EditLine needs setupterm which comes from libcurses.dylib. However that was finding its way into this build line for this test, it's n

[clang] [llvm] [WebAssembly] Implement all f16x8 binary instructions. (PR #93360)

2024-05-28 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin approved this pull request. https://github.com/llvm/llvm-project/pull/93360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Code implementing SpacesInParensOptions.ExceptDoubleParentheses logic (PR #93439)

2024-05-28 Thread Gedare Bloom via cfe-commits
gedare wrote: I'll try this out in the next few days. https://github.com/llvm/llvm-project/pull/93439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > @mizvekov - can you please take a look at https://godbolt.org/z/ahro3vnPd ? > The reduced example fails somewhat differently, but it complains on `implicit > instantiation of undefined template` _with_ relaxed argument matching enabled > and compiles OK without... Thank you,

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-05-28 Thread David Li via cfe-commits
@@ -1967,11 +1969,23 @@ void llvm::updateProfileCallee( uint64_t CloneEntryCount = PriorEntryCount - NewEntryCount; for (auto Entry : *VMap) { if (isa(Entry.first)) -if (auto *CI = dyn_cast_or_null(Entry.second)) +if (auto *CI = dyn_cast_or_null(En

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-05-28 Thread David Li via cfe-commits
@@ -2538,6 +2538,190 @@ Value *getSalvageOpsForIcmpOp(ICmpInst *Icmp, uint64_t CurrentLocOps, return Icmp->getOperand(0); } +void llvm::tryToSinkInstructionDbgValues( david-xl wrote: is there test coverage for this? https://github.com/llvm/llvm-project/pu

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-05-28 Thread David Li via cfe-commits
@@ -103,30 +110,222 @@ static cl::opt ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")); +// This option is meant to be used by LLVM regression test and test the +// transformation that compares vt

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-05-28 Thread David Li via cfe-commits
@@ -316,6 +316,15 @@ void salvageDebugInfoForDbgValues(Instruction &I, ArrayRef Insns, ArrayRef DPInsns); +void tryToSinkInstructionDbgValues( david-xl wrote: Add description for the methods.

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-05-28 Thread David Li via cfe-commits
@@ -103,30 +110,222 @@ static cl::opt ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")); +// This option is meant to be used by LLVM regression test and test the +// transformation that compares vt

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-05-28 Thread David Li via cfe-commits
@@ -103,30 +110,222 @@ static cl::opt ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")); +// This option is meant to be used by LLVM regression test and test the +// transformation that compares vt

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-05-28 Thread David Li via cfe-commits
@@ -103,30 +110,222 @@ static cl::opt ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")); +// This option is meant to be used by LLVM regression test and test the +// transformation that compares vt

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-05-28 Thread David Li via cfe-commits
@@ -103,30 +110,222 @@ static cl::opt ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")); +// This option is meant to be used by LLVM regression test and test the +// transformation that compares vt

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-05-28 Thread David Li via cfe-commits
@@ -89,41 +93,50 @@ // ICTEXT: # NumValueSites: // ICTEXT: 2 // ICTEXT: 2 -// ICTEXT: {{.*}}instrprof-vtable-value-prof.cpp;_ZN12_GLOBAL__N_18Derived25func1Eii:750 -// ICTEXT: _ZN8Derived15func1Eii:250 +// ICTEXT: {{.*}}instrprof-vtable-value-prof.cpp;_ZN12_GLOBAL__N_18Derive

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-05-28 Thread David Li via cfe-commits
@@ -89,41 +93,50 @@ // ICTEXT: # NumValueSites: // ICTEXT: 2 // ICTEXT: 2 -// ICTEXT: {{.*}}instrprof-vtable-value-prof.cpp;_ZN12_GLOBAL__N_18Derived25func1Eii:750 -// ICTEXT: _ZN8Derived15func1Eii:250 +// ICTEXT: {{.*}}instrprof-vtable-value-prof.cpp;_ZN12_GLOBAL__N_18Derive

[clang] [llvm] [WebAssembly] Implement all f16x8 binary instructions. (PR #93360)

2024-05-28 Thread Brendan Dahl via cfe-commits
@@ -1199,6 +1213,7 @@ def : Pat<(v2f64 (froundeven (v2f64 V128:$src))), (NEAREST_F64x2 V128:$src)>; multiclass SIMDBinaryFP baseInst> { defm "" : SIMDBinary; defm "" : SIMDBinary; + defm "" : SIMDBinary; brendandahl wrote: I ended up adding `HalfPrecisi

[clang] [llvm] [WebAssembly] Implement all f16x8 binary instructions. (PR #93360)

2024-05-28 Thread Brendan Dahl via cfe-commits
@@ -152,6 +153,18 @@ def F64x2 : Vec { let prefix = "f64x2"; } +def F16x8 : Vec { + let vt = v8f16; + let int_vt = v8i16; + let lane_vt = f32; + let lane_rc = F32; + let lane_bits = 16; + let lane_idx = LaneIdx8; + let lane_load = int_wasm_loadf16_f32; + let splat = PatFrag<

[clang] [llvm] [WebAssembly] Implement all f16x8 binary instructions. (PR #93360)

2024-05-28 Thread Brendan Dahl via cfe-commits
https://github.com/brendandahl updated https://github.com/llvm/llvm-project/pull/93360 >From c33801afebb6720bc4b51fb4064b59529c40d298 Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Thu, 23 May 2024 23:38:51 + Subject: [PATCH 1/2] [WebAssembly] Implement all f16x8 binary instructions. Th

[clang] 20d497c - [Driver] Remove unneeded *-linux-gnu after D158183

2024-05-28 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-28T15:33:59-07:00 New Revision: 20d497c26fc95c80a1bacb38820d92e5f52bec58 URL: https://github.com/llvm/llvm-project/commit/20d497c26fc95c80a1bacb38820d92e5f52bec58 DIFF: https://github.com/llvm/llvm-project/commit/20d497c26fc95c80a1bacb38820d92e5f52bec58.diff

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-05-28 Thread Fangrui Song via cfe-commits
MaskRay wrote: > @MaskRay seems like this target might be too niche to go into LLVM at this > time? is it worth considering some bar before accepting such a thing into > LLVM, rather than encouraging folks to maintain such a thing in a branch for > now? Good question about the acceptance bar.

[clang] [CodeGen] Hidden visibility for prof version var (PR #93496)

2024-05-28 Thread via cfe-commits
https://github.com/gulfemsavrun closed https://github.com/llvm/llvm-project/pull/93496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 765206e - [CodeGen] Hidden visibility for prof version var (#93496)

2024-05-28 Thread via cfe-commits
Author: gulfemsavrun Date: 2024-05-28T15:06:11-07:00 New Revision: 765206e050453018e861637a08a4520f29238074 URL: https://github.com/llvm/llvm-project/commit/765206e050453018e861637a08a4520f29238074 DIFF: https://github.com/llvm/llvm-project/commit/765206e050453018e861637a08a4520f29238074.diff

[clang] [CodeGen] Hidden visibility for prof version var (PR #93496)

2024-05-28 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/93496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add tanf16 builtin and support for tan constrained intrinsic (PR #93314)

2024-05-28 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks good to me. https://github.com/llvm/llvm-project/pull/93314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e3f74d4 - [OpenACC] Correct serialization of certain clause sub-expressions

2024-05-28 Thread via cfe-commits
Author: erichkeane Date: 2024-05-28T14:38:30-07:00 New Revision: e3f74d4589e29279e9f543b58577a2ece102dc6f URL: https://github.com/llvm/llvm-project/commit/e3f74d4589e29279e9f543b58577a2ece102dc6f DIFF: https://github.com/llvm/llvm-project/commit/e3f74d4589e29279e9f543b58577a2ece102dc6f.diff LO

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-05-28 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/81442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >