[clang] [clang][dataflow] Add new `join` API and replace existing `merge` implementations. (PR #80361)

2024-02-02 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand updated https://github.com/llvm/llvm-project/pull/80361 >From 660d1afbda79416beb6f373e6252670f912a5181 Mon Sep 17 00:00:00 2001 From: Yitzhak Mandelbaum Date: Tue, 30 Jan 2024 16:02:21 + Subject: [PATCH 1/3] Add new `join` API and replace existing `merge` implementa

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-02 Thread Ziqing Luo via cfe-commits
@@ -0,0 +1,164 @@ +// RUN: %clang_cc1 -std=c++20 -Wunsafe-buffer-usage \ +// RUN:-fsafe-buffer-usage-suggestions \ +// RUN:-fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +typedef int * Int_ptr_t; +typedef int Int_t; + +void simple(unsigned idx) { +

[clang] [CLANG] Fix INF/NAN warning. (PR #80290)

2024-02-02 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/80290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [BPF] add cast_{user,kern} instructions (PR #79902)

2024-02-02 Thread via cfe-commits
https://github.com/eddyz87 updated https://github.com/llvm/llvm-project/pull/79902 >From 449bc0e4578bc04813974b82e3bf98b5407f5461 Mon Sep 17 00:00:00 2001 From: Eduard Zingerman Date: Fri, 26 Jan 2024 04:18:32 +0200 Subject: [PATCH 1/4] [BPF] add cast_{user,kern} instructions This commit aims

[clang] [llvm] [clang-tools-extra] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-02-02 Thread Shourya Goel via cfe-commits
Sh0g0-1758 wrote: gentle ping regarding this : > @AaronBallman, I don't think it needs templating. After a careful look I > believe that the current implementation is for `-verify` only. Also the error > says `err_verify_invalid_no_diags` which implicitly means that we are passing > no `-ver

[clang] [Clang] Allow __is_nothrow_convertible to be used as an identifier (PR #80476)

2024-02-02 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 9cc2122bf5a81f7063c2a32b2cb78c8d615578a1 fb4160b50535fd16951c5261e6c7d91da0cd92b0 --

[clang] [libcxx] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @sdkrystian #80476 https://github.com/llvm/llvm-project/pull/80436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow __is_nothrow_convertible to be used as an identifier (PR #80476)

2024-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikolas Klauser (philnik777) Changes `__is_nothrow_convertible` has been used by libstdc++ previously as an identifier. --- Full diff: https://github.com/llvm/llvm-project/pull/80476.diff 2 Files Affected: - (modified) clang/lib/Parse

[clang] [Clang] Allow __is_nothrow_convertible to be used as an identifier (PR #80476)

2024-02-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/80476 `__is_nothrow_convertible` has been used by libstdc++ previously as an identifier. >From fb4160b50535fd16951c5261e6c7d91da0cd92b0 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 Feb 2024 20:06:2

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-02 Thread Fangrui Song via cfe-commits
@@ -1569,6 +1569,40 @@ // RUN:--gcc-toolchain="" \ // RUN:--sysroot=%S/Inputs/basic_linux_tree 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s +// Don't link crtfastmath.o with -shared +// RUN: %clang --target=x86_64-unknown-linux -no-pie -###

[llvm] [clang] [polly] [X86] Remove Intel Xeon Phi Supports. (PR #76383)

2024-02-02 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @FreddyLeaf Can this be abandoned now? https://github.com/llvm/llvm-project/pull/76383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-02 Thread Fangrui Song via cfe-commits
@@ -2554,6 +2554,11 @@ defm protect_parens : BoolFOption<"protect-parens", "floating-point expressions are evaluated">, NegFlag>; +defm daz_ftz : SimpleMFlag<"daz-ftz", + "Globally set", "Do not globally set", + " the denormals-are-zero (DAZ) and flush-to-zero (F

[libcxx] [clang] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @philnik777 https://lab.llvm.org/buildbot/#/builders/46/builds/63116 https://github.com/llvm/llvm-project/pull/80436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [libc] [clang] [compiler-rt] [libcxx] [clang-tools-extra] [flang] [TTI]Fallback to SingleSrcPermute shuffle kind, if no direct estimation for (PR #79837)

2024-02-02 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Ping! https://github.com/llvm/llvm-project/pull/79837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joshua Cranmer (jcranmer-intel) Changes This fixes https://github.com/llvm/llvm-project/issues/57589, and aligns Clang with the behavior of current versions of gcc. There is a new option, -mdaz-ftz, to control the linking of the file that

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-02 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel created https://github.com/llvm/llvm-project/pull/80475 This fixes https://github.com/llvm/llvm-project/issues/57589, and aligns Clang with the behavior of current versions of gcc. There is a new option, -mdaz-ftz, to control the linking of the file that sets

[clang] [Clang] Fix a crash when dumping a pack indexing type. (PR #80439)

2024-02-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/80439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang-tools-extra] [flang] [llvm] [libcxx] [libc] [clang] [lldb] [AArch64] Support optional constant offset for constraint "S" (PR #80255)

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

[clang] d4de4c3 - [AArch64] Support optional constant offset for constraint "S" (#80255)

2024-02-02 Thread via cfe-commits
Author: Fangrui Song Date: 2024-02-02T10:33:09-08:00 New Revision: d4de4c3eafa9b70c255a4d6d5a14dccff79d10e9 URL: https://github.com/llvm/llvm-project/commit/d4de4c3eafa9b70c255a4d6d5a14dccff79d10e9 DIFF: https://github.com/llvm/llvm-project/commit/d4de4c3eafa9b70c255a4d6d5a14dccff79d10e9.diff

[clang] [Clang] Fix a crash when dumping a pack indexing type. (PR #80439)

2024-02-02 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/80439 >From 4a726e2685a866539bbe6120fb93c5ad1a3bd1d2 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 2 Feb 2024 15:45:02 +0100 Subject: [PATCH 1/3] [Clang] Fix a crash when dumping a pack indexing type. Fix

[llvm] [clang] [clang-tools-extra] [mlir] [MLIR][tensor] Improve `tensor.pack` verifier to catch more cases with unconditional runtime errors (PR #77217)

2024-02-02 Thread via cfe-commits
https://github.com/srcarroll updated https://github.com/llvm/llvm-project/pull/77217 >From e016ccb680d84257fe44e4e408bad6e510eb703d Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 6 Jan 2024 18:51:24 -0600 Subject: [PATCH 1/2] Include output size in determining UB for `tensor.pack` --- .../mlir

[libcxx] [clang] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/80436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9cc2122 - [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (#80436)

2024-02-02 Thread via cfe-commits
Author: Nikolas Klauser Date: 2024-02-02T19:15:58+01:00 New Revision: 9cc2122bf5a81f7063c2a32b2cb78c8d615578a1 URL: https://github.com/llvm/llvm-project/commit/9cc2122bf5a81f7063c2a32b2cb78c8d615578a1 DIFF: https://github.com/llvm/llvm-project/commit/9cc2122bf5a81f7063c2a32b2cb78c8d615578a1.dif

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

2024-02-02 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/78595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1156bbc - [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (#78595)

2024-02-02 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-02-02T13:15:41-05:00 New Revision: 1156bbc5b1837e688b0e5d6952f1a900aca29062 URL: https://github.com/llvm/llvm-project/commit/1156bbc5b1837e688b0e5d6952f1a900aca29062 DIFF: https://github.com/llvm/llvm-project/commit/1156bbc5b1837e688b0e5d6952f1a900aca29062

[clang] [Clang] Fix a crash when dumping a pack indexing type. (PR #80439)

2024-02-02 Thread Erich Keane via cfe-commits
@@ -0,0 +1,24 @@ +// RUN: not %clang_cc1 -std=c++2c -ast-dump %s | FileCheck %s + +namespace InvalidPacksShouldNotCrash { + +struct NotAPack; +template typename Tp> +void not_pack() { +int i = 0; +i...[0]; // expected-error {{i does not refer to the name of a parameter

[clang] [Clang] Fix a crash when dumping a pack indexing type. (PR #80439)

2024-02-02 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/80439 >From 4a726e2685a866539bbe6120fb93c5ad1a3bd1d2 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 2 Feb 2024 15:45:02 +0100 Subject: [PATCH 1/2] [Clang] Fix a crash when dumping a pack indexing type. Fix

[libcxx] [clang] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/80436 >From d210ffcbc1c60c222bd456851372f4835cc12127 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 Feb 2024 15:12:15 +0100 Subject: [PATCH] [Clang][libc++] Implement __is_nothrow_convertible and use it

[flang] [clang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-02-02 Thread Mats Petersson via cfe-commits
https://github.com/Leporacanthicus updated https://github.com/llvm/llvm-project/pull/78755 >From a0e256f379130a98ba03793f7102c67d02cbdef1 Mon Sep 17 00:00:00 2001 From: Mats Petersson Date: Fri, 19 Jan 2024 16:30:31 + Subject: [PATCH 1/7] [flang]Add support for -moutline-atomics and -mno-o

[llvm] [clang] [clang-tools-extra] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2024-02-02 Thread James Y Knight via cfe-commits
jyknight wrote: Underaligned atomic operations are expanded to an appropriate `__atomic_*` libcall via mostly target-independent code in AtomicExpandPass (https://github.com/llvm/llvm-project/blob/7ecfb66c77ad77dabbb705cbb1f3b17a3d1391a4/llvm/lib/CodeGen/AtomicExpandPass.cpp#L210) and never hi

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

2024-02-02 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/78595 >From 44689d064a5e4c908c0011532302e9b84e060fab Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 17 Jan 2024 10:13:29 -0500 Subject: [PATCH] [Clang][Sema] Diagnose use of template keyword after de

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

2024-02-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/78595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-02 Thread Alex Hoppen via cfe-commits
@@ -53,13 +55,34 @@ struct RenameInputs { struct RenameResult { // The range of the symbol that the user can attempt to rename. Range Target; + // Placeholder text for the rename operation if non-empty. + std::string Placeholder; // Rename occurrences for the current m

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

2024-02-02 Thread Alex Hoppen via cfe-commits
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl &RenameDecl, Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Re

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

2024-02-02 Thread Alex Hoppen via cfe-commits
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl &RenameDecl, Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Re

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

2024-02-02 Thread Alex Hoppen via cfe-commits
@@ -508,24 +513,46 @@ static bool mayBeValidIdentifier(llvm::StringRef Ident) { !isAsciiIdentifierStart(Ident.front(), AllowDollar)) return false; for (char C : Ident) { +if (AllowColon && C == ':') ahoppen wrote: Should we also allow spaces he

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

2024-02-02 Thread Alex Hoppen via cfe-commits
@@ -569,8 +840,13 @@ renameWithinFile(ParsedAST &AST, const NamedDecl &RenameDecl, // } if (!isInsideMainFile(RenameLoc, SM)) continue; +Locs.push_back(RenameLoc); + } + if (const auto *MD = dyn_cast(&RenameDecl)) +return renameObjCMethodWithinFile(AS

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

2024-02-02 Thread Alex Hoppen via cfe-commits
@@ -508,24 +513,46 @@ static bool mayBeValidIdentifier(llvm::StringRef Ident) { !isAsciiIdentifierStart(Ident.front(), AllowDollar)) return false; for (char C : Ident) { +if (AllowColon && C == ':') + continue; if (llvm::isASCII(C) && !isAsciiIdentifie

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

2024-02-02 Thread Alex Hoppen via cfe-commits
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl &RenameDecl, Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Re

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

2024-02-02 Thread Alex Hoppen via cfe-commits
@@ -508,24 +513,46 @@ static bool mayBeValidIdentifier(llvm::StringRef Ident) { !isAsciiIdentifierStart(Ident.front(), AllowDollar)) return false; for (char C : Ident) { +if (AllowColon && C == ':') + continue; if (llvm::isASCII(C) && !isAsciiIdentifie

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

2024-02-02 Thread Alex Hoppen via cfe-commits
@@ -681,12 +957,22 @@ renameOutsideFile(const NamedDecl &RenameDecl, llvm::StringRef MainFilePath, ExpBuffer.getError().message()); continue; } +std::string RenameIdentifier = RenameDecl.getNameAsString(); ahoppen wrote: Technically `

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

2024-02-02 Thread Alex Hoppen via cfe-commits
ahoppen wrote: I think we could also include my tests from https://github.com/llvm/llvm-project/pull/78872/files#diff-26ff7c74af8a1d882abbad43625d3cd4bf8d024ef5c7064993f5ede3eec8752eR834 More tests never hurt. https://github.com/llvm/llvm-project/pull/76466 _

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

2024-02-02 Thread Alex Hoppen via cfe-commits
@@ -681,12 +957,22 @@ renameOutsideFile(const NamedDecl &RenameDecl, llvm::StringRef MainFilePath, ExpBuffer.getError().message()); continue; } +std::string RenameIdentifier = RenameDecl.getNameAsString(); +std::optional Selector = std::nullopt; +

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

2024-02-02 Thread Alex Hoppen via cfe-commits
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl &RenameDecl, Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Re

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

2024-02-02 Thread Alex Hoppen via cfe-commits
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl &RenameDecl, Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Re

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

2024-02-02 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane cor3ntin approved... please take a look when you have time https://github.com/llvm/llvm-project/pull/78595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7ecfb66 - [Clang][Sema] Correctly look up primary template for variable template specializations (#80359)

2024-02-02 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-02-02T12:53:34-05:00 New Revision: 7ecfb66c77ad77dabbb705cbb1f3b17a3d1391a4 URL: https://github.com/llvm/llvm-project/commit/7ecfb66c77ad77dabbb705cbb1f3b17a3d1391a4 DIFF: https://github.com/llvm/llvm-project/commit/7ecfb66c77ad77dabbb705cbb1f3b17a3d1391a4

[clang] [Clang][Sema] Correctly look up primary template for variable template specializations (PR #80359)

2024-02-02 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/80359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Correctly look up primary template for variable template specializations (PR #80359)

2024-02-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/80359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Correctly look up primary template for variable template specializations (PR #80359)

2024-02-02 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane Release note added https://github.com/llvm/llvm-project/pull/80359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2024-02-02 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Please can you confirm we have tests for underaligned pointers? https://github.com/llvm/llvm-project/pull/74275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[libc] [clang-tools-extra] [lld] [lldb] [clang] [libcxx] [flang] [llvm] [AArch64] Support optional constant offset for constraint "S" (PR #80255)

2024-02-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/80255 >From 8ce25b59ac48e3b0a69c28e8af3abe6d7cbf0c42 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 31 Jan 2024 23:25:23 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF

[llvm] [clang] [AArch64] Support optional constant offset for constraint "S" (PR #80255)

2024-02-02 Thread Fangrui Song via cfe-commits
@@ -3,6 +3,7 @@ ; RUN: llc -mtriple=riscv64 < %s | FileCheck %s --check-prefix=RV64 @var = external dso_local global i32, align 4 +@a = external global [2 x [2 x i32]], align 4 MaskRay wrote: Sorry, no. I accidentally included this when preparing tests using

[clang] [NFC][Clang] Replace Arch with Triplet. (PR #80465)

2024-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dani (DanielKristofKiss) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/80465.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CodeGenModule.cpp (+4-10) ``diff diff --git a/clang/lib/CodeGen/CodeGenMod

[clang] [NFC][Clang] Replace Arch with Triplet. (PR #80465)

2024-02-02 Thread via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/80465 None >From 2215b0400daecb3eb10040efb07a9669ef6f97ca Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 31 Jan 2024 17:54:24 +0100 Subject: [PATCH] [Clang] Replace Arch with Triplet. --- clang/lib/

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-02-02 Thread David Li via cfe-commits
https://github.com/david-xl approved this pull request. https://github.com/llvm/llvm-project/pull/76868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [libc] [mlir] [flang] [lldb] [clang] [libcxx] [mlir] Skip invalid test on big endian platform (s390x) (PR #80246)

2024-02-02 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s + +// Decoding the attribute does not work on big-endian platforms currently +// XFAIL: target=s390x-{{.*}} efriedma-quic wrote: LLVM tests use "host-byteorder-little-end

[clang] [analyzer] Teach analzer about ms __analyzer_assume(bool) and friends (PR #80456)

2024-02-02 Thread via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/80456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Teach analzer about ms __analyzer_assume(bool) and friends (PR #80456)

2024-02-02 Thread via cfe-commits
@@ -26,10 +27,41 @@ namespace { class BuiltinFunctionChecker : public Checker { public: bool evalCall(const CallEvent &Call, CheckerContext &C) const; + +private: + const CallDescriptionSet MicrosoftAnalysisAssume{ + {{"__analysis_assume"}, 1}, + {{"_Analysis_assum

[clang] [analyzer] Teach analzer about ms __analyzer_assume(bool) and friends (PR #80456)

2024-02-02 Thread via cfe-commits
@@ -26,10 +27,41 @@ namespace { class BuiltinFunctionChecker : public Checker { public: bool evalCall(const CallEvent &Call, CheckerContext &C) const; + +private: + const CallDescriptionSet MicrosoftAnalysisAssume{ + {{"__analysis_assume"}, 1}, + {{"_Analysis_assum

[clang] [analyzer] Teach analzer about ms __analyzer_assume(bool) and friends (PR #80456)

2024-02-02 Thread via cfe-commits
@@ -26,10 +27,41 @@ namespace { class BuiltinFunctionChecker : public Checker { public: bool evalCall(const CallEvent &Call, CheckerContext &C) const; + +private: + const CallDescriptionSet MicrosoftAnalysisAssume{ + {{"__analysis_assume"}, 1}, + {{"_Analysis_assum

[clang] [analyzer] Teach analzer about ms __analyzer_assume(bool) and friends (PR #80456)

2024-02-02 Thread via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/80456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Teach analzer about ms __analyzer_assume(bool) and friends (PR #80456)

2024-02-02 Thread via cfe-commits
https://github.com/NagyDonat commented: The code LGTM with some minor remarks, but I'm not familiar with these MS functions. I'm not sure whether these "builtin by Microsoft" functions are in scope for "our" BuiltinFunctionChecker which previously only checked functions that are recognized as

[clang] [Clang] Fix a crash when dumping a pack indexing type. (PR #80439)

2024-02-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. LGTM other than generalizing the test a bit. https://github.com/llvm/llvm-project/pull/80439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [Clang] Fix a crash when dumping a pack indexing type. (PR #80439)

2024-02-02 Thread Erich Keane via cfe-commits
@@ -0,0 +1,24 @@ +// RUN: not %clang_cc1 -std=c++2c -ast-dump %s | FileCheck %s + +namespace InvalidPacksShouldNotCrash { + +struct NotAPack; +template typename Tp> +void not_pack() { +int i = 0; +i...[0]; // expected-error {{i does not refer to the name of a parameter

[clang] [Clang][Sema] Correctly look up primary template for variable template specializations (PR #80359)

2024-02-02 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80359 >From f23e899cd409463c6934b09929e3deb4a69205ef Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 1 Feb 2024 17:34:59 -0500 Subject: [PATCH] [Clang][Sema] Correctly look up primary template for vari

[flang] [clang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-02-02 Thread Mats Petersson via cfe-commits
https://github.com/Leporacanthicus updated https://github.com/llvm/llvm-project/pull/78755 >From a0e256f379130a98ba03793f7102c67d02cbdef1 Mon Sep 17 00:00:00 2001 From: Mats Petersson Date: Fri, 19 Jan 2024 16:30:31 + Subject: [PATCH 1/6] [flang]Add support for -moutline-atomics and -mno-o

[clang] [llvm] [openmp] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 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 43dd1e84df1ecdad872e1004af47b489e08fc228 6b102a9da40254147578673fa6c8234a12d19e8f --

[clang] [clang] Better bitfield access units (PR #65742)

2024-02-02 Thread Nathan Sidwell via cfe-commits
urnathan wrote: @rjmccall thanks for your comments. Here's a reimplementation using a single loop -- the downside is that we may end up repeating the initial grouping scan, if we search more than 1 Access Unit ahead and fail to find a 'good' access unit. This update changes the algorithm sli

[openmp] [llvm] [clang] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Joseph Huber (jhuber6) Changes Summary: Currently, OpenMP handles the `omp requires` clause by emitting a global constructor into the runtime for every translation unit that requires it. However, this is not a great solution because

[clang] [llvm] [openmp] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp Author: Joseph Huber (jhuber6) Changes Summary: Currently, OpenMP handles the `omp requires` clause by emitting a global constructor into the runtime for every translation unit that requires it. However, this is not a great solution because

[clang] [openmp] [llvm] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: Currently, OpenMP handles the `omp requires` clause by emitting a global constructor into the runtime for every translation unit that requires it. However, this is not a great solution because it prev

[clang] [libc] [llvm] [clang-tools-extra] [flang] [SLP] Initial vectorization of non-power-of-2 ops. (PR #77790)

2024-02-02 Thread Florian Hahn via cfe-commits
@@ -6987,6 +7024,17 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis { auto *VecTy = FixedVectorType::get(VL.front()->getType(), VL.size()); InstructionCost GatherCost = 0; SmallVector Gathers(VL.begin(), VL.end()); +auto ComputeGatherCost =

[clang] [libc] [flang] [clang-tools-extra] [llvm] [SLP] Initial vectorization of non-power-of-2 ops. (PR #77790)

2024-02-02 Thread Florian Hahn via cfe-commits
@@ -10654,7 +10703,16 @@ template ResTy BoUpSLP::processBuildVector(const TreeEntry *E, Args &...Params) { assert(E->State == TreeEntry::NeedToGather && "Expected gather node."); unsigned VF = E->getVectorFactor(); - + BVTy ShuffleBuilder(Params...); + // FIXME: Only ful

[clang] [clang-tools-extra] [llvm] [CMake][PGO] Add option for using an external project to generate profile data (PR #78879)

2024-02-02 Thread Amir Ayupov via cfe-commits
https://github.com/aaupov approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/78879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ASAN] For Asan instrumented global, emit two symbols, one with actual size and other with instrumented size. (PR #70166)

2024-02-02 Thread via cfe-commits
skc7 wrote: @hctim @MaskRay @vitalybuka #70166 and #68865 have been pending for review and approvals for few months now. All the feedback has been useful in improving the patch. Made the changes to patches as per feedback. Please review. https://github.com/llvm/llvm-project/pull/70166

[clang] [clang-tools-extra] [llvm] [CMake][PGO] Add option for using an external project to generate profile data (PR #78879)

2024-02-02 Thread Tom Stellard via cfe-commits
@@ -2,7 +2,7 @@ set(CMAKE_BUILD_TYPE RELEASE CACHE STRING "") set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "") set(LLVM_ENABLE_PROJECTS "clang;lld" CACHE STRING "") -set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi" CACHE STRING "") +set(LLVM_ENABLE_RUNTIMES "compiler-rt;lib

[clang] [clang-tools-extra] [llvm] [CMake][PGO] Add option for using an external project to generate profile data (PR #78879)

2024-02-02 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/78879 >From 0719f49ecc6dd69ae4698c3e84dbf175a1bf2ed3 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sun, 21 Jan 2024 00:25:47 + Subject: [PATCH 1/4] [CMake][PGO] Add libunwind to list of stage1 runtimes This f

[clang] [clang][analyzer] Change default value of checker option in unix.StdCLibraryFunctions. (PR #80457)

2024-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Kéri (balazske) Changes Default value of checker option `ModelPOSIX` is changed to `true`. Documentation is updated. --- Full diff: https://github.com/llvm/llvm-project/pull/80457.diff 3 Files Affected: - (modi

[clang] [clang][analyzer] Change default value of checker option in unix.StdCLibraryFunctions. (PR #80457)

2024-02-02 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/80457 Default value of checker option `ModelPOSIX` is changed to `true`. Documentation is updated. From 1f65abda712efce624c01ec99675c8261a8e6cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Dat

[libunwind] Use relative includes to allow source-based dependencies without `-I` (PR #80443)

2024-02-02 Thread Yuriy Chernyshov via cfe-commits
georgthegreat wrote: I understand the _this will definitely break in the future without proper testing_, but libunwind does not experience frequent changes, so this might be a working soluiton even without explicit testing. https://github.com/llvm/llvm-project/pull/80443 __

[clang] [analyzer] Teach analzer about ms __analyzer_assume(bool) and friends (PR #80456)

2024-02-02 Thread Balazs Benics via cfe-commits
steakhal wrote: Let me know if this is correct @Xazax-hun. You probably have more insights on these APIs than me ;) https://github.com/llvm/llvm-project/pull/80456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [analyzer] Teach analzer about ms __analyzer_assume(bool) and friends (PR #80456)

2024-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes See the MS docs: https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/using-the--analysis-assume-function-to-suppress-false-defects https://learn.microsoft.com/en-us/cpp/cod

[clang] [analyzer] Teach analzer about ms __analyzer_assume(bool) and friends (PR #80456)

2024-02-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/80456 See the MS docs: https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/using-the--analysis-assume-function-to-suppress-false-defects https://learn.microsoft.com/en-us/cpp/code-quality/how-to-specif

[libunwind] Use relative includes to allow source-based dependencies without `-I` (PR #80443)

2024-02-02 Thread Yuriy Chernyshov via cfe-commits
georgthegreat wrote: We have pretty large codebase and we use custom command-graph based build system (consider bazel as a well-known example of such buld system). The system uses module as a basic unit, modules might depend one each other, dependencies might affect dependant modules (but not

[clang] Fix clang crash when printing highlighted code in diagnostic (after #66514) (PR #80442)

2024-02-02 Thread via cfe-commits
@@ -1349,7 +1349,7 @@ void TextDiagnostic::emitSnippetAndCaret( // Prepare source highlighting information for the lines we're about to // emit, starting from the first line. std::unique_ptr[]> SourceStyles = - highlightLines(BufStart, Lines.first, Lines.second, PP,

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-02-02 Thread via cfe-commits
alexfh wrote: I've added my findings with regard to this issue in https://github.com/llvm/llvm-project/pull/80442#discussion_r1476243065 Hope that helps understanding the problem. https://github.com/llvm/llvm-project/pull/66514 ___ cfe-commits mailin

[clang] Fix clang crash when printing highlighted code in diagnostic (after #66514) (PR #80442)

2024-02-02 Thread via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/80442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix clang crash when printing highlighted code in diagnostic (after #66514) (PR #80442)

2024-02-02 Thread via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/80442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix clang crash when printing highlighted code in diagnostic (after #66514) (PR #80442)

2024-02-02 Thread via cfe-commits
@@ -1349,7 +1349,7 @@ void TextDiagnostic::emitSnippetAndCaret( // Prepare source highlighting information for the lines we're about to // emit, starting from the first line. std::unique_ptr[]> SourceStyles = - highlightLines(BufStart, Lines.first, Lines.second, PP,

[clang] [llvm] [RISCV] Add support for RISC-V Pointer Masking (PR #79929)

2024-02-02 Thread Craig Topper via cfe-commits
@@ -797,6 +797,40 @@ def FeatureStdExtSvpbmt : SubtargetFeature<"svpbmt", "HasStdExtSvpbmt", "true", "'Svpbmt' (Page-Based Memory Types)">; +// Pointer Masking extensions + +// A supervisor-level extension that provides pointer masking for the next

[clang] Fix clang crash when printing highlighted code in diagnostic (after #66514) (PR #80442)

2024-02-02 Thread via cfe-commits
@@ -1349,7 +1349,7 @@ void TextDiagnostic::emitSnippetAndCaret( // Prepare source highlighting information for the lines we're about to // emit, starting from the first line. std::unique_ptr[]> SourceStyles = - highlightLines(BufStart, Lines.first, Lines.second, PP,

[clang] [llvm] [RISCV] Add support for RISC-V Pointer Masking (PR #79929)

2024-02-02 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw approved this pull request. https://github.com/llvm/llvm-project/pull/79929 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add support for RISC-V Pointer Masking (PR #79929)

2024-02-02 Thread Jesse Huang via cfe-commits
jaidTw wrote: > > Should you also update the riscv32-toolchain-extra.c and > > riscv64-toolchain-extra.c? > > It is not immediately obvious to me what you had in mind for changing those > tests. Could you please clarify? I found I messed up the configuration so there were some test errors on

[clang] [AMDGPU] Diagnose unaligned atomic (PR #80322)

2024-02-02 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/80322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 46b6756 - [AMDGPU] Diagnose unaligned atomic (#80322)

2024-02-02 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2024-02-02T10:41:47-05:00 New Revision: 46b6756255029f442165148115bad99d04057622 URL: https://github.com/llvm/llvm-project/commit/46b6756255029f442165148115bad99d04057622 DIFF: https://github.com/llvm/llvm-project/commit/46b6756255029f442165148115bad99d04057622.dif

[libcxx] [clang] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
@@ -567,6 +567,7 @@ TYPE_TRAIT_1(__is_unsigned, IsUnsigned, KEYCXX) // Embarcadero Binary Type Traits TYPE_TRAIT_2(__is_same, IsSame, KEYCXX) TYPE_TRAIT_2(__is_convertible, IsConvertible, KEYCXX) +TYPE_TRAIT_2(__is_nothrow_convertible, IsNothrowConvertible, KEYCXX)

[clang] Fix clang crash when printing highlighted code in diagnostic (after #66514) (PR #80442)

2024-02-02 Thread via cfe-commits
https://github.com/alexfh closed https://github.com/llvm/llvm-project/pull/80442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a986f5e - Fix clang crash when printing highlighted code in diagnostic (after #66514) (#80442)

2024-02-02 Thread via cfe-commits
Author: alexfh Date: 2024-02-02T16:31:45+01:00 New Revision: a986f5e218ab8a68097fcc1fd3234b8743839ef8 URL: https://github.com/llvm/llvm-project/commit/a986f5e218ab8a68097fcc1fd3234b8743839ef8 DIFF: https://github.com/llvm/llvm-project/commit/a986f5e218ab8a68097fcc1fd3234b8743839ef8.diff LOG: F

[clang] Fix clang crash when printing highlighted code in diagnostic (after #66514) (PR #80442)

2024-02-02 Thread via cfe-commits
@@ -1349,7 +1349,7 @@ void TextDiagnostic::emitSnippetAndCaret( // Prepare source highlighting information for the lines we're about to // emit, starting from the first line. std::unique_ptr[]> SourceStyles = - highlightLines(BufStart, Lines.first, Lines.second, PP,

<    1   2   3   4   >