[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-04 Thread via cfe-commits
@@ -5028,3 +5050,376 @@ void AutoType::Profile(llvm::FoldingSetNodeID , const ASTContext ) { Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(), getTypeConstraintConcept(), getTypeConstraintArguments()); } + +FunctionEffect::Kind

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

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

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-04 Thread via cfe-commits
antangelo wrote: > I don't think you can use x16 and x17 for argument passing due to them being > reserved for PLTs and call veneers. That is if the linker decides to create a > branch island or if the function is called via a PLT, x16 and x17 will be > clobbered on the call so arguments

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: None (antangelo) Changes Adds AArch64 support for the `preserve_none` calling convention. Registers X0-X17 and X19-X28 are caller save, and can be used to pass arguments. Delegates to AAPCS for all other registers. Closes #87423 ---

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (antangelo) Changes Adds AArch64 support for the `preserve_none` calling convention. Registers X0-X17 and X19-X28 are caller save, and can be used to pass arguments. Delegates to AAPCS for all other registers. Closes #87423 ---

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-04 Thread via cfe-commits
https://github.com/antangelo updated https://github.com/llvm/llvm-project/pull/91046 >From 767173a0dfde9858c90867cc5d476da90e5ba898 Mon Sep 17 00:00:00 2001 From: Antonio Abbatangelo Date: Tue, 30 Apr 2024 22:58:18 -0400 Subject: [PATCH 1/2] [AArch64] Support preserve_none calling convention

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-05-04 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Ah, awesome. In that case note that I'll make the option not show up when changes would have conflicting overlap ranges https://github.com/llvm/llvm-project/pull/79867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-05-04 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Bump @HighCommander4 - did you get a chance to review this? Hi @torshepherd! Sorry for not being more responsive on this. I haven't had as much time as I'd like to spend on clangd reviews recently, and certainly not enough to keep up with the volume of review requests

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-05-04 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -DWIN -verify -std=c++23 -fsyntax-only %s +// RUN: %clang_cc1 -verify -std=c++23 -fsyntax-only %s + +// expected-no-diagnostics + + +#ifdef WIN +#define INFINITY ((float)(1e+300 * 1e+300)) +#define NAN (-(float)(INFINITY * 0.0F)) +#else

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-05-04 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -DWIN -emit-llvm -o - %s | FileCheck %s --check-prefixes=WIN + +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -emit-llvm -o - %s | FileCheck %s

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-05-04 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -DWIN -emit-llvm -o - %s | FileCheck %s --check-prefixes=WIN + +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -emit-llvm -o - %s | FileCheck %s

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-05-04 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -DWIN -emit-llvm -o - %s | FileCheck %s --check-prefixes=WIN + +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -emit-llvm -o - %s | FileCheck %s

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-05-04 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -DWIN -verify -std=c++23 -fsyntax-only %s +// RUN: %clang_cc1 -verify -std=c++23 -fsyntax-only %s + +// expected-no-diagnostics + + +#ifdef WIN +#define INFINITY ((float)(1e+300 * 1e+300)) +#define NAN (-(float)(INFINITY * 0.0F)) +#else

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-05-04 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -DWIN -verify -std=c++23 -fsyntax-only %s +// RUN: %clang_cc1 -verify -std=c++23 -fsyntax-only %s + +// expected-no-diagnostics + + +#ifdef WIN +#define INFINITY ((float)(1e+300 * 1e+300)) +#define NAN (-(float)(INFINITY * 0.0F)) +#else

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-05-04 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -DWIN -emit-llvm -o - %s | FileCheck %s --check-prefixes=WIN + +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -emit-llvm -o - %s | FileCheck %s

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-05-04 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -DWIN -verify -std=c++23 -fsyntax-only %s +// RUN: %clang_cc1 -verify -std=c++23 -fsyntax-only %s + +// expected-no-diagnostics + + +#ifdef WIN +#define INFINITY ((float)(1e+300 * 1e+300)) +#define NAN (-(float)(INFINITY * 0.0F)) +#else

