[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-07 Thread Balazs Benics via cfe-commits
steakhal wrote: Let's do another round. https://github.com/llvm/llvm-project/pull/93408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Matt Arsenault via cfe-commits
@@ -47,6 +47,10 @@ static std::string convertToString(double d, unsigned Prec, unsigned Pad, return std::string(Buffer.data(), Buffer.size()); } +static bool hasNanOrInf(APFloat::Semantics S) { + return (S != APFloat::S_Float6E3M2FN) && (S != APFloat::S_Float6E2M3FN); +} -

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Matt Arsenault via cfe-commits
@@ -1881,6 +1890,20 @@ TEST(APFloatTest, getSmallest) { EXPECT_TRUE(test.isFiniteNonZero()); EXPECT_TRUE(test.isDenormal()); EXPECT_TRUE(test.bitwiseIsEqual(expected)); + + test = APFloat::getSmallest(APFloat::Float6E3M2FN(), false); + expected = APFloat(APFloat::Float6

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-07 Thread David Spickett via cfe-commits
DavidSpickett wrote: Actually, as someone pointed out, I've been conflating clang-repl with the constant expression interpreter. So the issue covers the latter and this must be something else. https://github.com/llvm/llvm-project/pull/89811 ___ cfe-c

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-07 Thread Felix Berger via cfe-commits
fberger wrote: > Thanks for looking into this. > > > So unfortunately this change won't improve > > `performance-unnecessary-value-param`. > > I can have a look at unifying both in a subsequent PR. > > Simply adding comments to the tickets in question, so the information is not > lost to time

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-07 Thread Felix Berger via cfe-commits
https://github.com/fberger approved this pull request. https://github.com/llvm/llvm-project/pull/94362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] [Flang]Fix for changed code at the end of AllocaIP. (PR #92430)

2024-06-07 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. https://github.com/llvm/llvm-project/pull/92430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Testing32 bit for https://github.com/llvm/llvm-project/pull/92083 (PR #94603)

2024-06-07 Thread David Spickett via cfe-commits
DavidSpickett wrote: Looks like this fixed things: https://lab.llvm.org/buildbot/#/builders/245/builds/25578 Thanks for working with me on this. https://github.com/llvm/llvm-project/pull/94603 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [Clang] Substitute for the type aliases inside of a CTAD guide (PR #94740)

2024-06-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/94740 >From 2f60e51f2017e4448047f64983b2f22cdb67e816 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 7 Jun 2024 18:08:10 +0800 Subject: [PATCH 1/3] [Clang] Substitute for the type aliases inside of a CTAD guide

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-06-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman Is the prototype of the implementation here at least sound? Or > should this go somewhere completely different? Maybe in one of the TSA source > files? This is a semantic concern rather than a syntactic one, so I would expect this to happen in Sema rather t

[clang] [Clang] Substitute for the type aliases inside of a CTAD guide (PR #94740)

2024-06-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/94740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Substitute for the type aliases inside of a CTAD guide (PR #94740)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes Similar to the approach of handling nested class templates when building a CTAD guide, we substitute the template parameters of a type alias declaration with the instantiating template arguments in order to

[clang] [Clang] Add timeout for GPU detection utilities (PR #94751)

2024-06-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/94751 Summary: The utilities `nvptx-arch` and `amdgpu-arch` are used to support `--offload-arch=native` among other utilities in clang. However, these rely on the GPU drivers to query the features. In certain cases thes

[clang] [Sema][CTAD] Allow user defined conversion for copy-list-initialization (PR #94752)

2024-06-07 Thread Gábor Spaits via cfe-commits
https://github.com/spaits created https://github.com/llvm/llvm-project/pull/94752 This PR would solve issue #62925. The following code: ```cpp #include int main() { std::map m1 = {std::pair{"foo", 2}, {"bar", 3}}; // guide #2 std::map m2(m1.begin(), m1.end()); // guide #1 } ``` Is rejec

[clang] [Clang] Add timeout for GPU detection utilities (PR #94751)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu @llvm/pr-subscribers-clang-driver Author: Joseph Huber (jhuber6) Changes Summary: The utilities `nvptx-arch` and `amdgpu-arch` are used to support `--offload-arch=native` among other utilities in clang. However, these rely on the GPU drive

[clang] [Sema][CTAD] Allow user defined conversion for copy-list-initialization (PR #94752)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Gábor Spaits (spaits) Changes This PR would solve issue #62925. The following code: ```cpp #include int main() { std::map m1 = {std::pair{"foo", 2}, {"bar", 3}}; // guide #2 std::map m2(m1.begin(), m1.end()); // guide #1 } ```

[clang] [Clang] Add timeout for GPU detection utilities (PR #94751)

2024-06-07 Thread Joseph Huber via cfe-commits
jhuber6 wrote: No active test because I have no clue how you would, but I intentionally made it time out and it returns a 'Child timed out` error as expected. https://github.com/llvm/llvm-project/pull/94751 ___ cfe-commits mailing list cfe-commits@lis

[clang] [Clang] Add timeout for GPU detection utilities (PR #94751)

2024-06-07 Thread Matt Arsenault via cfe-commits
@@ -205,7 +205,7 @@ class ToolChain { /// Executes the given \p Executable and returns the stdout. llvm::Expected> - executeToolChainProgram(StringRef Executable) const; + executeToolChainProgram(StringRef Executable, unsigned Timeout = 0) const; arsenm

[clang] [Sema][CTAD] Allow user defined conversion for copy-list-initialization (PR #94752)

2024-06-07 Thread Gábor Spaits via cfe-commits
https://github.com/spaits edited https://github.com/llvm/llvm-project/pull/94752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add timeout for GPU detection utilities (PR #94751)

2024-06-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/94751 >From 0e367c72a1cc163fd781f98b9fac809d90f4beb7 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 7 Jun 2024 08:15:06 -0500 Subject: [PATCH] [Clang] Add timeout for GPU detection utilities Summary: The utili

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Erich Keane via cfe-commits
erichkeane wrote: I see the 2nds commit doesn't add any tests! Please make it do so, else LGTM (plus might want to do a 'merge' commit to reset the CI to a more stable state). https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing li

[clang] [clang][CodeComplete] Omit ExplicitObject when completing code (PR #92743)

2024-06-07 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. https://github.com/llvm/llvm-project/pull/92743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Testing32 bit for https://github.com/llvm/llvm-project/pull/92083 (PR #94603)

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

[clang] [Clang] Add timeout for GPU detection utilities (PR #94751)

2024-06-07 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/94751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang] Preserve Qualifiers and type sugar in TemplateNames (PR #93433)

2024-06-07 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > so after this patch, clang seems to be crashing on: Thanks for the reproducer. Yeah this is about default argument deduction, which doesn't involve default arguments as written in source. I confirm the crash and it's indeed caused by changes in this patch. The fix is very si

[clang] 2981f3a - [Clang] Add timeout for GPU detection utilities (#94751)

2024-06-07 Thread via cfe-commits
Author: Joseph Huber Date: 2024-06-07T08:45:35-05:00 New Revision: 2981f3a284302bb12b292bcf09e7e09ae2eb696a URL: https://github.com/llvm/llvm-project/commit/2981f3a284302bb12b292bcf09e7e09ae2eb696a DIFF: https://github.com/llvm/llvm-project/commit/2981f3a284302bb12b292bcf09e7e09ae2eb696a.diff

[clang] [Clang] Add timeout for GPU detection utilities (PR #94751)

2024-06-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/94751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Durgadoss R via cfe-commits
https://github.com/durga4github updated https://github.com/llvm/llvm-project/pull/94735 >From 44b05720e7abe2344925158f7b76904990155500 Mon Sep 17 00:00:00 2001 From: Durgadoss R Date: Wed, 5 Jun 2024 19:22:31 +0530 Subject: [PATCH] [APFloat] Add APFloat support for FP6 data types This patch ad

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Durgadoss R via cfe-commits
@@ -47,6 +47,10 @@ static std::string convertToString(double d, unsigned Prec, unsigned Pad, return std::string(Buffer.data(), Buffer.size()); } +static bool hasNanOrInf(APFloat::Semantics S) { + return (S != APFloat::S_Float6E3M2FN) && (S != APFloat::S_Float6E2M3FN); +} -

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Durgadoss R via cfe-commits
@@ -1881,6 +1890,20 @@ TEST(APFloatTest, getSmallest) { EXPECT_TRUE(test.isFiniteNonZero()); EXPECT_TRUE(test.isDenormal()); EXPECT_TRUE(test.bitwiseIsEqual(expected)); + + test = APFloat::getSmallest(APFloat::Float6E3M2FN(), false); + expected = APFloat(APFloat::Float6

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Durgadoss R via cfe-commits
https://github.com/durga4github updated https://github.com/llvm/llvm-project/pull/94735 >From 3fd700cb6cf349218558ad8caae081629e01d986 Mon Sep 17 00:00:00 2001 From: Durgadoss R Date: Wed, 5 Jun 2024 19:22:31 +0530 Subject: [PATCH] [APFloat] Add APFloat support for FP6 data types This patch ad

[clang] [clang] always use resolved arguments for default argument deduction (PR #94756)

2024-06-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/94756 This fixes a regression introduced with the changes in https://github.com/llvm/llvm-project/pull/93433 around preservation of TemplateName sugar in template type deduction. Since the argument side TST is non-c

[clang] [clang] always use resolved arguments for default argument deduction (PR #94756)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This fixes a regression introduced with the changes in https://github.com/llvm/llvm-project/pull/93433 around preservation of TemplateName sugar in template type deduction. Since the argument side TST i

[clang] [clang] always use resolved arguments for default argument deduction (PR #94756)

2024-06-07 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @kadircet @yozhu FYI this fixes the problem you reported. https://github.com/llvm/llvm-project/pull/94756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] always use resolved arguments for default argument deduction (PR #94756)

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

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Matt Arsenault via cfe-commits
@@ -878,6 +896,10 @@ void IEEEFloat::copySignificand(const IEEEFloat &rhs) { for the significand. If double or longer, this is a signalling NaN, which may not be ideal. If float, this is QNaN(0). */ void IEEEFloat::makeNaN(bool SNaN, bool Negative, const APInt *fill) {

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-07 Thread Balázs Kéri via cfe-commits
@@ -0,0 +1,443 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -triple x86_64-linux-gnu \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator-for-simple-stream.h"

[clang] [Clang][Sema] qualifier should be transformed (PR #94725)

2024-06-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/94725 >From 2977f65d503c2a96247705ce50157870aaefa003 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Fri, 7 Jun 2024 14:04:52 +0800 Subject: [PATCH] [Clang][Sema] qualifier should be transformed --- clang/docs/ReleaseNot

[clang] [Clang][Sema] qualifier should be transformed (PR #94725)

2024-06-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/94725 >From a1754c56a3293cd6529244f9a0f7486f4912e18d Mon Sep 17 00:00:00 2001 From: huqizhi Date: Fri, 7 Jun 2024 14:04:52 +0800 Subject: [PATCH] [Clang][Sema] qualifier should be transformed --- clang/docs/ReleaseNot

[clang] [Clang][Sema] qualifier should be transformed (PR #94725)

2024-06-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/94725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] qualifier should be transformed (PR #94725)

2024-06-07 Thread Qizhi Hu via cfe-commits
jcsxky wrote: crash on trunk assertion. https://github.com/llvm/llvm-project/pull/94725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

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

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-06-07 Thread Matheus Izvekov via cfe-commits
@@ -2923,10 +2920,9 @@ class TreeTransform { } return getSema().BuildMemberReferenceExpr(Base, BaseType, OpLoc, isArrow, - SS, TemplateKWLoc, - FirstQualifierInScope, -

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-06-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM save a few minor cleanups needed. I think this patch has an incredible amount of noise due to amount of cosmetic changes caused by reformatting, specially due to changing parameters and such. This is fine for now and I am not suggest

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-06-07 Thread Matheus Izvekov via cfe-commits
@@ -548,6 +575,7 @@ bool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, // Perform unqualified name lookup in the current scope. LookupName(Found, S); } +#endif mizvekov wrote: A left-over. https://github.com/llvm/llvm-proj

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-06-07 Thread Matheus Izvekov via cfe-commits
@@ -390,29 +390,37 @@ bool Sema::isAcceptableNestedNameSpecifier(const NamedDecl *SD, /// (e.g., Base::), perform name lookup for that identifier as a /// nested-name-specifier within the given scope, and return the result of that /// name lookup. -NamedDecl *Sema::FindFirstQu

[clang] [clang] always use resolved arguments for default argument deduction (PR #94756)

2024-06-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Jakub Kuderski via cfe-commits
@@ -878,6 +896,10 @@ void IEEEFloat::copySignificand(const IEEEFloat &rhs) { for the significand. If double or longer, this is a signalling NaN, which may not be ideal. If float, this is QNaN(0). */ void IEEEFloat::makeNaN(bool SNaN, bool Negative, const APInt *fill) {

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Jakub Kuderski via cfe-commits
@@ -68,6 +68,10 @@ enum class fltNonfiniteBehavior { // `fltNanEncoding` enum. We treat all NaNs as quiet, as the available // encodings do not distinguish between signalling and quiet NaN. NanOnly, + + // This behavior is present in Float6E3M2FN and Float6E2M3FN types.

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Jakub Kuderski via cfe-commits
@@ -1499,16 +1521,18 @@ static void tcSetLeastSignificantBits(APInt::WordType *dst, unsigned parts, /* Handle overflow. Sign is preserved. We either become infinity or the largest finite number. */ IEEEFloat::opStatus IEEEFloat::handleOverflow(roundingMode rounding_mode)

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-07 Thread Balázs Kéri via cfe-commits
@@ -0,0 +1,443 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -triple x86_64-linux-gnu \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator-for-simple-stream.h"

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Matt Arsenault via cfe-commits
@@ -68,6 +68,10 @@ enum class fltNonfiniteBehavior { // `fltNanEncoding` enum. We treat all NaNs as quiet, as the available // encodings do not distinguish between signalling and quiet NaN. NanOnly, + + // This behavior is present in Float6E3M2FN and Float6E2M3FN types.

[clang] [Clang][Sema] qualifier should be transformed (PR #94725)

2024-06-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky ready_for_review https://github.com/llvm/llvm-project/pull/94725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-06-07 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/79667 >From 4f1ce895254dd9505150c1f5f5cb77454b9aca68 Mon Sep 17 00:00:00 2001 From: cqwrteur <100043421+trcrsi...@users.noreply.github.com> Date: Sat, 1 Jun 2024 02:55:50 -0400 Subject: [PATCH] [libunwind][libcxx][lib

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Jonas Devlieghere via cfe-commits
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/94208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Jonas Devlieghere via cfe-commits
https://github.com/JDevlieghere approved this pull request. https://github.com/llvm/llvm-project/pull/94208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Jonas Devlieghere via cfe-commits
@@ -72,7 +72,7 @@ class PrintFunctionsConsumer : public ASTConsumer { *sema.LateParsedTemplateMap.find(FD)->second; sema.LateTemplateParser(sema.OpaqueParser, LPT); llvm::errs() << "late-parsed-decl: \"" << FD->getNameAsString() << "\"\n"; -} +

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #94664)

2024-06-07 Thread Andrew Ng via cfe-commits
nga888 wrote: > > I did briefly think about this, but does this change really apply to > > `GetOrCreateLLVMGlobal`? Is there any test case to exercise it? Perhaps it > > would be better to leave `GetOrCreateLLVMGlobal` as is? > > I think we should look at it the other way around: unless there'

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-07 Thread via cfe-commits
@@ -10,6 +10,7 @@ void h() { SEL* ps = &s; @selector(dealloc) = s; // expected-error {{expression is not assignable}} + // expected-note@-1 {{add '*' to dereference it}} Sirraide wrote: AST visitors are rather heavy atm so I’d rather not do that... I th

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #94664)

2024-06-07 Thread via cfe-commits
zmodem wrote: > One function handles "functions" and the other "globals", so behaviour is not > necessarily the same. However, if you feel it would be better that both use > the same logic, then I will go ahead with adding this. Yes, I think that since the dll attribute logic has been the same

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Thomas Raoux via cfe-commits
https://github.com/ThomasRaoux commented: Looks good to me once the other comments are addressed. Thanks for the patch. https://github.com/llvm/llvm-project/pull/94735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-07 Thread Philip Reames via cfe-commits
https://github.com/preames requested changes to this pull request. https://github.com/llvm/llvm-project/pull/94564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-07 Thread Philip Reames via cfe-commits
https://github.com/preames edited https://github.com/llvm/llvm-project/pull/94564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-07 Thread Philip Reames via cfe-commits
@@ -381,3 +381,20 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion, TuneShiftedZExtWFusion]>; + +

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-07 Thread Philip Reames via cfe-commits
@@ -381,3 +381,20 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion, TuneShiftedZExtWFusion]>; + +

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-06-07 Thread Yaxun Liu via cfe-commits
@@ -9013,6 +9013,12 @@ def err_cuda_ovl_target : Error< "cannot overload %select{__device__|__global__|__host__|__host__ __device__}2 function %3">; def note_cuda_ovl_candidate_target_mismatch : Note< "candidate template ignored: target attributes do not match">; +def wa

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-07 Thread via cfe-commits
https://github.com/Sirraide commented: This is already looking better. (Also, for the record, this is just a me thing and not official policy or anything, but I’d find it easier if you didn’t force-push because then I’d have an easier time telling what’s changed in recent commits; everything i

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-07 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/94159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-07 Thread via cfe-commits
@@ -13367,6 +13367,20 @@ static void DiagnoseConstAssignment(Sema &S, const Expr *E, if (!DiagnosticEmitted) { S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstVariable << VD << VD->getType(); + ExprResult Deref; +

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 commented: I have no issues with the code as written but I'm rather confused by how it will be used What's the motivation for this PR? Will anyone be trying to constant-fold these things? (If it's for MLIR support, I'd like to have a discussion there, since I don't

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Krzysztof Drewniak via cfe-commits
@@ -139,6 +143,10 @@ static constexpr fltSemantics semFloat8E4M3FNUZ = { static constexpr fltSemantics semFloat8E4M3B11FNUZ = { 4, -10, 4, 8, fltNonfiniteBehavior::NanOnly, fltNanEncoding::NegativeZero}; static constexpr fltSemantics semFloatTF32 = {127, -126, 11, 19}; +sta

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 edited https://github.com/llvm/llvm-project/pull/94735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Vlad Serebrennikov via cfe-commits
@@ -72,7 +72,7 @@ class PrintFunctionsConsumer : public ASTConsumer { *sema.LateParsedTemplateMap.find(FD)->second; sema.LateTemplateParser(sema.OpaqueParser, LPT); llvm::errs() << "late-parsed-decl: \"" << FD->getNameAsString() << "\"\n"; -} +

[clang] [clang][CodeGen] Return RValue from `EmitVAArg` (PR #94635)

2024-06-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -1328,15 +1328,15 @@ void AggExprEmitter::VisitChooseExpr(const ChooseExpr *CE) { void AggExprEmitter::VisitVAArgExpr(VAArgExpr *VE) { Address ArgValue = Address::invalid(); - Address ArgPtr = CGF.EmitVAArg(VE, ArgValue); + RValue ArgPtr = CGF.EmitVAArg(VE, ArgValue);

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-07 Thread Rajveer Singh Bharadwaj via cfe-commits
@@ -10,6 +10,7 @@ void h() { SEL* ps = &s; @selector(dealloc) = s; // expected-error {{expression is not assignable}} + // expected-note@-1 {{add '*' to dereference it}} Rajveer100 wrote: Actually, it isn't valid in case of `@selector`, that's why I was

[clang] [clang][CodeGen] Return RValue from `EmitVAArg` (PR #94635)

2024-06-07 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > I was hoping that you might push this down into the target code — if you make > emitVoidPtrVAArg return an RValue, that'll handle about half of the targets. > Most of the rest will just need an EmitLoadOfLValue at the end Ok, that seems doable, but I'm having trouble with `E

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-07 Thread Rajveer Singh Bharadwaj via cfe-commits
@@ -13367,6 +13367,20 @@ static void DiagnoseConstAssignment(Sema &S, const Expr *E, if (!DiagnosticEmitted) { S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstVariable << VD << VD->getType(); + ExprResult Deref; +

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-07 Thread via cfe-commits
@@ -10,6 +10,7 @@ void h() { SEL* ps = &s; @selector(dealloc) = s; // expected-error {{expression is not assignable}} + // expected-note@-1 {{add '*' to dereference it}} Sirraide wrote: Yeah, again, I unfortunately won’t be of much help with this issue

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-07 Thread Krzysztof Drewniak via cfe-commits
krzysz00 wrote: Actually, even ignoring address space 7, it feels like these builtins if you could `raw.ptr.buffer.store` any type you liked, and then they could be type-varying in Clang? https://github.com/llvm/llvm-project/pull/94576 ___ cfe-commit

[clang] [clang] Add fixit for using declaration with a (qualified) namespace (PR #94762)

2024-06-07 Thread Nico Weber via cfe-commits
https://github.com/nico created https://github.com/llvm/llvm-project/pull/94762 For `using std::literals`, we now output: error: using declaration cannot refer to a namespace 4 | using std::literals; | ~^ note: did you mean 'using namespace'? 4 |

[clang] [clang] Add fixit for using declaration with a (qualified) namespace (PR #94762)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nico Weber (nico) Changes For `using std::literals`, we now output: error: using declaration cannot refer to a namespace 4 | using std::literals; | ~^ note: did you mean 'using namespace'? 4

[clang] [clang] Add fixit for using declaration with a (qualified) namespace (PR #94762)

2024-06-07 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 fc95645e37f244c2fc155f1ee51047f90329e8c1 2cbc9f7e066066ffb04480be6bd7e19855086b80 --

[clang] [flang] [llvm] [mlir] [Flang]Fix for changed code at the end of AllocaIP. (PR #92430)

2024-06-07 Thread Mats Petersson via cfe-commits
Leporacanthicus wrote: @ergawy Could you take a look at this, given that you did something similar [even if it was much smaller] recently? https://github.com/llvm/llvm-project/pull/92430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-07 Thread Matt Arsenault via cfe-commits
arsenm wrote: > Actually, even ignoring address space 7, it feels like these builtins if you > could `raw.ptr.buffer.store` any type you liked, and then they could be > type-varying in Clang? We could either have a builtin for all the types that would work, or if we want to treat them more li

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-07 Thread Krzysztof Drewniak via cfe-commits
krzysz00 wrote: 1. For the swizzled case, that's `struct.ptr.buffer.*`, and yeah, those will always need builtins because LLVM can't deal in 2D addressing schemes 2. What I mean is that "types that work" isn't the right framing: any type can be legalized to one or more types that work. That is,

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-07 Thread Matt Arsenault via cfe-commits
arsenm wrote: > 1. For the swizzled case, that's `struct.ptr.buffer.*`, and yeah, those will > always need builtins because LLVM can't deal in 2D addressing schemes But the raw buffer intrinsics have both the soffset and voffset parameters though? Not just the struct https://github.com/llv

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-07 Thread Matt Arsenault via cfe-commits
arsenm wrote: > 2. What I mean is that "types that work" isn't the right framing: any type > can be legalized to one or more types that work. That is, down in the isel > legalizer, if I call for, for example >```llvm >%0 = call {i64, i64, i8} @llvm.amdgcn.raw.buffer.ptr.load(ptr addrspa

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-07 Thread Jan Leyonberg via cfe-commits
https://github.com/jsjodin created https://github.com/llvm/llvm-project/pull/94763 This patch enables the -mlink-builtin-bitcode flag in fc1 so that bitcode libraries can be linked in. This is needed for OpenMP offloading libraries. >From adfeb69ba312e971cb4eae71f185f38b1cac9b8f Mon Sep 17 00:

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver @llvm/pr-subscribers-clang Author: Jan Leyonberg (jsjodin) Changes This patch enables the -mlink-builtin-bitcode flag in fc1 so that bitcode libraries can be linked in. This is needed for OpenMP offloading libraries. --- Full diff: https:/

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-07 Thread Rajveer Singh Bharadwaj via cfe-commits
@@ -13367,6 +13367,21 @@ static void DiagnoseConstAssignment(Sema &S, const Expr *E, if (!DiagnosticEmitted) { S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstVariable << VD << VD->getType(); + ExprResult Deref; +

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-07 Thread via cfe-commits
@@ -13367,6 +13367,21 @@ static void DiagnoseConstAssignment(Sema &S, const Expr *E, if (!DiagnosticEmitted) { S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstVariable << VD << VD->getType(); + ExprResult Deref; +

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-07 Thread Krzysztof Drewniak via cfe-commits
krzysz00 wrote: `voffset` and `soffset` are "offset that goes in VGPRs" and "offset that goes in SGPRs", with the latter having some different bounds-checking semantics on ... at least some of the gfx9's, IIRC. The address space 7 lowering just uses voffset. Re arbitrary aggregates: LLPC has

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-07 Thread Krzysztof Drewniak via cfe-commits
krzysz00 wrote: `raw.ptr.buffer.load` (and `.store`) are loads and stores and should be able to deal with any type you could send through a normal pointer (especially since a partially-OOB read is already hardware-level UB, so extending that through the intrinsics is reasonable) `struct.ptr.*

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-07 Thread Matt Arsenault via cfe-commits
arsenm wrote: > `voffset` and `soffset` are "offset that goes in VGPRs" and "offset that goes > in SGPRs", with the latter having some different bounds-checking semantics on > ... at least some of the gfx9's, IIRC. > Right, that's the problem. We need to know the parameters of the SRD in orde

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-07 Thread Matt Arsenault via cfe-commits
arsenm wrote: > "aggregates" here might even be unusual cases like `<4 x i8>` Vectors aren't aggregates and are more reasonable https://github.com/llvm/llvm-project/pull/94576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-07 Thread Rajveer Singh Bharadwaj via cfe-commits
@@ -10,6 +10,7 @@ void h() { SEL* ps = &s; @selector(dealloc) = s; // expected-error {{expression is not assignable}} + // expected-note@-1 {{add '*' to dereference it}} Rajveer100 wrote: I see a way to handle this: `E->getType()->isSpecificBuiltinType

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-07 Thread via cfe-commits
@@ -10,6 +10,7 @@ void h() { SEL* ps = &s; @selector(dealloc) = s; // expected-error {{expression is not assignable}} + // expected-note@-1 {{add '*' to dereference it}} Sirraide wrote: > we could be checking for a compound expression here for `E`. Er,

[clang] [clang] Add fixit for using declaration with a (qualified) namespace (PR #94762)

2024-06-07 Thread via cfe-commits
@@ -13080,6 +13080,9 @@ NamedDecl *Sema::BuildUsingDeclaration( if (R.getAsSingle()) { Diag(IdentLoc, diag::err_using_decl_can_not_refer_to_namespace) << SS.getRange(); +// Suggest using 'using namespace ...' instead. +Diag(SS.getBeginLoc(), diag::note_names

[clang] [clang] Add fixit for using declaration with a (qualified) namespace (PR #94762)

2024-06-07 Thread via cfe-commits
https://github.com/zmodem approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/94762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add fixit for using declaration with a (qualified) namespace (PR #94762)

2024-06-07 Thread via cfe-commits
https://github.com/zmodem edited https://github.com/llvm/llvm-project/pull/94762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >