[clang] [Clang] Allow all address spaces to be converted to the default (PR #112248)

2024-10-15 Thread Matt Arsenault via cfe-commits
arsenm wrote: > They should not "just work" if you're compiling for vanilla C/C++ (so not > CUDA C++, or SYCL, or OpenCL C/C++ etc.) because neither of those defines > such a notion. a6a237f2046ad8993db30481c8b61aeb2f73a5ad added an explicit addrspace_cast operator. It would be better to use

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread via cfe-commits
@@ -215,8 +215,7 @@ static void addVisualCDefines(const LangOptions &Opts, MacroBuilder &Builder) { if (Opts.isCompatibleWithMSVC(LangOptions::MSVC2015)) { if (Opts.CPlusPlus23) -// TODO update to the proper value. -Builder.defineMacro("_MSVC_LANG",

[clang] [Clang] Allow all address spaces to be converted to the default (PR #112248)

2024-10-15 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > They should not "just work" if you're compiling for vanilla C/C++ (so not > > CUDA C++, or SYCL, or OpenCL C/C++ etc.) because neither of those defines > > such a notion. > > [a6a237f](https://github.com/llvm/llvm-project/commit/a6a237f2046ad8993db30481c8b61aeb2f73a5ad) > a

[clang] [clang][bytecode] Diagnose reference to non-constexpr variable of const type in C23 constexpr (PR #112211)

2024-10-15 Thread Timm Baeder via cfe-commits
tbaederr wrote: Yup, you can ignore that failure https://github.com/llvm/llvm-project/pull/112211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
@@ -302,27 +312,38 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) { if (const Decl *FD = CE->getCalleeDecl()) { if (ShouldSuppress) return; - if (FD->hasAttr()) { + if (const auto *A = FD->getAttr()) { Diag(Loc, diag

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
https://github.com/Mick235711 edited https://github.com/llvm/llvm-project/pull/112289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8079a2c - [clang][bytecode] Diagnose reference to non-constexpr variable of const type in C23 constexpr (#112211)

2024-10-15 Thread via cfe-commits
Author: yronglin Date: 2024-10-16T00:11:12+08:00 New Revision: 8079a2c57862115f7fe4dbe72f07cf944a7f6aed URL: https://github.com/llvm/llvm-project/commit/8079a2c57862115f7fe4dbe72f07cf944a7f6aed DIFF: https://github.com/llvm/llvm-project/commit/8079a2c57862115f7fe4dbe72f07cf944a7f6aed.diff LOG:

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread Andrew Sukach via cfe-commits
https://github.com/sookach updated https://github.com/llvm/llvm-project/pull/112111 >From 59537c2005e30d2ac8410822cb2804c63f2ae73b Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Sat, 12 Oct 2024 19:47:30 -0400 Subject: [PATCH] [clang] Check for null TypeSourceInfo in Sema::CreateUnaryExprO

[clang] [clang][bytecode] Diagnose reference to non-constexpr variable of const type in C23 constexpr (PR #112211)

2024-10-15 Thread via cfe-commits
https://github.com/yronglin closed https://github.com/llvm/llvm-project/pull/112211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-10-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/111499 >From 4951a7b9b87f9800bc3629bd44f65141ba98c6b0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 8 Oct 2024 08:19:56 + Subject: [PATCH 1/9] start working on lifetime capture --- clang/include/clang/Ba

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread via cfe-commits
@@ -683,6 +683,9 @@ New features Crash and bug fixes ^^^ +- Check for a null ``TypeSourceInfo *`` when creating a ``UnaryExprOrTypeTraitExpr``. + Fixes (#GH111594) + Sirraide wrote: The release note is in the wrong place; I’m pretty sure thi

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +a() {struct b c (sizeof(b * [({ {tree->d* next)} 0 + +// expected-error@3 {{a type specifier is required for all declarations}} +// expected-error@3 {{use of undeclared identifier 'tree'; did you mean 'true'?}} +//

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread Younan Zhang via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +a() {struct b c (sizeof(b * [({ {tree->d* next)} 0 + +// expected-error@3 {{a type specifier is required for all declarations}} +// expected-error@3 {{use of undeclared identifier 'tree'; did you mean 'true'?}} +//

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +a() {struct b c (sizeof(b * [({ {tree->d* next)} 0 + +// expected-error@3 {{a type specifier is required for all declarations}} +// expected-error@3 {{use of undeclared identifier 'tree'; did you mean 'true'?}} +//

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -9290,6 +9290,8 @@ def warn_unused_result_typedef_unsupported_spelling : Warning< def warn_unused_volatile : Warning< "expression result unused; assign into a variable to force a volatile load">, InGroup>; +def note_nodiscard_specified_here : Note< eric

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -290,9 +297,12 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) { if (E->getType()->isVoidType()) return; -if (DiagnoseNoDiscard(*this, cast_or_null( - CE->getUnusedResultAttr(Context)), -

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -204,23 +205,29 @@ static bool DiagnoseUnusedComparison(Sema &S, const Expr *E) { return true; } -static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, - SourceLocation Loc, SourceRange R1, - Sourc

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -302,27 +312,38 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) { if (const Decl *FD = CE->getCalleeDecl()) { if (ShouldSuppress) return; - if (FD->hasAttr()) { + if (const auto *A = FD->getAttr()) { Diag(Loc, diag

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread via cfe-commits
https://github.com/zmodem created https://github.com/llvm/llvm-project/pull/112378 As discussed in https://discourse.llvm.org/t/clang-cl-adding-std-c-23preview/82553 >From f44ba22a8e5232b3f1e4a680565acd5604a7016c Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 15 Oct 2024 17:18:45 +02

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -204,23 +205,29 @@ static bool DiagnoseUnusedComparison(Sema &S, const Expr *E) { return true; } -static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, - SourceLocation Loc, SourceRange R1, - Sourc

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-platform-windows Author: Hans (zmodem) Changes As discussed in https://discourse.llvm.org/t/clang-cl-adding-std-c-23preview/82553 --- Full diff: https://github.com/llvm/llvm-project/pull/112378.diff 5 Files Affected: - (modified) clang/include/clang

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Hans (zmodem) Changes As discussed in https://discourse.llvm.org/t/clang-cl-adding-std-c-23preview/82553 --- Full diff: https://github.com/llvm/llvm-project/pull/112378.diff 5 Files Affected: - (modified) clang/include/clang/Dri

[clang] [Modules][NFC] Rewrite friend-definition-2.cpp with split-file (PR #112380)

2024-10-15 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/112380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules][NFC] Rewrite friend-definition-2.cpp with split-file (PR #112380)

2024-10-15 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin edited https://github.com/llvm/llvm-project/pull/112380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules][NFC] Rewrite friend-definition-2.cpp with split-file (PR #112380)

2024-10-15 Thread Dmitry Polukhin via cfe-commits
@@ -1,32 +1,53 @@ -// RUN: %clang_cc1 -std=c++14 -fmodules %s -verify -// RUN: %clang_cc1 -std=c++14 -fmodules %s -verify -triple i686-windows -// expected-no-diagnostics -#pragma clang module build A -module A {} -#pragma clang module contents -#pragma clang module begin A +// RU

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -1,19 +1,21 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple spirv-vulkan-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=CHECK-SPIRV

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -489,3 +494,100 @@ void CGHLSLRuntime::generateGlobalCtorDtorCalls() { GV->eraseFromParent(); } } + +// Returns handle type of a resource, if the type is a resource +// or an array of resources +static const HLSLAttributedResourceType *findHandleTypeOnResource(QualTy

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -489,3 +494,100 @@ void CGHLSLRuntime::generateGlobalCtorDtorCalls() { GV->eraseFromParent(); } } + +// Returns handle type of a resource, if the type is a resource +// or an array of resources +static const HLSLAttributedResourceType *findHandleTypeOnResource(QualTy

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -489,3 +494,100 @@ void CGHLSLRuntime::generateGlobalCtorDtorCalls() { GV->eraseFromParent(); } } + +// Returns handle type of a resource, if the type is a resource +// or an array of resources +static const HLSLAttributedResourceType *findHandleTypeOnResource(QualTy

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -489,3 +494,100 @@ void CGHLSLRuntime::generateGlobalCtorDtorCalls() { GV->eraseFromParent(); } } + +// Returns handle type of a resource, if the type is a resource +// or an array of resources +static const HLSLAttributedResourceType *findHandleTypeOnResource(QualTy

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +a() {struct b c (sizeof(b * [({ {tree->d* next)} 0 + +// expected-error@3 {{a type specifier is required for all declarations}} +// expected-error@3 {{use of undeclared identifier 'tree'; did you mean 'true'?}} +//

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-15 Thread Justin Bogner via cfe-commits
@@ -489,3 +494,100 @@ void CGHLSLRuntime::generateGlobalCtorDtorCalls() { GV->eraseFromParent(); } } + +// Returns handle type of a resource, if the type is a resource +// or an array of resources +static const HLSLAttributedResourceType *findHandleTypeOnResource(QualTy

[clang] [llvm] [AArch64] Introduce new armv9.6 features (PR #111677)

2024-10-15 Thread via cfe-commits
@@ -6,14 +6,50 @@ // RUN: %clang -target aarch64 -mlittle-endian -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s // RUN: %clang -target aarch64_be -mlittle-endian -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s // RUN: %clang

[clang] [llvm] [AArch64] Introduce new armv9.6 features (PR #111677)

2024-10-15 Thread via cfe-commits
@@ -6,14 +6,50 @@ // RUN: %clang -target aarch64 -mlittle-endian -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s // RUN: %clang -target aarch64_be -mlittle-endian -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s // RUN: %clang

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-15 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/108570 >From e1b5e886f3f7642ec691a08378a1f2cdc9e2465f Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 11 Sep 2024 14:56:58 -0400 Subject: [PATCH 1/7] Initial commit. --- clang/test/CodeGen/attr-function-return

[clang] [clang] Catch missing format attributes (PR #105479)

2024-10-15 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovichtec updated https://github.com/llvm/llvm-project/pull/105479 From 64de3137692ffb7d473fb1d8f68f4b87fb553fa2 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribute

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
erichkeane wrote: > Hmm, I can’t really think of a situation when this note would actually > help... at least for `deprecated`, you could _maybe_ argue that you might > want to know what part of the codebase marked it as deprecated in case there > are multiple declarations, but for `nodiscard`

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-15 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/91101 >From 98dd7c653c3b15987d8dbc516c30ea1c6cae6593 Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Sat, 4 May 2024 18:12:34 -0500 Subject: [PATCH 1/3] [Inliner] Add tests for propagating more parameter attrib

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-15 Thread Qiongsi Wu via cfe-commits
@@ -0,0 +1,129 @@ +; Tests if the __llvm_gcov_ctr section contains a .ref pseudo-op +; referring to the __llvm_covinit section. +; RUN: llc < %s | FileCheck --check-prefixes=CHECK,CHECK-RW %s +; RUN: llc -mxcoff-roptr < %s | FileCheck --check-prefixes=CHECK,CHECK-RO %s + +target d

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-15 Thread Qiongsi Wu via cfe-commits
@@ -0,0 +1,129 @@ +; Tests if the __llvm_gcov_ctr section contains a .ref pseudo-op +; referring to the __llvm_covinit section. +; RUN: llc < %s | FileCheck --check-prefixes=CHECK,CHECK-RW %s +; RUN: llc -mxcoff-roptr < %s | FileCheck --check-prefixes=CHECK,CHECK-RO %s + +target d

[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

2024-10-15 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/97277 >From edf2f6c977d06627f7a752a0128ffcb04c082c38 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Mon, 24 Jun 2024 09:59:24 + Subject: [PATCH 1/3] [CLANG][AArch64] Add the modal 8 bit floating-p

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
@@ -204,23 +205,29 @@ static bool DiagnoseUnusedComparison(Sema &S, const Expr *E) { return true; } -static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, - SourceLocation Loc, SourceRange R1, - Sourc

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -204,23 +205,29 @@ static bool DiagnoseUnusedComparison(Sema &S, const Expr *E) { return true; } -static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, - SourceLocation Loc, SourceRange R1, - Sourc

[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

2024-10-15 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/97277 >From edf2f6c977d06627f7a752a0128ffcb04c082c38 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Mon, 24 Jun 2024 09:59:24 + Subject: [PATCH 1/4] [CLANG][AArch64] Add the modal 8 bit floating-p

[clang] [Clang][Sema] Use the correct injected template arguments for partial specializations when collecting multi-level template argument lists (PR #112381)

2024-10-15 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Change itself seems reasonable, so approve, pending a good couple of tests. https://github.com/llvm/llvm-project/pull/112381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -9290,6 +9290,8 @@ def warn_unused_result_typedef_unsupported_spelling : Warning< def warn_unused_volatile : Warning< "expression result unused; assign into a variable to force a volatile load">, InGroup>; +def note_nodiscard_specified_here : Note< eric

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
@@ -290,9 +297,12 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) { if (E->getType()->isVoidType()) return; -if (DiagnoseNoDiscard(*this, cast_or_null( - CE->getUnusedResultAttr(Context)), -

[clang] [compiler-rt] [lld] [llvm] [Coverage][WebAssembly] Add initial support for WebAssembly/WASI (PR #111332)

2024-10-15 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `bolt-aarch64-ubuntu-clang-shared` running on `bolt-worker-aarch64` while building `clang,compiler-rt,lld,llvm` at step 8 "test-build-bolt-check-bolt". Full details are available at: https://lab.llvm.org/buildbot/#/builders/12

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
@@ -204,23 +205,29 @@ static bool DiagnoseUnusedComparison(Sema &S, const Expr *E) { return true; } -static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, - SourceLocation Loc, SourceRange R1, - Sourc

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
@@ -9290,6 +9290,8 @@ def warn_unused_result_typedef_unsupported_spelling : Warning< def warn_unused_volatile : Warning< "expression result unused; assign into a variable to force a volatile load">, InGroup>; +def note_nodiscard_specified_here : Note< Mick

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -204,23 +205,29 @@ static bool DiagnoseUnusedComparison(Sema &S, const Expr *E) { return true; } -static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, - SourceLocation Loc, SourceRange R1, - Sourc

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
Mick235711 wrote: > That is, keep the current wording if the function is nodiscard, but change it > to mention the type instead if the type is marked nodiscard—provided there is > a relatively straight-forward way of doing this. I think this should be okay-ish to implement since we basically a

[clang] [clang][bytecode] Diagnose reference to non-constexpr variable of const type in C23 constexpr (PR #112211)

2024-10-15 Thread via cfe-commits
yronglin wrote: Thanks for the review! IIUC, seems the failed test `Clang :: Driver/hip-partial-link.hip (10952 of 21294)` was not caused by this PR. It's looks strange. https://github.com/llvm/llvm-project/pull/112211 ___ cfe-commits mailing list cf

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread via cfe-commits
zmodem wrote: With STL's test program from the thread on Discourse, this outputs: ``` C:\src\llvm-project>build\bin\clang-cl /EHsc /nologo /W4 /std:c++23preview meow.cpp && meow Clang; __cplusplus: 202302; _MSVC_LANG: 202302; detected C++23 ``` https://github.com/llvm/llvm-project/pull/112378

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
@@ -204,23 +205,29 @@ static bool DiagnoseUnusedComparison(Sema &S, const Expr *E) { return true; } -static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, - SourceLocation Loc, SourceRange R1, - Sourc

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread Aaron Ballman via cfe-commits
@@ -215,8 +215,7 @@ static void addVisualCDefines(const LangOptions &Opts, MacroBuilder &Builder) { if (Opts.isCompatibleWithMSVC(LangOptions::MSVC2015)) { if (Opts.CPlusPlus23) -// TODO update to the proper value. -Builder.defineMacro("_MSVC_LANG",

[clang] [llvm] [HLSL] Implement `WaveActiveSum` intrinsic (PR #112400)

2024-10-15 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/112400 - add clang builtin to Builtins.td - link builtin in hlsl_intrinsics - add codegen for spirv intrinsic and two directx intrinsics to retain signedness information of the operands in CGBuiltin.cpp

[clang] [llvm] [AArch64] Introduce new armv9.6 features (PR #111677)

2024-10-15 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. https://github.com/llvm/llvm-project/pull/111677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement `WaveActiveSum` intrinsic (PR #112400)

2024-10-15 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/112400 >From c541955941a11b57efc624b87f50ce61f1b4c26a Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 11 Oct 2024 15:06:15 -0700 Subject: [PATCH] [HLSL] Implement `WaveActiveSum` intrinsic - add clang built

[clang] [CLANG]Add Scalable vectors for mfloat8_t (PR #101644)

2024-10-15 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/101644 >From 7134302c7e1054021af36a207dbfd0c40c9e8c51 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Fri, 2 Aug 2024 08:47:18 + Subject: [PATCH 1/3] [CLANG]Add Scalable vectors for mfloat8_t This

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -9290,6 +9290,8 @@ def warn_unused_result_typedef_unsupported_spelling : Warning< def warn_unused_volatile : Warning< "expression result unused; assign into a variable to force a volatile load">, InGroup>; +def note_nodiscard_specified_here : Note< eric

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -204,23 +205,26 @@ static bool DiagnoseUnusedComparison(Sema &S, const Expr *E) { return true; } -static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, - SourceLocation Loc, SourceRange R1, - Sourc

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

2024-10-15 Thread Julian Schmidt via cfe-commits
5chmidti wrote: > I have read the issues in detail and it doesn't look like it has been > resolved? But just want to filter out the content not interested in, even if > you don't use `exclude-header-filter` The output is the same as above,It will > not expand the contents(`Supppressed 3386 war

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -302,27 +307,43 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) { if (const Decl *FD = CE->getCalleeDecl()) { if (ShouldSuppress) return; - if (FD->hasAttr()) { -Diag(Loc, diag::warn_unused_call) << R1 << R2 << "pure"; -

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread Casey Carter via cfe-commits
@@ -215,8 +215,7 @@ static void addVisualCDefines(const LangOptions &Opts, MacroBuilder &Builder) { if (Opts.isCompatibleWithMSVC(LangOptions::MSVC2015)) { if (Opts.CPlusPlus23) -// TODO update to the proper value. -Builder.defineMacro("_MSVC_LANG",

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread Casey Carter via cfe-commits
https://github.com/CaseyCarter edited https://github.com/llvm/llvm-project/pull/112378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] LazyOffsetPtr: Use native pointer width (PR #111995)

2024-10-15 Thread John Paul Adrian Glaubitz via cfe-commits
glaubitz wrote: > cc @glaubitz (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113341) I can confirm that the patch from this PR fixes the GCC bootstrap on 32-bit PowerPC on Linux for me (GCC pr/target 113341). https://github.com/llvm/llvm-project/pull/111995

[clang] Fieldregion descript name (PR #112313)

2024-10-15 Thread via cfe-commits
@@ -751,12 +751,27 @@ std::string MemRegion::getDescriptiveName(bool UseQuotes) const { } // Get variable name. - if (R && R->canPrintPrettyAsExpr()) { -R->printPrettyAsExpr(os); -if (UseQuotes) - return (llvm::Twine("'") + os.str() + ArrayIndices + "'").str

[clang] Fieldregion descript name (PR #112313)

2024-10-15 Thread via cfe-commits
https://github.com/T-Gruber updated https://github.com/llvm/llvm-project/pull/112313 >From dd562bb3d505c43070ceb8af51359cc66860a0ea Mon Sep 17 00:00:00 2001 From: "tobias.gruber" Date: Tue, 15 Oct 2024 07:19:12 +0200 Subject: [PATCH 1/4] Handle FieldRegions with ElementRegions as SuperRegions

[clang] [analyzer] Modernize FuchsiaHandleChecker (PR #111588)

2024-10-15 Thread Pavel Skripkin via cfe-commits
pskrgag wrote: > I think APINotes support attributes on param declarations Hm, cannot find it, but anyway will check if it's possible to extend APINotes. Thanks! https://github.com/llvm/llvm-project/pull/111588 ___ cfe-commits mailing list cfe-commit

[clang] [llvm] [llvm] Support llvm::Any across shared libraries on windows (PR #108051)

2024-10-15 Thread Yitzhak Mandelbaum via cfe-commits
@@ -28,12 +28,24 @@ #include "clang/Analysis/FlowSensitive/MatchSwitch.h" #include "clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h" #include "clang/Analysis/FlowSensitive/WatchedLiteralsSolver.h" +#include "clang/Support/Compiler.h" #include "llvm/ADT/STLExtras.h"

[clang-tools-extra] 1c38c46 - [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (#111178)

2024-10-15 Thread via cfe-commits
Author: whisperity Date: 2024-10-15T14:42:57+02:00 New Revision: 1c38c46b083315e3a621267c9a90e8a7750f3700 URL: https://github.com/llvm/llvm-project/commit/1c38c46b083315e3a621267c9a90e8a7750f3700 DIFF: https://github.com/llvm/llvm-project/commit/1c38c46b083315e3a621267c9a90e8a7750f3700.diff LO

[clang-tools-extra] [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (PR #111178)

2024-10-15 Thread via cfe-commits
https://github.com/whisperity closed https://github.com/llvm/llvm-project/pull/78 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-10-15 Thread Donát Nagy via cfe-commits
@@ -212,6 +212,25 @@ typedef llvm::ImmutableMap REGISTER_TRAIT_WITH_PROGRAMSTATE(PendingArrayDestruction, PendingArrayDestructionMap) +// This trait is used to heuristically filter out results produced from +// execution paths that took "weak"

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-15 Thread Gábor Horváth via cfe-commits
@@ -107,6 +107,39 @@ namespace std { using std::operator""s; using std::operator""sv; +namespace default_args { + using IntArray = int[]; + const int *defaultparam1(const int &def1 [[clang::lifetimebound]] = 0); // #def1 Xazax-hun wrote: Ah, my bad. Totall

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-10-15 Thread Donát Nagy via cfe-commits
@@ -121,6 +121,34 @@ struct EvalCallOptions { EvalCallOptions() {} }; +/// Simple control flow statements like `if` can only produce a single two-way +/// state split, so when the analyzer cannot determine the value of the +/// condition, it can assume either of the two opti

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-15 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -3767,28 +3764,26 @@ void ExprEngine::evalEagerlyAssumeBinOpBifurcation(ExplodedNodeSet &Dst, continue; } -ProgramStateRef state = Pr

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
@@ -601,6 +612,44 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL( return true; } +void LoongArchPreRAExpandPseudo::annotateTableJump( +MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) { + MachineFunction *MF = MBB.getParent(); + MachineRegisterInfo &MR

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
@@ -601,6 +612,44 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL( return true; } +void LoongArchPreRAExpandPseudo::annotateTableJump( +MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) { + MachineFunction *MF = MBB.getParent(); + MachineRegisterInfo &MR

[clang] Fieldregion descript name (PR #112313)

2024-10-15 Thread via cfe-commits
@@ -751,12 +751,27 @@ std::string MemRegion::getDescriptiveName(bool UseQuotes) const { } // Get variable name. - if (R && R->canPrintPrettyAsExpr()) { -R->printPrettyAsExpr(os); -if (UseQuotes) - return (llvm::Twine("'") + os.str() + ArrayIndices + "'").str

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
https://github.com/wangleiat updated https://github.com/llvm/llvm-project/pull/102411 >From 7bcf5ebc9444e7cb98746ef0d182cbd4b60196e2 Mon Sep 17 00:00:00 2001 From: wanglei Date: Thu, 8 Aug 2024 09:41:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8?

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
@@ -601,6 +612,44 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL( return true; } +void LoongArchPreRAExpandPseudo::annotateTableJump( +MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) { + MachineFunction *MF = MBB.getParent(); + MachineRegisterInfo &MR

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
@@ -601,6 +612,44 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL( return true; } +void LoongArchPreRAExpandPseudo::annotateTableJump( +MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) { + MachineFunction *MF = MBB.getParent(); + MachineRegisterInfo &MR

[clang] [clang][dataflow] Add a lattice to help cache const accessor methods (PR #111006)

2024-10-15 Thread Jan Voung via cfe-commits
jvoung wrote: Friendly ping =) https://github.com/llvm/llvm-project/pull/111006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-15 Thread via cfe-commits
@@ -1370,7 +1381,7 @@ static void checkExprLifetimeImpl(Sema &SemaRef, break; } - case IndirectLocalPathEntry::LambdaCaptureInit: + case IndirectLocalPathEntry::LambdaCaptureInit: { higher-performance wrote: It's not unrelated. If I ta

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-10-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/111499 >From 4951a7b9b87f9800bc3629bd44f65141ba98c6b0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 8 Oct 2024 08:19:56 + Subject: [PATCH 1/8] start working on lifetime capture --- clang/include/clang/Ba

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-10-15 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -121,6 +121,34 @@ struct EvalCallOptions { EvalCallOptions() {} }; +/// Simple control flow stat

[clang] clang/AMDGPU: Set noalias.addrspace metadata on atomicrmw (PR #102462)

2024-10-15 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/102462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][Docs] Update function calls docs (PR #106860)

2024-10-15 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/106860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-10-15 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/110327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Remove requires system-linux from some driver tests (PR #111976)

2024-10-15 Thread Sean Perry via cfe-commits
https://github.com/perry-ca approved this pull request. LGTM. Thanks Matt. https://github.com/llvm/llvm-project/pull/111976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -302,27 +307,43 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) { if (const Decl *FD = CE->getCalleeDecl()) { if (ShouldSuppress) return; - if (FD->hasAttr()) { -Diag(Loc, diag::warn_unused_call) << R1 << R2 << "pure"; -

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread Andrew Sukach via cfe-commits
https://github.com/sookach updated https://github.com/llvm/llvm-project/pull/112111 >From d3b9b6ed8ffa8bad473a415ae4cc9f8748d7c2c2 Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Sat, 12 Oct 2024 19:47:30 -0400 Subject: [PATCH] [clang] Check for null TypeSourceInfo in Sema::CreateUnaryExprO

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread Andrew Sukach via cfe-commits
https://github.com/sookach updated https://github.com/llvm/llvm-project/pull/112111 >From a478b5e0d91b7246ed145af0febd86daf1e2 Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Sat, 12 Oct 2024 19:47:30 -0400 Subject: [PATCH] [clang] Check for null TypeSourceInfo in Sema::CreateUnaryExprO

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread Andrew Sukach via cfe-commits
https://github.com/sookach updated https://github.com/llvm/llvm-project/pull/112111 >From 384e4eba4c3a587f0645e5f037b81acff786e39e Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Sat, 12 Oct 2024 19:47:30 -0400 Subject: [PATCH] [clang] Check for null TypeSourceInfo in Sema::CreateUnaryExprO

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,82 @@ +=== +Clang SYCL Linker +=== + +.. contents:: + :local: + +.. _clang-sycl-linker: + +Introduction + + +This tool works as a wrapper around the SYCL device code linking process. +The purpose of this tool is to p

[clang] 84ee629 - clang: Remove some pointer bitcasts (#112324)

2024-10-15 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-10-15T22:46:24+04:00 New Revision: 84ee629bc515e5a2247043c668c7da38447c20e9 URL: https://github.com/llvm/llvm-project/commit/84ee629bc515e5a2247043c668c7da38447c20e9 DIFF: https://github.com/llvm/llvm-project/commit/84ee629bc515e5a2247043c668c7da38447c20e9.diff

[clang] clang: Remove some pointer bitcasts (PR #112324)

2024-10-15 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/112324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement `WaveActiveSum` intrinsic (PR #112400)

2024-10-15 Thread Finn Plummer via cfe-commits
inbelic wrote: Dependent on https://github.com/llvm/llvm-project/pull/112058 and https://github.com/llvm/llvm-project/pull/111010. https://github.com/llvm/llvm-project/pull/112400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang][Sema] Use the correct injected template arguments for partial specializations when collecting multi-level template argument lists (PR #112381)

2024-10-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/112381 >From 146b209c90a5ced513ec886882ed57ce09ca2f56 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 15 Oct 2024 09:52:43 -0400 Subject: [PATCH 1/2] [Clang][Sema] Use the correct injected template arg

  1   2   3   4   5   6   >