[clang] Skip over std namespace in WebKit checkers. (PR #90552)

2024-05-04 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Closing this in favor of https://github.com/llvm/llvm-project/pull/91103. https://github.com/llvm/llvm-project/pull/90552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Ignore system headers in WebKit checkers. (PR #91103)

2024-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/91103.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp (+3) - (modified)

[clang] Skip over std namespace in WebKit checkers. (PR #90552)

2024-05-04 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/90552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Ignore system headers in WebKit checkers. (PR #91103)

2024-05-04 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/91103 None >From e2dbb580ff7fe1f2db1ad7c81902cb8a8b5a58ed Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 4 May 2024 20:41:29 -0700 Subject: [PATCH] [analyzer] Ignore system headers in WebKit checkers. ---

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

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

[clang] 7a484d3 - [clang] Distinguish unresolved templates in UnresolvedLookupExpr (#89019)

2024-05-04 Thread via cfe-commits
Author: Younan Zhang Date: 2024-05-05T11:38:49+08:00 New Revision: 7a484d3a1f630ba9ce7b22e744818be974971470 URL: https://github.com/llvm/llvm-project/commit/7a484d3a1f630ba9ce7b22e744818be974971470 DIFF: https://github.com/llvm/llvm-project/commit/7a484d3a1f630ba9ce7b22e744818be974971470.diff

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-05-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/89019 >From 89a5bbcc89c1e43ac7f2e60f3c234c2c42928c86 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 17 Apr 2024 12:24:56 +0800 Subject: [PATCH 1/7] [clang] Distinguish unresolved templates in

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow trivial operator++ (PR #91102)

2024-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes This PR adds the support for trivial operator++ implementations. T operator++() and T operator++(int) are trivial if the calle is trivial. Also allow incrementing and decrementing of a POD member variable.

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow trivial operator++ (PR #91102)

2024-05-04 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/91102 This PR adds the support for trivial operator++ implementations. T& operator++() and T operator++(int) are trivial if the calle is trivial. Also allow incrementing and decrementing of a POD member variable. >From

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/5] reformat --- .../clang-tidy/readability/CMakeLists.txt

[clang] [Clang][Comments] Support for parsing headers in Doxygen \par commands (PR #91100)

2024-05-04 Thread via cfe-commits
https://github.com/hdoc updated https://github.com/llvm/llvm-project/pull/91100 >From 2b1845352b0ea27f027c94e406cd32ae8a1e94d1 Mon Sep 17 00:00:00 2001 From: hdoc Date: Sat, 4 May 2024 18:50:16 -0700 Subject: [PATCH] Support for parsing headers in Doxygen \par commands ---

[clang] [Clang][Comments] Add argument parsing for @throw @throws @exception (PR #84726)

2024-05-04 Thread via cfe-commits
hdoc wrote: Ping https://github.com/llvm/llvm-project/pull/84726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-05-04 Thread via cfe-commits
hdoc wrote: Ping https://github.com/llvm/llvm-project/pull/88367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-05-04 Thread Hubert Tong via cfe-commits
@@ -908,6 +908,69 @@ void CodeGenFunction::EmitIfStmt(const IfStmt ) { incrementProfileCounter(); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool HasEmptyBody) { + if

[clang] [llvm] [InstCombine] Fold `(icmp eq/ne (or (select cond, 0/NZ, 0/NZ), X), 0)` (PR #88183)

2024-05-04 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/88183 >From 31b373984bcbb51db9f1d1c939492515fb721c8d Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Sat, 4 May 2024 18:12:34 -0500 Subject: [PATCH 1/5] [Inliner] Add tests for propagating more parameter

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

2024-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-llvm-ir Author: None (goldsteinn) Changes - **[Inliner] Add tests for propagating more parameter attributes; NFC** - **[Inliner] Propagate more attributes to params when inlining** - **[Inliner] Propagate `range`

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

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

[clang] [llvm] goldsteinn/inline prop (PR #91101)

2024-05-04 Thread via cfe-commits
https://github.com/goldsteinn created https://github.com/llvm/llvm-project/pull/91101 - **[Inliner] Add tests for propagating more parameter attributes; NFC** - **[Inliner] Propagate more attributes to params when inlining** - **[Inliner] Propagate `range` attributes to params when inlining**

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-05-04 Thread via cfe-commits
https://github.com/hdoc updated https://github.com/llvm/llvm-project/pull/88367 >From 61612c5f340e25198deaf68e6904323955efe489 Mon Sep 17 00:00:00 2001 From: hdoc Date: Thu, 11 Apr 2024 01:54:18 -0700 Subject: [PATCH 1/2] Attach comments to decl even if preproc directives are in between ---

[clang] [Clang][Comments] Support for parsing headers in Doxygen \par commands (PR #91100)

2024-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: hdoc (hdoc) Changes ### Background Doxygen's `\par` command ([link](https://www.doxygen.nl/manual/commands.html#cmdpar)) has an optional argument, which denotes the header of the paragraph started by a given `\par` command. In short,

[clang] [Clang][Comments] Support for parsing headers in Doxygen \par commands (PR #91100)

2024-05-04 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang] [Clang][Comments] Support for parsing headers in Doxygen \par commands (PR #91100)

2024-05-04 Thread via cfe-commits
https://github.com/hdoc created https://github.com/llvm/llvm-project/pull/91100 ### Background Doxygen's `\par` command ([link](https://www.doxygen.nl/manual/commands.html#cmdpar)) has an optional argument, which denotes the header of the paragraph started by a given `\par` command. In

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-05-04 Thread Hubert Tong via cfe-commits
@@ -14547,6 +14547,20 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { default: return false; + case Builtin::BI__builtin_frexp: + case Builtin::BI__builtin_frexpf: + case Builtin::BI__builtin_frexpl: { +LValue Pointer; +if

[clang] 3c311b0 - [test] %clang_cc1 -S: remove overridden -emit-llvm

2024-05-04 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-04T17:49:32-07:00 New Revision: 3c311b022283450acbdd6af22862e913649a5452 URL: https://github.com/llvm/llvm-project/commit/3c311b022283450acbdd6af22862e913649a5452 DIFF: https://github.com/llvm/llvm-project/commit/3c311b022283450acbdd6af22862e913649a5452.diff

[clang] [webkit.RefCntblBaseVirtualDtor] Ignore WTF::RefCounted and its variants missing virtual destructor (PR #91009)

2024-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/91009.diff 2 Files Affected: - (modified)

[clang] [webkit.RefCntblBaseVirtualDtor] Ignore WTF::RefCounted and its variants missing virtual destructor (PR #91009)

2024-05-04 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91009 >From 3301340a5532183252365c536572fc98e4941c8b Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 3 May 2024 13:35:29 -0700 Subject: [PATCH 1/3] [webkit.RefCntblBaseVirtualDtor] Ignore WTF::RefCounted and its

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-04 Thread Yeting Kuo via cfe-commits
yetingk wrote: @topperc Sorry, there was a quick fix after the approve. `getTargetFeatureForExtension` could approve the extension with version. It may be better to allow them, but I am not sure the error message could be enough readable if we use wrong version number and is the format of

[clang] [alpha.webkit.UncountedCallArgsChecker] Treat (foo())->bar() like foo()->bar(). (PR #91052)

2024-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/91052.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp (+4) - (modified)

[clang] [alpha.webkit.UncountedCallArgsChecker] Treat (foo())->bar() like foo()->bar(). (PR #91052)

2024-05-04 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91052 >From 357b8bfa0cef2632930e3f037ed66360b0fa3615 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 4 May 2024 00:38:08 -0700 Subject: [PATCH 1/2] [alpha.webkit.UncountedCallArgsChecker] Treat (foo())->bar()

[clang] a312dd6 - [BPF, test] %clang_cc1 -emit-llvm: remove redundant -S

2024-05-04 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-04T17:37:36-07:00 New Revision: a312dd68c0ce368313164eb92cbdd95192afa3f8 URL: https://github.com/llvm/llvm-project/commit/a312dd68c0ce368313164eb92cbdd95192afa3f8 DIFF: https://github.com/llvm/llvm-project/commit/a312dd68c0ce368313164eb92cbdd95192afa3f8.diff

[clang] c4c3efa - [test] %clang_cc1 -emit-llvm: remove redundant -S

2024-05-04 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-04T17:31:08-07:00 New Revision: c4c3efa161edf7313d1aeda07cd82fab90c3717c URL: https://github.com/llvm/llvm-project/commit/c4c3efa161edf7313d1aeda07cd82fab90c3717c DIFF: https://github.com/llvm/llvm-project/commit/c4c3efa161edf7313d1aeda07cd82fab90c3717c.diff

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-04 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/89727 >From a43014cf3daa1b0fd9092bfe41da979205ba64aa Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 23 Apr 2024 02:16:04 -0700 Subject: [PATCH 1/6] [RISCV] Teach .option arch to support experimental extensions.

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

2024-05-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/85235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

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

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

2024-05-04 Thread Fangrui Song via cfe-commits
@@ -1,5 +1,37 @@ +// RUN: %clang -### -c --target=aarch64 %s 2>&1 | FileCheck %s --check-prefix NONE +// NONE: "-cc1" +// NONE-NOT: "-fptrauth- + // RUN: %clang -### -c --target=aarch64 -fno-ptrauth-intrinsics -fptrauth-intrinsics %s 2>&1 | FileCheck %s --check-prefix=INTRIN

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-04 Thread Brandt Bucher via cfe-commits
brandtbucher wrote: Aw, but that means we only have *twenty-six* registers for argument-passing... ;) https://github.com/llvm/llvm-project/pull/91046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [arm] Support reserving r4 and r5 alongside r9 (PR #89849)

2024-05-04 Thread via cfe-commits
benisxdxd wrote: Ping https://github.com/llvm/llvm-project/pull/89849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver] Add option to select compiler-rt arch suffix (PR #89775)

2024-05-04 Thread Fangrui Song via cfe-commits
MaskRay wrote: I want to hear about opinions why the old compiler-rt file hierarchy is preferred by some users. Ideally, all operating systems would eventually migrate to `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on` and adopt a consistent hierarchy similar to libc++/libc++abi/libunwind (without

[clang-tools-extra] [clang-tidy] Improve modernize-use-std-print diagnostic (PR #91071)

2024-05-04 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/91071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][docs] Fix modernize-use-std-print docs (PR #91069)

2024-05-04 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/91069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4dede5e - [Sema] Remove redundant check in an else branch. NFC

2024-05-04 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-04T15:27:52-07:00 New Revision: 4dede5ef5ca7e538351975130b1c1d863a84e4ca URL: https://github.com/llvm/llvm-project/commit/4dede5ef5ca7e538351975130b1c1d863a84e4ca DIFF: https://github.com/llvm/llvm-project/commit/4dede5ef5ca7e538351975130b1c1d863a84e4ca.diff

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-04 Thread Petr Hosek via cfe-commits
@@ -0,0 +1,36 @@ +; Test that global values with explicit sections are placed into unique sections. + +; RUN: llc < %s 2>&1 | FileCheck %s petrhosek wrote: Done. https://github.com/llvm/llvm-project/pull/91028 ___

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-04 Thread Petr Hosek via cfe-commits
@@ -733,16 +733,22 @@ calcUniqueIDUpdateFlagsAndSize(const GlobalObject *GO, StringRef SectionName, Ctx.isELFGenericMergeableSection(SectionName); // If this is the first ocurrence of this section name, treat it as the // generic section - if (!SymbolMergeable &&

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-04 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/91028 >From 78193f68a149e378fbb180a1a5fa1f4551f2af66 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 3 May 2024 15:48:31 -0700 Subject: [PATCH 1/4] [Clang] -fseparate-named-sections option When set, the

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

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

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-04 Thread Petr Hosek via cfe-commits
petrhosek wrote: > > This is an alternative approach to address the issue described in > > [discourse.llvm.org/t/rfc-support-for-memory-regions-in-elf/78570](https://discourse.llvm.org/t/rfc-support-for-memory-regions-in-elf/78570) > > which doesn't require a custom section type. > > This RFC

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-04 Thread Fangrui Song via cfe-commits
@@ -733,16 +733,22 @@ calcUniqueIDUpdateFlagsAndSize(const GlobalObject *GO, StringRef SectionName, Ctx.isELFGenericMergeableSection(SectionName); // If this is the first ocurrence of this section name, treat it as the // generic section - if (!SymbolMergeable &&

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-04 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,36 @@ +; Test that global values with explicit sections are placed into unique sections. + +; RUN: llc < %s 2>&1 | FileCheck %s MaskRay wrote: Drop unused `2>&1` https://github.com/llvm/llvm-project/pull/91028

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/91028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1b90095 - [Driver,test] Improve msvc-link.c

2024-05-04 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-04T15:15:12-07:00 New Revision: 1b90095b7db40c835c6de172d7a31100e461 URL: https://github.com/llvm/llvm-project/commit/1b90095b7db40c835c6de172d7a31100e461 DIFF: https://github.com/llvm/llvm-project/commit/1b90095b7db40c835c6de172d7a31100e461.diff

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-04 Thread Petr Hosek via cfe-commits
@@ -75,6 +75,10 @@ static cl::opt JumpTableInFunctionSection( "jumptable-in-function-section", cl::Hidden, cl::init(false), cl::desc("Putting Jump Table in function section")); +static cl::opt UniqueExplicitSections( +"unique-explicit-sections", cl::Hidden,

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-04 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/91028 >From 78193f68a149e378fbb180a1a5fa1f4551f2af66 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 3 May 2024 15:48:31 -0700 Subject: [PATCH 1/3] [Clang] -fseparate-named-sections option When set, the

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes When set, the compiler will use separate unique sections for global symbols in named special sections (e.g. symbols that are annotated with __attribute__((section(.... Doing so enables linker GC to

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-04 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/91028 >From 78193f68a149e378fbb180a1a5fa1f4551f2af66 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 3 May 2024 15:48:31 -0700 Subject: [PATCH 1/2] [Clang] -fseparate-named-sections option When set, the

[clang] [clang][flang][windows] Prefer user-provided library paths (-L) (PR #90758)

2024-05-04 Thread Fangrui Song via cfe-commits
MaskRay wrote: The code checks whether the directory is present `auto CRTPath = TC.getCompilerRTPath();` and only adds the libpath when it is present. This is related to the `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=off` file hierarchy we are migrating way from. With

[clang] [clang][flang][windows] Prefer user-provided library paths (-L) (PR #90758)

2024-05-04 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,7 @@ +// REQUIRES: system-windows MaskRay wrote: Add tests to existing msvc-link.c instead of a new file. Specify `--target=` to avoid reliance on the default target triple and avoid the need of REQUIRES.

[clang] [clang][flang][windows] Prefer user-provided library paths (-L) (PR #90758)

2024-05-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. 。 https://github.com/llvm/llvm-project/pull/90758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-04 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable FPContract with optnone (PR #91061)

2024-05-04 Thread via cfe-commits
@@ -968,10 +968,7 @@ class FPOptionsOverride { setAllowFPContractAcrossStatement(); } - void setDisallowOptimizations() { -setFPPreciseEnabled(true); -setDisallowFPContract(); - } + void setDisallowOptimizations() { setFPPreciseEnabled(true); }

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-04 Thread Doug Wyatt via cfe-commits
@@ -5028,3 +5050,376 @@ void AutoType::Profile(llvm::FoldingSetNodeID , const ASTContext ) { Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(), getTypeConstraintConcept(), getTypeConstraintArguments()); } + +FunctionEffect::Kind

[clang] [compiler-rt] [flang] [libc] [libclc] [libcxx] [libcxxabi] [lld] [lldb] [llvm] [mlir] [libc++] implement ranges::find_last (PR #91081)

2024-05-04 Thread Andrew Sukach via cfe-commits
https://github.com/soukatch closed https://github.com/llvm/llvm-project/pull/91081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-04 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos deleted https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-04 Thread Doug Wyatt via cfe-commits
@@ -3649,6 +3649,25 @@ FunctionProtoType::FunctionProtoType(QualType result, ArrayRef params, auto = *getTrailingObjects(); EllipsisLoc = epi.EllipsisLoc; } + + if (!epi.FunctionEffects.empty()) { +auto = *getTrailingObjects(); +// TODO: bitfield

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-04 Thread Doug Wyatt via cfe-commits
@@ -1870,6 +1870,28 @@ bool Sema::IsFunctionConversion(QualType FromType, QualType ToType, FromFn = QT->getAs(); Changed = true; } + +// For C, when called from checkPointerTypesForAssignment, +// we need not to alter FromFn, or else even an innocuous

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-04 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-04 Thread Doug Wyatt via cfe-commits
@@ -5028,3 +5050,376 @@ void AutoType::Profile(llvm::FoldingSetNodeID , const ASTContext ) { Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(), getTypeConstraintConcept(), getTypeConstraintArguments()); } + +FunctionEffect::Kind

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

2024-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-spir-v Author: Fangrui Song (MaskRay) Changes Commit 6c0665e22174d474050e85ca367424f6e02476be (https://reviews.llvm.org/D45164) enabled certain constant expression evaluation for `MCObjectStreamer` at parse time (e.g. `.if` directives, see

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

2024-05-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/91082 Commit 6c0665e22174d474050e85ca367424f6e02476be (https://reviews.llvm.org/D45164) enabled certain constant expression evaluation for `MCObjectStreamer` at parse time (e.g. `.if` directives, see

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-05-04 Thread Eli Friedman via cfe-commits
@@ -908,6 +908,69 @@ void CodeGenFunction::EmitIfStmt(const IfStmt ) { incrementProfileCounter(); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool HasEmptyBody) { + if

[clang] [clang][CodeGen] Fix MSVC ABI for classes with a deleted copy assignment operator (PR #90547)

2024-05-04 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/90547 >From f404db44d3770cdb8ac5123c16c0b04314eda698 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Mon, 29 Apr 2024 22:09:52 -0400 Subject: [PATCH 1/6] [clang][CodeGen] Fix MS ABI for classes with non static data

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-04 Thread Doug Wyatt via cfe-commits
@@ -10510,6 +10512,8 @@ QualType ASTContext::mergeFunctionTypes(QualType lhs, QualType rhs, if (lproto->getMethodQuals() != rproto->getMethodQuals()) return {}; +// TODO: (nonblocking) Does anything need to be done with FunctionEffects? +

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-04 Thread Chris Apple via cfe-commits
@@ -18347,7 +18347,7 @@ void Sema::SetFunctionBodyKind(Decl *D, SourceLocation Loc, FnBodyKind BodyKind, } } -bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New, +bool Sema::CheckOverridingFunctionAttributes(CXXMethodDecl *New, cjappl

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-05-04 Thread Jessica Clarke via cfe-commits
@@ -3802,7 +3802,7 @@ bool X86AsmParser::validateInstruction(MCInst , const OperandVector ) { //VFMULCPHZrr Dest, Src1, Src2 //VFMULCPHZrrk Dest, Dest, Mask, Src1, Src2 //VFMULCPHZrrkz Dest, Mask, Src1, Src2 -for (unsigned i = TSFlags &

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-05-04 Thread Yupei Liu via cfe-commits
LYP951018 wrote: @philnik777 It seems that clang crashes on the test SemaCXX/cxx2a-template-lambdas.cpp https://godbolt.org/z/nnjzKr7n4 Is this expected? https://github.com/llvm/llvm-project/pull/73376 ___ cfe-commits mailing list

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

2024-05-04 Thread via cfe-commits
no92 wrote: Ping https://github.com/llvm/llvm-project/pull/87845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Remove class layout scissor (PR #89055)

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

[clang] [clang][NFC] Remove class layout scissor (PR #89055)

2024-05-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. Might be useful to mention #87090 in the commit message (first comment). https://github.com/llvm/llvm-project/pull/89055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][NFC] Remove class layout scissor (PR #89055)

2024-05-04 Thread Fangrui Song via cfe-commits
@@ -950,18 +948,20 @@ void CGRecordLowering::calculateZeroInit() { } // Verify accumulateBitfields computed the correct storage representations. -void CGRecordLowering::checkBitfieldClipping() const { +void CGRecordLowering::checkBitfieldClipping( +bool

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-04 Thread Doug Wyatt via cfe-commits
@@ -7963,6 +7967,148 @@ static Attr *getCCTypeAttr(ASTContext , ParsedAttr ) { llvm_unreachable("unexpected attribute kind!"); } +ExprResult Sema::ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode , + bool RequireConstexpr) { +

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-04 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-05-04 Thread Fangrui Song via cfe-commits
@@ -801,7 +801,7 @@ static OutputDesc *addInputSec(StringMap> , auto *firstIsec = cast( cast(sec->commands[0])->sectionBases[0]); OutputSection *firstIsecOut = - firstIsec->flags & SHF_LINK_ORDER MaskRay wrote: Why is random

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-05-04 Thread Fangrui Song via cfe-commits
@@ -3802,7 +3802,7 @@ bool X86AsmParser::validateInstruction(MCInst , const OperandVector ) { //VFMULCPHZrr Dest, Src1, Src2 //VFMULCPHZrrk Dest, Dest, Mask, Src1, Src2 //VFMULCPHZrrkz Dest, Mask, Src1, Src2 -for (unsigned i = TSFlags &

[clang] [Clang] No longer require complete types with __builtin_launder (PR #91070)

2024-05-04 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/91070 >From 11ad517cede0902945c0b7eba0e7f1ff93f08ea0 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 4 May 2024 17:31:31 +0100 Subject: [PATCH] [Clang] No longer require complete types with __builtin_launder

[clang] [clang] Use constant rounding mode for floating literals (PR #90877)

2024-05-04 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff updated https://github.com/llvm/llvm-project/pull/90877 >From 5d906b537636ca0d8706a8a888dd78edfbec684f Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Thu, 2 May 2024 22:28:05 +0700 Subject: [PATCH 1/8] [clang] Use constant rounding mode for floating literals

  1   2   3   >