rjmccall wrote:
Great, thanks! @Midar, if you can fix this code up so that these strings are
created in one place (and test the new output, since this is not NFC), I'd be
happy to sign off.
https://github.com/llvm/llvm-project/pull/88713
___
cfe-com
davidchisnall wrote:
Yup, it’s just an optimisation. The runtime does a slightly more complex
deduplication pass during loading, this just does a best effort merge so that
we don’t end up with hundreds of copies of common selectors as we did with the
GCC ABI. If we don’t do it, it isn’t an ABI
https://github.com/martinboehme closed
https://github.com/llvm/llvm-project/pull/89596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: martinboehme
Date: 2024-04-23T08:10:55+02:00
New Revision: 9ba6961ce05b17a70c22354f0b54a963ed1ab49c
URL:
https://github.com/llvm/llvm-project/commit/9ba6961ce05b17a70c22354f0b54a963ed1ab49c
DIFF:
https://github.com/llvm/llvm-project/commit/9ba6961ce05b17a70c22354f0b54a963ed1ab49c.diff
https://github.com/wzssyqa edited
https://github.com/llvm/llvm-project/pull/89638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wzssyqa updated
https://github.com/llvm/llvm-project/pull/89638
>From a40bf92dcdaa64c2ca73d9276972c8cd47750210 Mon Sep 17 00:00:00 2001
From: YunQiang Su
Date: Tue, 23 Apr 2024 01:36:17 +0800
Subject: [PATCH] Triple::normalize: Set OS for 3-component triple with none as
midd
https://github.com/PiotrZSL requested changes to this pull request.
Fix sanitizer issue.
https://github.com/llvm/llvm-project/pull/85572
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,274 @@
+//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -112,6 +112,13 @@ New checks
Detects error-prone Curiously Recurring Template Pattern usage, when the CRTP
can be constructed outside itself and the derived class.
+- New :doc:`bugprone-return-const-ref-from-parameter
+ ` check.
+
+ Detects return statements that retu
@@ -0,0 +1,40 @@
+//===--- ReturnConstRefFromParameterCheck.h - clang-tidy *- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/SimplyDanny approved this pull request.
Only a few more nits from my side.
https://github.com/llvm/llvm-project/pull/89497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
@@ -0,0 +1,31 @@
+.. title:: clang-tidy - bugprone-return-const-ref-from-parameter
+
+bugprone-return-const-ref-from-parameter
+
+
+Detects return statements that return a constant reference parameter as
constant
+reference. This may cause
https://github.com/SimplyDanny edited
https://github.com/llvm/llvm-project/pull/89497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/orcguru edited
https://github.com/llvm/llvm-project/pull/84132
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/89536
>From 58058a88305c7d4c1b1a30d8572ca481889ea3f9 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Sun, 21 Apr 2024 13:29:39 +0300
Subject: [PATCH 1/2] [clang] Mark ill-formed partial specialization as invali
kees wrote:
This needs test cases, which I'll add tomorrow. I just wanted to get the core
logic up for review before I hit EOD...
https://github.com/llvm/llvm-project/pull/89707
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Kees Cook (kees)
Changes
When building the Linux kernel for i386, the -mregparm=3 option is enabled.
Crashes were observed in the sanitizer handler functions, and the problem was
found to be mismatched calling convention.
As was fixed in
https://github.com/kees created https://github.com/llvm/llvm-project/pull/89707
When building the Linux kernel for i386, the -mregparm=3 option is enabled.
Crashes were observed in the sanitizer handler functions, and the problem was
found to be mismatched calling convention.
As was fixed in c
https://github.com/topperc updated
https://github.com/llvm/llvm-project/pull/89684
>From c28f21fb93f31661f8313259f0103dc1af44f4a7 Mon Sep 17 00:00:00 2001
From: Craig Topper
Date: Mon, 22 Apr 2024 13:19:26 -0700
Subject: [PATCH] [RISCV] Split code that tablegen needs out of RISCVISAInfo.
This
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: Owen Pan (owenca)
Changes
Fixes #71939.
---
Full diff: https://github.com/llvm/llvm-project/pull/89706.diff
2 Files Affected:
- (modified) clang/lib/Format/UnwrappedLineParser.cpp (+35-6)
- (modified) clang/unittests/Format/Toke
bolshakov-a wrote:
@efriedma-quic, would it be OK to add "subexpression" visitation with a comment
that I'm not sure that it is actually needed?
https://github.com/llvm/llvm-project/pull/1
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/89706
Fixes #71939.
>From 0fab05c4ab7ac95d7c08dd23a0441dc28c2ef813 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 22 Apr 2024 21:56:31 -0700
Subject: [PATCH] [clang-format] Correctly annotate list init braces of cl
@@ -0,0 +1,274 @@
+//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/wangpc-pp approved this pull request.
LGTM.
https://github.com/llvm/llvm-project/pull/89684
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/topperc updated
https://github.com/llvm/llvm-project/pull/89684
>From 7171df42d62ec510627f1fd6526c39c340f2e425 Mon Sep 17 00:00:00 2001
From: Craig Topper
Date: Mon, 22 Apr 2024 13:19:26 -0700
Subject: [PATCH 1/2] [RISCV] Split code that tablegen needs out of
RISCVISAInfo.
https://github.com/tbaederr closed
https://github.com/llvm/llvm-project/pull/89041
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Timm Baeder
Date: 2024-04-23T06:04:15+02:00
New Revision: e5f9de89e540b06893709d97f3ce9671071b3df0
URL:
https://github.com/llvm/llvm-project/commit/e5f9de89e540b06893709d97f3ce9671071b3df0
DIFF:
https://github.com/llvm/llvm-project/commit/e5f9de89e540b06893709d97f3ce9671071b3df0.diff
L
@@ -47,7 +47,7 @@ class MinMaxUseInitializerListCheck : public ClangTidyCheck {
private:
bool IgnoreNonTrivialTypes;
- unsigned long IgnoreTrivialTypesOfSizeAbove;
+ long IgnoreTrivialTypesOfSizeAbove;
PiotrZSL wrote:
why change into signed ? Unsigned wer
@@ -0,0 +1,50 @@
+.. title:: clang-tidy - modernize-min-max-use-initializer-list
+
+modernize-min-max-use-initializer-list
+==
+
+Replaces nested ``std::min`` and ``std::max`` calls with an initializer list
+where applicable.
+
+For instance, c
@@ -0,0 +1,56 @@
+//===--- MinMaxUseInitializerListCheck.h - clang-tidy ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -80,27 +80,26 @@ static SmallVector
generateReplacements(const MatchFinder::MatchResult &Match,
const CallExpr *TopCall, const FindArgsResult &Result,
const bool IgnoreNonTrivialTypes,
- const unsigned long Ignore
@@ -0,0 +1,194 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 4
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +fullbf16
-S -emit-llvm %s -o - | FileCheck %s
wangpc-pp wrote:
```sugges
@@ -1,12 +1,12 @@
-//===-- RISCVISAInfo.cpp - RISC-V Arch String Parser *- C++
-*-===//
topperc wrote:
Only header files usually have this comment
https://github.com/llvm/llvm-project/pull/89684
___
cfe-co
https://github.com/wangpc-pp commented:
I think this patch doesn't need to be stacked on #89335.
https://github.com/llvm/llvm-project/pull/89684
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe
@@ -1,12 +1,12 @@
-//===-- RISCVISAInfo.cpp - RISC-V Arch String Parser *- C++
-*-===//
wangpc-pp wrote:
We shouldn't remove `*- C++ -*` here I think, it's for editors like Emacs.
https://github.com/llvm/llvm-project/pull/89684
_
https://github.com/wangpc-pp edited
https://github.com/llvm/llvm-project/pull/89684
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
whentojump wrote:
Hi, thanks for the fix.
I can confirm it addressed your test case (https://godbolt.org/z/sMscqWeq7).
But unfortunately it doesn't fix the one in my original post of #87000
([compiler explorer
link](https://godbolt.org/#z:OYLghAFBqd5QCxAYwPYBMCmBRdBLAF1QCcAaPECAMzwBtMA7AQwFtM
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/89702
>From ba1c87956f74248467d2f85c20c2f450eef953bd Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Mon, 22 Apr 2024 22:39:06 -0400
Subject: [PATCH] Push immediate function context while transforming lambdas in
template
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Daniel M. Katz (katzdm)
Changes
The following program is [accepted](https://godbolt.org/z/oEc34Trh4) by Clang,
EDG, and MSVC, but rejected by Clang:
```cpp
#include
consteval auto fn() { return std::vector {1,2,3}; }
template
https://github.com/katzdm created
https://github.com/llvm/llvm-project/pull/89702
The following program is [accepted](https://godbolt.org/z/oEc34Trh4) by Clang,
EDG, and MSVC, but rejected by Clang:
```cpp
#include
consteval auto fn() { return std::vector {1,2,3}; }
template
void fn2() {
https://github.com/sopyb edited https://github.com/llvm/llvm-project/pull/85572
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,274 @@
+//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
ChuanqiXu9 wrote:
@jansvoboda11 @Bigcheese ping
https://github.com/llvm/llvm-project/pull/86912
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
delcypher wrote:
@rapidsna I've addressed the "Make it an error to use 'counted_by' on size-less
types (e.g., forward declared structs)" TODO.
I still need to test this PR properly and write a proper commit message
explaining what this does.
https://github.com/llvm/llvm-project/pull/87596
___
https://github.com/delcypher updated
https://github.com/llvm/llvm-project/pull/87596
>From b859cf056df24daa85f3fd305ef56f32e0f266ed Mon Sep 17 00:00:00 2001
From: Dan Liew
Date: Fri, 12 Apr 2024 17:36:19 -0700
Subject: [PATCH 1/2] [Attributes] Support Attributes being declared as
supporting an
@@ -378,3 +378,30 @@ def XIANGSHAN_NANHU :
RISCVProcessorModel<"xiangshan-nanhu",
TuneZExtHFusion,
TuneZExtWFusion,
TuneShiftedZExtWFusion]>;
+de
@@ -3424,6 +3445,26 @@ llvm::DIMacroFile
*CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent,
return DBuilder.createTempMacroFile(Parent, Line, FName);
}
+llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor(
ahatanak wrote:
@dwblaikie 's com
https://github.com/orcguru closed
https://github.com/llvm/llvm-project/pull/88829
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Felix (Ting Wang)
Date: 2024-04-23T08:44:25+08:00
New Revision: 16efd2a4c4b6a811688e5f623cb04dbd2d0579e8
URL:
https://github.com/llvm/llvm-project/commit/16efd2a4c4b6a811688e5f623cb04dbd2d0579e8
DIFF:
https://github.com/llvm/llvm-project/commit/16efd2a4c4b6a811688e5f623cb04dbd2d0579e8.d
https://github.com/orcguru updated
https://github.com/llvm/llvm-project/pull/88829
>From 35bf12e2fcb499c8953e4207cea2296d9ddcbf1f Mon Sep 17 00:00:00 2001
From: Ting Wang
Date: Mon, 15 Apr 2024 21:52:02 -0400
Subject: [PATCH 1/2] Following Amy's b1922e55ab3b35dff99238fd0b74be00df0472e7,
and d5
https://github.com/Troy-Butler edited
https://github.com/llvm/llvm-project/pull/89512
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
JustinStitt wrote:
@efriedma-quic said:
> I'm still not happy with the AST representation here. The current
> representation is likely to cause unpredictable results in edge cases, and
> compatibility constraints mean whatever result the current version happens to
> produce for those cases is
andykaylor wrote:
I've made extensive changes to the fast-math.c test here:
https://github.com/llvm/llvm-project/pull/89687
That update isn't intended to change any existing behavior. A few things worked
differently than I expected, but I left the checks consistent with the current
behavior a
https://github.com/rjmccall approved this pull request.
This seems fine. Is there any existing bookkeeping we no longer need to do if
we're going to have this RAII object in scope during function parsing?
https://github.com/llvm/llvm-project/pull/85605
_
Midar wrote:
These symbols are just used to deduplicate strings: That's why they're hidden
and in COMDAT. So I don't think it'll break or fix the ABI ;).
https://github.com/llvm/llvm-project/pull/88713
___
cfe-commits mailing list
cfe-commits@lists.ll
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Andy Kaylor (andykaylor)
Changes
- Fix -fno-unsafe-math-optimizations behavior
- [WIP] Major change to fast-math.c lit test
- Clean up the checks in the fast-math driver test
---
Patch is 26.79 KiB, truncated to 20.00 KiB below, full ver
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/89687
- Fix -fno-unsafe-math-optimizations behavior
- [WIP] Major change to fast-math.c lit test
- Clean up the checks in the fast-math driver test
>From 100fc9dfb2b071877d758ce71bddeec693d986da Mon Sep 17 00:00:00
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -verify -fsyntax-only -triple x86_64-pc-linux-gnu
+// expected-no-diagnostics
+typedef int __attribute__((wraps)) wrapping_int;
+
+void foo(void) {
+ const wrapping_int A = 1;
+ int D = 2147483647 + A;
JustinStitt wrote:
O
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/86618
>From 50e7b1039e514dacc05bb8cd9ff9a3e3df9ed24d Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 5 Mar 2024 03:14:49 +
Subject: [PATCH 01/13] implement wraps attribute
Signed-off-by: Justin Stitt
-
@@ -4249,6 +4270,10 @@ Value *ScalarExprEmitter::EmitFixedPointBinOp(const
BinOpInfo &op) {
Value *ScalarExprEmitter::EmitSub(const BinOpInfo &op) {
// The LHS is always a pointer if either side is.
if (!op.LHS->getType()->isPointerTy()) {
+if ((op.Ty->isSignedIntegerO
@@ -4455,6 +4455,14 @@ void Sema::AddAlignValueAttr(Decl *D, const
AttributeCommonInfo &CI, Expr *E) {
D->addAttr(::new (Context) AlignValueAttr(Context, CI, E));
}
+static void handleWrapsAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ S.AddWrapsAttr(D, AL);
+}
+
+void S
@@ -4093,6 +4109,11 @@ Value *ScalarExprEmitter::EmitAdd(const BinOpInfo &op) {
op.RHS->getType()->isPointerTy())
return emitPointerArithmetic(CGF, op, CodeGenFunction::NotSubtraction);
+ if ((op.Ty->isSignedIntegerOrEnumerationType() ||
JustinStitt
@@ -2831,6 +2840,9 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const
UnaryOperator *E, LValue LV,
} else if (type->isIntegerType()) {
QualType promotedType;
bool canPerformLossyDemotionCheck = false;
+BinOpInfo Ops = (createBinOpInfoFromIncDec(
@@ -156,6 +156,10 @@ struct BinOpInfo {
}
return false;
}
+
+ /// Does the BinaryOperator have the wraps attribute?
+ /// If so, we can ellide overflow sanitizer checks.
JustinStitt wrote:
fixed in
[872e5d6](https://github.com/llvm/llvm-project/pu
@@ -4077,6 +4077,9 @@ class BinaryOperator : public Expr {
static unsigned sizeOfTrailingObjects(bool HasFPFeatures) {
return HasFPFeatures * sizeof(FPOptionsOverride);
}
+
+ /// Do one of the subexpressions have the wraps attribute?
JustinStitt wrote:
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/86618
>From 50e7b1039e514dacc05bb8cd9ff9a3e3df9ed24d Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 5 Mar 2024 03:14:49 +
Subject: [PATCH 01/12] implement wraps attribute
Signed-off-by: Justin Stitt
-
https://github.com/topperc updated
https://github.com/llvm/llvm-project/pull/89684
>From fc51e3821787f1ae8dcb344d4def0ef342ae473b Mon Sep 17 00:00:00 2001
From: Craig Topper
Date: Thu, 18 Apr 2024 16:47:31 -0700
Subject: [PATCH 1/8] [RISCV][TableGen] Generate RISCVTargetParser.inc from the
new
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 92631a4824a91f3268a5716dd3459df8dc6bfb63
ee9180aff45af55797d2e97c1b65f9c35b5c8a24 --
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/86618
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4093,6 +4109,11 @@ Value *ScalarExprEmitter::EmitAdd(const BinOpInfo &op) {
op.RHS->getType()->isPointerTy())
return emitPointerArithmetic(CGF, op, CodeGenFunction::NotSubtraction);
+ if ((op.Ty->isSignedIntegerOrEnumerationType() ||
JustinStitt
llvmbot wrote:
@llvm/pr-subscribers-lld-elf
Author: Craig Topper (topperc)
Changes
This introduces a new file, RISCVISAUtils.cpp and moves the rest of
RISCVISAInfo to the TargetParser library.
This will allow us to generate part of RISCVISAInfo.cpp using tablegen.
---
Patch is 43.0
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Craig Topper (topperc)
Changes
This introduces a new file, RISCVISAUtils.cpp and moves the rest of
RISCVISAInfo to the TargetParser library.
This will allow us to generate part of RISCVISAInfo.cpp using tablegen.
---
Patch is 43.02
https://github.com/topperc created
https://github.com/llvm/llvm-project/pull/89684
This introduces a new file, RISCVISAUtils.cpp and moves the rest of
RISCVISAInfo to the TargetParser library.
This will allow us to generate part of RISCVISAInfo.cpp using tablegen.
>From fc51e3821787f1ae8d
https://github.com/rjmccall edited
https://github.com/llvm/llvm-project/pull/88713
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjmccall commented:
At first, I was worried that this was an ABI break. Then I noticed the
internal inconsistency within this single file, and so I became worried that it
was an ABI *fix*. But then I noticed that the normal selector-emission code
actually makes these strin
ille-apple wrote:
Rebased, because the original version failed CI due to a regression on `main`
(#89476).
https://github.com/llvm/llvm-project/pull/89475
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/li
https://github.com/ille-apple updated
https://github.com/llvm/llvm-project/pull/89475
>From 9c61a1d684a15153ea73e2036cdf978ff187c44d Mon Sep 17 00:00:00 2001
From: ille-apple
Date: Fri, 19 Apr 2024 15:36:44 -0700
Subject: [PATCH] [clang] Fix self-capturing `__block` variables
Clang special-cas
bwendling wrote:
Friendly ping 2: Electric Boogaloo
https://github.com/llvm/llvm-project/pull/86858
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,274 @@
+//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
JDevlieghere wrote:
This looks like a nice improvement for folks using those generators. Even
though most of these changes look straightforward, it would be a lot easier to
review if this was broken up per subproject. Is there any reason that's not
possible?
https://github.com/llvm/llvm-proj
@@ -0,0 +1,34 @@
+//===--- ReturnConstRefFromParameterCheck.cpp - clang-tidy
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -4077,6 +4077,9 @@ class BinaryOperator : public Expr {
static unsigned sizeOfTrailingObjects(bool HasFPFeatures) {
return HasFPFeatures * sizeof(FPOptionsOverride);
}
+
+ /// Do one of the subexpressions have the wraps attribute?
bwendling wrote:
@@ -4249,6 +4270,10 @@ Value *ScalarExprEmitter::EmitFixedPointBinOp(const
BinOpInfo &op) {
Value *ScalarExprEmitter::EmitSub(const BinOpInfo &op) {
// The LHS is always a pointer if either side is.
if (!op.LHS->getType()->isPointerTy()) {
+if ((op.Ty->isSignedIntegerO
@@ -2831,6 +2840,9 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const
UnaryOperator *E, LValue LV,
} else if (type->isIntegerType()) {
QualType promotedType;
bool canPerformLossyDemotionCheck = false;
+BinOpInfo Ops = (createBinOpInfoFromIncDec(
@@ -4455,6 +4455,14 @@ void Sema::AddAlignValueAttr(Decl *D, const
AttributeCommonInfo &CI, Expr *E) {
D->addAttr(::new (Context) AlignValueAttr(Context, CI, E));
}
+static void handleWrapsAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ S.AddWrapsAttr(D, AL);
+}
+
+void S
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -verify -fsyntax-only -triple x86_64-pc-linux-gnu
+// expected-no-diagnostics
+typedef int __attribute__((wraps)) wrapping_int;
+
+void foo(void) {
+ const wrapping_int A = 1;
+ int D = 2147483647 + A;
bwendling wrote:
How
@@ -4093,6 +4109,11 @@ Value *ScalarExprEmitter::EmitAdd(const BinOpInfo &op) {
op.RHS->getType()->isPointerTy())
return emitPointerArithmetic(CGF, op, CodeGenFunction::NotSubtraction);
+ if ((op.Ty->isSignedIntegerOrEnumerationType() ||
bwendling w
@@ -156,6 +156,10 @@ struct BinOpInfo {
}
return false;
}
+
+ /// Does the BinaryOperator have the wraps attribute?
+ /// If so, we can ellide overflow sanitizer checks.
bwendling wrote:
s/ellide/elide/
https://github.com/llvm/llvm-project/pull/86
@@ -3379,6 +3379,60 @@ Query for this feature with
``__has_builtin(__builtin_debugtrap)``.
Query for this feature with ``__has_builtin(__builtin_trap)``.
+``__builtin_verbose_trap``
dwblaikie wrote:
Ah, OK - that seems like more reason the prefix should be
efriedma-quic wrote:
I'm still not happy with the AST representation here. The current
representation is likely to cause unpredictable results in edge cases, and
compatibility constraints mean whatever result the current version happens to
produce for those cases is locked in forever. And th
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -verify %s
+
+#if !__has_builtin(__builtin_verbose_trap)
+#error
+#endif
+
+constexpr char const* constMsg1 = "hello";
+char const* const constMsg2 = "hello";
+char const constMsg3[] = "hello";
+
+templ
@@ -406,5 +426,13 @@ function(llvm_ExternalProject_Add name source_dir)
WORKING_DIRECTORY ${BINARY_DIR}
VERBATIM
USES_TERMINAL)
+if (ARG_FOLDER)
+ set_target_properties(${target} PROPERTIES FOLDER "${ARG_FOLDER}")
+endif ()
endforeach()
+
+ #s
@@ -458,6 +458,40 @@ let TargetGuard = "sme2,sme-f64f64" in {
def SVMLS_LANE_VG1x4_F64 : Inst<"svmls_lane_za64[_{d}]_vg1x4", "vm4di", "d",
MergeNone, "aarch64_sme_fmls_lane_vg1x4", [IsStreaming, IsInOutZA],
[ImmCheck<3, ImmCheck0_1>]>;
}
+let TargetGuard = "sme2p1,sme-f16f
@@ -3424,6 +3445,26 @@ llvm::DIMacroFile
*CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent,
return DBuilder.createTempMacroFile(Parent, Line, FName);
}
+llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor(
ahatanaka wrote:
OK, I'll make it
@@ -56,11 +56,13 @@ endfunction()
# Use provided strip tool instead of the default one.
# TARGET_TRIPLE triple
# Optional target triple to pass to the compiler
+# FOLDER
+# For IDEs, the Folder to put the targets into.=
Meinersbur wrote:
It's a
andykaylor wrote:
I've made some minor changes to clean up the LIT test checks for this PR. I
started to clean up the entire test, but it quickly became obvious that I
should put that into a separate PR.
I will submit a new PR to clean up the entire fast-math.c test. I have an idea
that I thi
@@ -271,30 +271,32 @@
// RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
// RUN: %clang -### -funsafe-math-optimizations -fno-reciprocal-math -c %s \
-// RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
+// RUN: 2>&1 | FileCheck --check-prefix=CH
@@ -318,12 +320,12 @@
// RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \
// RUN: -fno-trapping-math -ftrapping-math -c %s 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-NO-REASSOC-NO-UNSAFE-MATH %s
+// RUN: | FileCheck --check-prefix=CHECK-N
https://github.com/bwendling updated
https://github.com/llvm/llvm-project/pull/89462
>From 2a6b3356a977132459bed84fb4e4add631e181cb Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Fri, 19 Apr 2024 15:06:34 -0700
Subject: [PATCH 1/2] [Clang][NFC] Improve testing for the flexible array
member
@@ -3424,6 +3445,26 @@ llvm::DIMacroFile
*CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent,
return DBuilder.createTempMacroFile(Parent, Line, FName);
}
+llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor(
dwblaikie wrote:
I think I agree
1 - 100 of 478 matches
Mail list logo