Author: Tim Creech
Date: 2024-04-29T14:54:14+08:00
New Revision: 66274eb9f7e7fc4b023343476c4d066e4413180a
URL:
https://github.com/llvm/llvm-project/commit/66274eb9f7e7fc4b023343476c4d066e4413180a
DIFF:
https://github.com/llvm/llvm-project/commit/66274eb9f7e7fc4b023343476c4d066e4413180a.diff
LO
https://github.com/williamweixiao closed
https://github.com/llvm/llvm-project/pull/88438
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/williamweixiao approved this pull request.
https://github.com/llvm/llvm-project/pull/88438
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/90301
>From 0e9d10029e6d498d3bc5a319ac0945cf23db230d Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Fri, 26 Apr 2024 17:01:35 -0700
Subject: [PATCH 1/4] Fix a crash introduced by 3d5e9ab by adding a nullptr
check.
--
@@ -186,3 +186,74 @@ class E {
#endif
template using D = int; // expected-note {{declared here}}
E ed; // expected-note {{instantiation of}}
+
+namespace non_functions {
+
+#if __cplusplus >= 201103L
+namespace PR88832 {
+template struct O {
+ static const T v = 0;
+};
+
+st
nikic wrote:
> btw we're still looking into a performance regression caused by #68882 that
> still repros with LLVM head, even after the SROA enhancements. this patch
> looks good, but can we hold off a bit on submitting this?
Sure!
https://github.com/llvm/llvm-project/pull/89872
@@ -944,43 +943,18 @@ Constant *SymbolicallyEvaluateGEP(const GEPOperator *GEP,
return ConstantExpr::getIntToPtr(C, ResTy);
}
- // Otherwise form a regular getelementptr. Recompute the indices so that
- // we eliminate over-indexing of the notional static type array bo
aeubanks wrote:
btw we're still looking into a performance regression caused by #68882 that
still repros with LLVM head, even after the SROA enhancements. this patch looks
good, but can we hold off a bit on submitting this?
https://github.com/llvm/llvm-project/pull/89872
__
@@ -944,43 +943,18 @@ Constant *SymbolicallyEvaluateGEP(const GEPOperator *GEP,
return ConstantExpr::getIntToPtr(C, ResTy);
}
- // Otherwise form a regular getelementptr. Recompute the indices so that
- // we eliminate over-indexing of the notional static type array bo
wangpc-pp wrote:
> > > @dyung Can you help me to comfirm whether the Windows builder is passing
> > > now? I don't have such environment. Thanks in advance!
> >
> >
> > Sure, I'll try it on our internal builder and see if it passes and let you
> > know the result.
>
> I can confirm that this
dyung wrote:
> > @dyung Can you help me to comfirm whether the Windows builder is passing
> > now? I don't have such environment. Thanks in advance!
>
> Sure, I'll try it on our internal builder and see if it passes and let you
> know the result.
I can confirm that this change builds successf
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/90376
>From 947096950049ac7047a26335a993e48c1fa5c16d Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Sun, 28 Apr 2024 14:24:30 +0800
Subject: [PATCH] [Clang][Sema] Fix a bug on template partial specialization
with issue o
https://github.com/CoTinker updated
https://github.com/llvm/llvm-project/pull/90389
>From 3c1aac31d879ebf172d2b9b6c9a351d967f72606 Mon Sep 17 00:00:00 2001
From: Longsheng Mou
Date: Sun, 28 Apr 2024 17:14:29 +0800
Subject: [PATCH] [X86_64] Fix empty field error in vaarg of C++.
Such struct typ
@@ -14638,6 +14649,8 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr
*E) {
return true;
}
+ case Builtin::BIfmin:
+ case Builtin::BIfminf:
hubert-reinterpretcast wrote:
Makes me wonder how far C++ stdlibs will get if they included the C libr
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/90301
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/90376
>From cb7acd79aea4af3e92b5317e55fb43cabc7ebb40 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Sun, 28 Apr 2024 14:24:30 +0800
Subject: [PATCH] [Clang][Sema] Fix a bug on template partial specialization
with issue o
https://github.com/AlexVlx updated
https://github.com/llvm/llvm-project/pull/89796
>From 662f160418c704f45e57e751168903d774b74303 Mon Sep 17 00:00:00 2001
From: Alex Voicu
Date: Tue, 23 Apr 2024 17:41:25 +0100
Subject: [PATCH 1/7] Add initial support for AMDGCN flavoured SPIRV.
---
clang/lib/
@@ -1115,7 +1115,9 @@ int64_t Decl::getID() const {
const FunctionType *Decl::getFunctionType(bool BlocksToo) const {
QualType Ty;
- if (const auto *D = dyn_cast(this))
+ if (const auto *D = dyn_cast(this))
chapuni wrote:
Seems causes the warning. `[-Wunu
https://github.com/yronglin updated
https://github.com/llvm/llvm-project/pull/89942
>From 8c5f1d0f92d77bffec88759c19133a0bac130f32 Mon Sep 17 00:00:00 2001
From: yronglin
Date: Wed, 24 Apr 2024 23:36:10 +0800
Subject: [PATCH 1/7] [Clang] Implement P2748R5 "Disallow Binding a Returned
Glvalue t
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/89850
>From f4e4e7b91e85d12c861063e1461b160b9bd22da6 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Mon, 29 Apr 2024 01:53:47 +0300
Subject: [PATCH] fix(85447): refine handling of incomplete anonymous struct
decl
jcsxky wrote:
Windows CI failed with an unrelated file.
https://github.com/llvm/llvm-project/pull/90376
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kiranchandramohan updated
https://github.com/llvm/llvm-project/pull/90420
>From 6a22c2de281bc04c9f71b7fcc8289e4217b70e08 Mon Sep 17 00:00:00 2001
From: Kiran Chandramohan
Date: Fri, 26 Apr 2024 09:26:11 +
Subject: [PATCH] [Flang][Driver] Add support for -w option
A quick
https://github.com/kiranchandramohan edited
https://github.com/llvm/llvm-project/pull/90420
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kiranchandramohan created
https://github.com/llvm/llvm-project/pull/90420
A quick and dirty implementation of the -w option. Filters the warning messages
generated by the Frontend during emission.
TODO: Add more tests
TODO: Ignore MLIR, LLVM IR and Driver warnings
TODO: Chec
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/89850
>From 484100917d034bc30131ebb95578d09083a2325a Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 24 Apr 2024 03:27:52 +0300
Subject: [PATCH] fix(85447): refine handling of incomplete anonymous struct
decl
https://github.com/rjmccall approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/90329
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,103 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+namespace std {
+ template
+ T&& move(T &x) {
+return static_cast(x);
+ }
+}
+
+void correct() {
+ try {
+ throw exception();
+ } catch(const
@@ -0,0 +1,103 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+namespace std {
isuckatcs wrote:
For the static analyzer we have `system-header-simulator-cxx.h`, maybe
clang-tidy would also benefit from
https://github.com/isuckatcs edited
https://github.com/llvm/llvm-project/pull/86448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,67 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,67 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,67 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
https://github.com/isuckatcs requested changes to this pull request.
Apart from a few typos in the docs and the lambda case, the patch looks good to
me.
https://github.com/llvm/llvm-project/pull/86448
___
cfe-commits mailing list
cfe-commits@lists.llv
@@ -0,0 +1,103 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+namespace std {
+ template
+ T&& move(T &x) {
isuckatcs wrote:
```suggestion
T&& move(T &&x) {
```
The official signature is the one b
@@ -0,0 +1,67 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,67 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/90378
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Owen Pan
Date: 2024-04-28T14:06:12-07:00
New Revision: aa596fa4d974f75ed8d2db3f4880ec0e5be3e176
URL:
https://github.com/llvm/llvm-project/commit/aa596fa4d974f75ed8d2db3f4880ec0e5be3e176
DIFF:
https://github.com/llvm/llvm-project/commit/aa596fa4d974f75ed8d2db3f4880ec0e5be3e176.diff
LOG:
Author: Owen Pan
Date: 2024-04-28T14:05:12-07:00
New Revision: 9c1de620344b2518bb171be51066e1ec9a5be623
URL:
https://github.com/llvm/llvm-project/commit/9c1de620344b2518bb171be51066e1ec9a5be623
DIFF:
https://github.com/llvm/llvm-project/commit/9c1de620344b2518bb171be51066e1ec9a5be623.diff
LOG:
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/90363
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/90378
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/90414
>From ffc4df724e043e8655824bc2b3deb4e2ef632579 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Sun, 28 Apr 2024 13:17:48 -0700
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Support more trivial
express
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/90414
>From 44bff2897be7531b33d558b711034aa98755a4cd Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Sun, 28 Apr 2024 13:17:48 -0700
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Support more trivial
express
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 3ec858bc5d45ee22ca99febd38e1ba188f71022c
9a39e456a41e415cca62866ca093708412871e00 --
@@ -54,7 +54,7 @@ class UncountedCallArgsChecker
bool shouldVisitImplicitCode() const { return false; }
bool TraverseDecl(Decl *D) {
-if (isa(D) && isRefType(safeGetName(D)))
+if (D && isa(D) && isRefType(safeGetName(D)))
return true;
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/90301
>From 0e9d10029e6d498d3bc5a319ac0945cf23db230d Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Fri, 26 Apr 2024 17:01:35 -0700
Subject: [PATCH 1/3] Fix a crash introduced by 3d5e9ab by adding a nullptr
check.
--
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 3ec858bc5d45ee22ca99febd38e1ba188f71022c
cc3b7f6c4d75aab856a8c31cc7ccfbcb5c6626e8 --
llvmbot wrote:
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-clang-static-analyzer-1
Author: Ryosuke Niwa (rniwa)
Changes
Treat a compound operator such as |=, array subscription, sizeof, and non-type
template parameter as trivial so long as subexpressions are also trivial.
Also treat
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/90414
Treat a compound operator such as |=, array subscription, sizeof, and non-type
template parameter as trivial so long as subexpressions are also trivial.
Also treat true/false boolean literal as trivial.
>From cc3b
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/90169
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -309,7 +309,45 @@ StringRef AMDGPU::getCanonicalArchName(const Triple &T,
StringRef Arch) {
void AMDGPU::fillAMDGPUFeatureMap(StringRef GPU, const Triple &T,
StringMap &Features) {
// XXX - What does the member GPU mean if device name str
@@ -0,0 +1,84 @@
+.. title:: clang-tidy - modernize-use-std-format
+
+modernize-use-std-format
+
+
+Converts calls to ``absl::StrFormat``, or other functions via
+configuration options, to C++20's ``std::format``, or another function
+via a configuration op
@@ -0,0 +1,107 @@
+//===--- UseStdFormatCheck.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
@@ -0,0 +1,84 @@
+.. title:: clang-tidy - modernize-use-std-format
+
+modernize-use-std-format
+
+
+Converts calls to ``absl::StrFormat``, or other functions via
+configuration options, to C++20's ``std::format``, or another function
+via a configuration op
@@ -0,0 +1,84 @@
+.. title:: clang-tidy - modernize-use-std-format
+
+modernize-use-std-format
+
+
+Converts calls to ``absl::StrFormat``, or other functions via
+configuration options, to C++20's ``std::format``, or another function
+via a configuration op
@@ -0,0 +1,107 @@
+//===--- UseStdFormatCheck.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/SimplyDanny edited
https://github.com/llvm/llvm-project/pull/90397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SimplyDanny approved this pull request.
Only a few nits concerning non-functional code/text. Other than that LGTM.
https://github.com/llvm/llvm-project/pull/90397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.
llvmbot wrote:
@llvm/pr-subscribers-clang-tidy
Author: Piotr Zegar (PiotrZSL)
Changes
Ignore optionals in unevaluated context, like static_assert or decltype.
Closes #89593
---
Full diff: https://github.com/llvm/llvm-project/pull/90410.diff
3 Files Affected:
- (modified)
clang-tools-
https://github.com/PiotrZSL created
https://github.com/llvm/llvm-project/pull/90410
Ignore optionals in unevaluated context, like static_assert or decltype.
Closes #89593
>From 7dcbe220d74f2be4ade8429e6c0e710d7d7c58a4 Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 28 Apr 2024 19:16:43
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/90378
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/90363
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin closed
https://github.com/llvm/llvm-project/pull/89906
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: cor3ntin
Date: 2024-04-28T20:25:44+02:00
New Revision: 6dd90616c477d83c156eed62c880e951bb508cfd
URL:
https://github.com/llvm/llvm-project/commit/6dd90616c477d83c156eed62c880e951bb508cfd
DIFF:
https://github.com/llvm/llvm-project/commit/6dd90616c477d83c156eed62c880e951bb508cfd.diff
LOG:
https://github.com/jhuber6 approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/89796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -54,3 +56,76 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions
&Opts,
BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder);
DefineStd(Builder, "SPIRV64", Opts);
}
+
+static const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {});
+
+ArrayRef S
@@ -54,3 +56,76 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions
&Opts,
BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder);
DefineStd(Builder, "SPIRV64", Opts);
}
+
+static const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {});
+
+ArrayRef S
@@ -54,3 +56,76 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions
&Opts,
BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder);
DefineStd(Builder, "SPIRV64", Opts);
}
+
+static const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {});
+
+ArrayRef S
@@ -309,7 +309,45 @@ StringRef AMDGPU::getCanonicalArchName(const Triple &T,
StringRef Arch) {
void AMDGPU::fillAMDGPUFeatureMap(StringRef GPU, const Triple &T,
StringMap &Features) {
// XXX - What does the member GPU mean if device name str
@@ -309,7 +309,45 @@ StringRef AMDGPU::getCanonicalArchName(const Triple &T,
StringRef Arch) {
void AMDGPU::fillAMDGPUFeatureMap(StringRef GPU, const Triple &T,
StringMap &Features) {
// XXX - What does the member GPU mean if device name str
@@ -309,7 +309,45 @@ StringRef AMDGPU::getCanonicalArchName(const Triple &T,
StringRef Arch) {
void AMDGPU::fillAMDGPUFeatureMap(StringRef GPU, const Triple &T,
StringMap &Features) {
// XXX - What does the member GPU mean if device name str
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/86448
>From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 24 Mar 2024 18:39:54 +
Subject: [PATCH 1/4] [clang-tidy] Added bugprone-exception-rethrow check
Identifie
@@ -0,0 +1,50 @@
+//===--- ExceptionRethrowCheck.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
@@ -0,0 +1,50 @@
+//===--- ExceptionRethrowCheck.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
@@ -0,0 +1,50 @@
+//===--- ExceptionRethrowCheck.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
@@ -0,0 +1,37 @@
+//===--- ExceptionRethrowCheck.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
@@ -0,0 +1,50 @@
+//===--- ExceptionRethrowCheck.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
@@ -0,0 +1,60 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+void correct() {
+ try {
+ throw exception();
+ } catch(const exception &) {
+ throw;
+ }
+}
+
+void correct2() {
+ try {
+ throw exception
@@ -6088,6 +6088,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
StringRef Prefix =
llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch());
if (!Prefix.empty()) {
+if (Prefix == "spv" &&
+getTarget().getTr
@@ -6088,6 +6088,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
StringRef Prefix =
llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch());
if (!Prefix.empty()) {
+if (Prefix == "spv" &&
+getTarget().getTr
@@ -6088,6 +6088,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
StringRef Prefix =
llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch());
if (!Prefix.empty()) {
+if (Prefix == "spv" &&
+getTarget().getTr
Author: Fangrui Song
Date: 2024-04-28T09:42:43-07:00
New Revision: 8ad092f126bd1d6f9fe6006eba1e3115a080235e
URL:
https://github.com/llvm/llvm-project/commit/8ad092f126bd1d6f9fe6006eba1e3115a080235e
DIFF:
https://github.com/llvm/llvm-project/commit/8ad092f126bd1d6f9fe6006eba1e3115a080235e.diff
@@ -0,0 +1,108 @@
+//===--- UseStdFormatCheck.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
@@ -0,0 +1,97 @@
+// RUN: %check_clang_tidy \
+// RUN: -std=c++20 %s modernize-use-std-format %t -- \
+// RUN: -config="{CheckOptions: [{key: StrictMode, value: true}]}" \
+// RUN: -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy \
+// RUN: -std=c++20 %s moderniz
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/90397
>From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sun, 28 Apr 2024 12:41:46 +0100
Subject: [PATCH 1/8] [clang-tidy] Add modernize-use-std-format check
Add a new cla
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 b6824c9d459da059e247a60c1ebd1aeb580dacc2
9b99b234ef4edb68fc6d9734595d53685e16927c --
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 b6824c9d459da059e247a60c1ebd1aeb580dacc2
6186c576e8ebfb80af7a58c6d8d24ca0f7277ade --
@@ -6088,6 +6088,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
StringRef Prefix =
llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch());
if (!Prefix.empty()) {
+if (Prefix == "spv" &&
+getTarget().getTr
https://github.com/AlexVlx updated
https://github.com/llvm/llvm-project/pull/89796
>From 662f160418c704f45e57e751168903d774b74303 Mon Sep 17 00:00:00 2001
From: Alex Voicu
Date: Tue, 23 Apr 2024 17:41:25 +0100
Subject: [PATCH 1/6] Add initial support for AMDGCN flavoured SPIRV.
---
clang/lib/
@@ -54,3 +56,77 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions
&Opts,
BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder);
DefineStd(Builder, "SPIRV64", Opts);
}
+
+namespace {
+const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {});
+
+} //
@@ -0,0 +1,97 @@
+// RUN: %check_clang_tidy \
+// RUN: -std=c++20 %s modernize-use-std-format %t -- \
+// RUN: -config="{CheckOptions: [{key: StrictMode, value: true}]}" \
+// RUN: -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy \
+// RUN: -std=c++20 %s moderniz
@@ -0,0 +1,48 @@
+//===--- UseStdFormatCheck.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
@@ -0,0 +1,84 @@
+.. title:: clang-tidy - modernize-use-std-format
+
+modernize-use-std-format
+
+
+Converts calls to ``absl::StrFormat``, or other functions via
+configuration options, to C++20's ``std::format``, or another function
+via a configuration op
@@ -627,7 +628,8 @@ void FormatStringConverter::finalizeFormatText() {
// It's clearer to convert printf("Hello\r\n"); to std::print("Hello\r\n")
// than to std::println("Hello\r");
- if (StringRef(StandardFormatString).ends_with("\\n") &&
+ if (Config.AllowTrailingNewli
@@ -0,0 +1,108 @@
+//===--- UseStdFormatCheck.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/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/90397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL approved this pull request.
To be honest I'm not sure why it wasn't merged, there were some dependences on
other changes and modernize-use-std-print check, and somehow it fall under
radar.
Overall looks fine. Please fix pointed out nits that pop up.
https://github.
@@ -0,0 +1,108 @@
+//===--- UseStdFormatCheck.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
@@ -54,3 +56,77 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions
&Opts,
BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder);
DefineStd(Builder, "SPIRV64", Opts);
}
+
+namespace {
+const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {});
+
+} //
@@ -54,3 +56,77 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions
&Opts,
BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder);
DefineStd(Builder, "SPIRV64", Opts);
}
+
+namespace {
+const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {});
+
+} //
1 - 100 of 156 matches
Mail list logo