https://github.com/paulwalker-arm approved this pull request.
https://github.com/llvm/llvm-project/pull/101644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ilya-biryukov wrote:
> I am not super comfortable with enabling the diagnostic by default because
> it's not something the user can do anything about aside from disable the
> diagnostic (which means they'll report one issue and probably never report
> another again because they disabled the wa
VitaNuo wrote:
> I am not super comfortable with enabling the diagnostic by default because
> it's not something the user can do anything about aside from disable the
> diagnostic (which means they'll report one issue and probably never report
> another again because they disabled the warning
=?utf-8?q?Donát?= Nagy ,
=?utf-8?q?Donát?= Nagy ,
=?utf-8?q?Donát?= Nagy
Message-ID:
In-Reply-To:
@@ -299,13 +299,12 @@ ANALYZER_OPTION(
ANALYZER_OPTION(
bool, ShouldEagerlyAssume, "eagerly-assume",
-"Whether we should eagerly assume evaluations of conditionals, thu
=?utf-8?q?Donát?= Nagy ,
=?utf-8?q?Donát?= Nagy ,
=?utf-8?q?Donát?= Nagy
Message-ID:
In-Reply-To:
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/112209
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://list
=?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 = Pred->getState();
-SVal
=?utf-8?q?Don=C3=A1t?= Nagy ,
=?utf-8?q?Don=C3=A1t?= Nagy ,
=?utf-8?q?Don=C3=A1t?= Nagy
Message-ID:
In-Reply-To:
https://github.com/steakhal commented:
Looks good to me overall.
https://github.com/llvm/llvm-project/pull/112209
___
cfe-commits mailin
=?utf-8?q?Donát?= Nagy ,
=?utf-8?q?Donát?= Nagy ,
=?utf-8?q?Donát?= Nagy
Message-ID:
In-Reply-To:
@@ -3742,23 +3742,20 @@ void ExprEngine::evalLocation(ExplodedNodeSet &Dst,
BldrTop.addNodes(Tmp);
}
-std::pair
-ExprEngine::geteagerlyAssumeBinOpBifurcationTags() {
- stati
@@ -3767,28 +3764,26 @@ void
ExprEngine::evalEagerlyAssumeBinOpBifurcation(ExplodedNodeSet &Dst,
continue;
}
-ProgramStateRef state = Pred->getState();
-SVal V = state->getSVal(Ex, Pred->getLocationContext());
+ProgramStateRef State = Pred->getState();
+
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/112081
>From 67c41612085489a2a17eec49f98dbfa0e5bb97cf Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 12 Oct 2024 08:27:51 +0300
Subject: [PATCH] [Clang] fix range calculation for conditionals with throw
expr
Author: Gábor Spaits
Date: 2024-10-15T10:19:17+02:00
New Revision: 48521209aa4d95a97564f8a5af7ccca09c6ede5d
URL:
https://github.com/llvm/llvm-project/commit/48521209aa4d95a97564f8a5af7ccca09c6ede5d
DIFF:
https://github.com/llvm/llvm-project/commit/48521209aa4d95a97564f8a5af7ccca09c6ede5d.diff
https://github.com/spaits closed
https://github.com/llvm/llvm-project/pull/112166
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -171,7 +171,7 @@ bool HexagonGenExtract::convert(Instruction *In) {
// this value.
if (!LogicalSR && (SR > SL))
return false;
-APInt A = APInt(BW, ~0ULL).lshr(SR).shl(SL);
+APInt A = APInt(BW, ~0ULL, true).lshr(SR).shl(SL);
nikic wrote:
@@ -0,0 +1,30 @@
+/// Test -m[no]frecipe options.
+
+// RUN: %clang --target=loongarch64 -mfrecipe -fsyntax-only %s -### 2>&1 | \
+// RUN: FileCheck %s --check-prefix=CC1-FRECIPE
+// RUN: %clang --target=loongarch64 -mno-frecipe -fsyntax-only %s -### 2>&1 | \
+// RUN: File
https://github.com/SixWeining approved this pull request.
LGTM except a nit.
https://github.com/llvm/llvm-project/pull/109917
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SixWeining edited
https://github.com/llvm/llvm-project/pull/109917
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tbaederr closed
https://github.com/llvm/llvm-project/pull/112335
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Timm Baeder
Date: 2024-10-15T12:49:32+02:00
New Revision: 790d986946596601450969758d126d171586357e
URL:
https://github.com/llvm/llvm-project/commit/790d986946596601450969758d126d171586357e
DIFF:
https://github.com/llvm/llvm-project/commit/790d986946596601450969758d126d171586357e.diff
L
https://github.com/guoxin049 updated
https://github.com/llvm/llvm-project/pull/109628
>From fd33eac604ca44fe744c645d40aa903b10d174c3 Mon Sep 17 00:00:00 2001
From: gxlayer <15179+guoxin...@users.noreply.github.com>
Date: Sat, 21 Sep 2024 18:16:48 +0800
Subject: [PATCH] fix issues 108019
---
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/112325
>From ca1b950315b5fd098ead7bcbe582935bf2c2b3bd Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 15 Oct 2024 00:21:11 -0700
Subject: [PATCH 1/3] [clang-format] Add RemoveEmptyLinesInUnwrappedLines
option
Fixes
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
nikic wrote:
> `APInt::getAllOnes` will assert if `BitWidth == 0`.
>
> [snip]
For the record, this is fixed by
https://github.com/llvm/llvm-project/pull/112227.
https://github.com/llvm/llvm-project/pull/80309
___
cfe-commits mailing list
cfe-commits
@@ -273,8 +273,6 @@ PreservedAnalyses FunctionToLoopPassAdaptor::run(Function
&F,
llvm::any_cast(&IR));
const Loop **LPtr = llvm::any_cast(&IR);
const Loop *L = LPtr ? *LPtr : nullptr;
-if (!L)
- L = &llvm::any_cast(IR)->getOutermostLoop();
https://github.com/nikic approved this pull request.
LLVM changes LGTM
https://github.com/llvm/llvm-project/pull/108051
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/108051
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
spaits wrote:
The windows CI passes. The linux CI fails, but it also fails on other clang
fronted PRs (see https://github.com/llvm/llvm-project/pull/112289 for example).
I think this failure is unrelated to this PR. I will merge this.
https://github.com/llvm/llvm-project/pull/112166
__
https://github.com/zygoloid commented:
Can we remove `getAddressOfPointer` instead?. Where is it being used?
https://github.com/llvm/llvm-project/pull/111995
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
ywgrit wrote:
> > How about now?
>
> The patch doesn't touch lld, so my suggestion is "[Driver] Default enable
> LoongArch linker relaxation".
>
Thanks, the title has changed.
> Some additional comments:
>
> * Do we need to consider the `-gsplit-dwarf` issue [MC: "error: A dwo section
> may
@@ -17257,8 +17258,11 @@ void
Sema::PushExpressionEvaluationContext(
ExpressionEvaluationContext NewContext, ReuseLambdaContextDecl_t,
ExpressionEvaluationContextRecord::ExpressionKind ExprContext) {
- Decl *ClosureContextDecl = ExprEvalContexts.back().ManglingContextD
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/80309
>From 96795194fc79359363bac0423516da2a06733047 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Thu, 19 Sep 2024 17:27:13 +0200
Subject: [PATCH 1/2] apint only
---
clang/lib/AST/ByteCode/IntegralAP.h |
@@ -1159,7 +1159,9 @@ class ARMOperand : public MCParsedAsmOperand {
if (!isImm()) return false;
const MCConstantExpr *CE = dyn_cast(getImm());
if (!CE) return false;
nikic wrote:
Not quite, but this put me on the right path. I added a check for `i
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/112111
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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",
@@ -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'?}}
+//
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
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 01/10] start working on lifetime capture
---
clang/include/clang/
jyknight wrote:
Some projects still seem to have a requirement for compatibility with GCC 4.8
-- which supports a lot of C++11 but didn't apply the change in CWG 1473, and
thus _require_ the space in `operator"" _udl`. That is somewhat unfortunate.
Two examples from the first page of github se
https://github.com/zmodem updated
https://github.com/llvm/llvm-project/pull/112378
>From f44ba22a8e5232b3f1e4a680565acd5604a7016c Mon Sep 17 00:00:00 2001
From: Hans Wennborg
Date: Tue, 15 Oct 2024 17:18:45 +0200
Subject: [PATCH 1/2] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG
for
@@ -17257,8 +17258,11 @@ void
Sema::PushExpressionEvaluationContext(
ExpressionEvaluationContext NewContext, ReuseLambdaContextDecl_t,
ExpressionEvaluationContextRecord::ExpressionKind ExprContext) {
- Decl *ClosureContextDecl = ExprEvalContexts.back().ManglingContextD
@@ -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",
https://github.com/topperc edited
https://github.com/llvm/llvm-project/pull/111481
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tru approved this pull request.
LGTM! Thanks for doing that!
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
https://github.com/vgvassilev updated
https://github.com/llvm/llvm-project/pull/109024
>From 983e3e9efb3a090d1ef4c232a2912d3abc9ffdf4 Mon Sep 17 00:00:00 2001
From: Thomas Fransham
Date: Wed, 28 Aug 2024 16:08:52 +0100
Subject: [PATCH 1/8] Update llvm::Registry to work for LLVM shared library
@@ -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
+ const int &defaultparam_array([[clang::lifetimebou
https://github.com/higher-performance updated
https://github.com/llvm/llvm-project/pull/112047
>From 604835395cd4006cb0344e94553191035fe4cbfb Mon Sep 17 00:00:00 2001
From: higher-performance
Date: Fri, 11 Oct 2024 17:09:13 -0400
Subject: [PATCH] Make [[clang::lifetimebound]] work for expressio
@@ -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
+ const int &defaultparam_array([[clang::lifetimebou
@@ -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
+ const int &defaultparam_array([[clang::lifetimebou
@@ -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
+ const int &defaultparam_array([[clang::lifetimebou
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/112371
>From b4c0afe1b691ce4e48b74884ac771a7038bd5de2 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Tue, 15 Oct 2024 14:46:59 +
Subject: [PATCH 1/2] [clang] Dedupliate the logic that only warns once when
st
@@ -1383,6 +1394,15 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
<< nextPathEntryRange(Path, I + 1, L);
break;
}
+
+ case IndirectLocalPathEntry::DefaultArg: {
+const auto *DAE = cast(Elem.E);
+SemaRef.Diag(DAE->getParam()->
@@ -198,3 +198,12 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr
&AL) {
handleSimpleAttribute(*this, D, AL);
}
+
+void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) {
+ ParsedType PT = AL.getTypeArg();
+ TypeSourceInfo *TSI = nullptr;
+
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
@llvm/pr-subscribers-clang-modules
Author: Boaz Brickner (bricknerb)
Changes
Zero diff in behavior.
---
Full diff: https://github.com/llvm/llvm-project/pull/112371.diff
10 Files Affected:
- (modified) clang/include/clang/Basic/Stack.h (
https://github.com/ymand approved this pull request.
modulo the requests for tests. This looks great!
https://github.com/llvm/llvm-project/pull/111006
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
@@ -0,0 +1,217 @@
+//===- unittests/Analysis/FlowSensitive/CachedConstAccessorsLatticeTest.cpp
==//
+//
+// 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,218 @@
+//===-- CachedConstAccessorsLattice.h ---*- 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: Ap
@@ -0,0 +1,218 @@
+//===-- CachedConstAccessorsLattice.h ---*- 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: Ap
https://github.com/ymand edited 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
https://github.com/ilya-biryukov created
https://github.com/llvm/llvm-project/pull/112380
Instead of the pragmas, which are less familiar to people.
This is a follow-up of a discussion from #111992.
>From 2089e3def4c37adec62e85e10af3cd51939e5932 Mon Sep 17 00:00:00 2001
From: Ilya Biryukov
Dat
Mick235711 wrote:
> I don’t really see that happening for nodiscard tho—making only some
> overloads nodiscard instead of none or all of them just seems like a really
> weird thing to do personally...
I think there is still some merits for these kind of overload sets. For
instance, API like
@@ -10057,15 +10057,18 @@ void ASTReader::finishPendingActions() {
// For a function defined inline within a class template, force the
// canonical definition to be the one inside the canonical definition of
// the template. This ensures that we instantiate fr
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Ilya Biryukov (ilya-biryukov)
Changes
Instead of the pragmas, which are less familiar to people.
This is a follow-up of a discussion from #111992.
---
Full diff: https://github.com/llvm/llvm-project/pull/112380.diff
1 Files Affected:
-
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
https://github.com/ilya-biryukov updated
https://github.com/llvm/llvm-project/pull/112015
>From b6508a13d1a115bb3acb54590833674f4158814c Mon Sep 17 00:00:00 2001
From: Ilya Biryukov
Date: Thu, 19 Sep 2024 20:18:36 +0200
Subject: [PATCH 1/2] [ASTWriter] Detect more non-affecting FileIDs to reduc
@@ -192,13 +201,13 @@ GetAffectingModuleMaps(const Preprocessor &PP, Module
*RootModule) {
// The containing module map is affecting, because it's being pointed
// into by Module::DefinitionLoc.
- if (auto FE = MM.getContainingModuleMapFile(Mod))
-Mod
https://github.com/bricknerb created
https://github.com/llvm/llvm-project/pull/112371
Zero diff in behavior.
>From b4c0afe1b691ce4e48b74884ac771a7038bd5de2 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Tue, 15 Oct 2024 14:46:59 +
Subject: [PATCH] [clang] Dedupliate the logic that only
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 f314e12494ed73290983a7db8e15c21578f437b3
b4c0afe1b691ce4e48b74884ac771a7038bd5de2 --e
https://github.com/Sirraide commented:
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 fo
https://github.com/Sirraide approved this pull request.
LGTM
A few more tests fo errors would be nice maybe (e.g. bit-casting a `_Complex
int` to an `int` or sth like that), but I don’t think they’re required.
https://github.com/llvm/llvm-project/pull/109981
___
@@ -10057,15 +10057,18 @@ void ASTReader::finishPendingActions() {
// For a function defined inline within a class template, force the
// canonical definition to be the one inside the canonical definition of
// the template. This ensures that we instantiate fr
Sirraide wrote:
> There seems to exist a discrepancy between `[[deprecated]]` and
> `[[nodiscard]]`. The former generates a warning on the usage of the function,
> together with a note on the declaration of the function. In contrast, the
> latter only generates a warning.
As I said, I feel li
https://github.com/jurahul updated
https://github.com/llvm/llvm-project/pull/112317
>From a0b77a500db2147a57d77f575b65c0c38af0c2f8 Mon Sep 17 00:00:00 2001
From: Rahul Joshi
Date: Mon, 14 Oct 2024 23:12:24 -0700
Subject: [PATCH] [Clang][TableGen] NeonEmitter
---
clang/utils/TableGen/NeonEmitt
https://github.com/jurahul updated
https://github.com/llvm/llvm-project/pull/112318
>From 2fe295768c87dca53e4cecd8a93f6936de0fe50c Mon Sep 17 00:00:00 2001
From: Rahul Joshi
Date: Mon, 14 Oct 2024 22:56:07 -0700
Subject: [PATCH] [Clang][TableGen] Use const pointer for various `Init`
pointers.
Sirraide wrote:
> for `nodiscard`, I don’t think you really care that much
Ah, 1 more case that comes to mind for `deprecated` is if you have several
overloads, and only one of the is deprecated. I don’t really see that happening
for `nodiscard` tho—making only *some* overloads `nodiscard` ins
https://github.com/jurahul updated
https://github.com/llvm/llvm-project/pull/112321
>From 4743134d6b6ef21fc6b09dea59c30d6be31ef3fd Mon Sep 17 00:00:00 2001
From: Rahul Joshi
Date: Mon, 14 Oct 2024 23:01:19 -0700
Subject: [PATCH] [Clang][TableGen] Use const pointers for various `Init *`
pointer
https://github.com/jthackray approved this pull request.
LGTM.
https://github.com/llvm/llvm-project/pull/112341
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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
https://github.com/sdkrystian created
https://github.com/llvm/llvm-project/pull/112381
After #111852 refactored multi-level template argument list collection, the
following results in a crash:
```cpp
template
struct A;
template
struct A
{
void f() requires B;
};
template
void A::f() requi
@@ -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
Sirraide wrote:
> Here the specialization is named, which is potentially helpful.
Hmm, the diagnostic for the error here isn’t particularly great to begin with;
I feel like it should instead mention that the return *type*, not the function,
is marked `nodiscard`, which might be enough to fix t
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Krystian Stasiowski (sdkrystian)
Changes
After #111852 refactored multi-level template argument list collection,
the following results in a crash:
```cpp
template
struct A;
template
struct A
{
void
@@ -2235,3 +2280,107 @@ QualType SemaHLSL::getInoutParameterType(QualType Ty) {
Ty.addRestrict();
return Ty;
}
+
+void SemaHLSL::ActOnVariableDeclarator(VarDecl *VD) {
+ if (VD->hasGlobalStorage()) {
+// make sure the declaration has a complete type
+if (SemaRef.Re
@@ -102,6 +152,15 @@ class SemaHLSL : public SemaBase {
llvm::DenseMap
LocsForHLSLAttributedResources;
+
+ // List of all resource bindings
+ ResourceBindings Bindings;
+
+private:
+ void FindResourcesOnVarDecl(VarDecl *D);
+ void FindResourcesOnUserRecordDecl(const
@@ -2235,3 +2280,107 @@ QualType SemaHLSL::getInoutParameterType(QualType Ty) {
Ty.addRestrict();
return Ty;
}
+
+void SemaHLSL::ActOnVariableDeclarator(VarDecl *VD) {
+ if (VD->hasGlobalStorage()) {
+// make sure the declaration has a complete type
+if (SemaRef.Re
@@ -4593,6 +4593,44 @@ def HLSLResourceBinding: InheritableAttr {
let LangOpts = [HLSL];
let Args = [StringArgument<"Slot">, StringArgument<"Space", 1>];
let Documentation = [HLSLResourceBindingDocs];
+ let AdditionalMembers = [{
+ enum class RegisterType : unsigned
@@ -985,88 +1026,92 @@ SemaHLSL::TakeLocForHLSLAttribute(const
HLSLAttributedResourceType *RT) {
return LocInfo;
}
-// get the record decl from a var decl that we expect
-// represents a resource
-static CXXRecordDecl *getRecordDeclFromVarDecl(VarDecl *VD) {
- const Type *
@@ -83,6 +81,49 @@ static RegisterType getRegisterType(StringRef Slot) {
}
}
+static ResourceClass getResourceClass(RegisterType RT) {
+ switch (RT) {
+ case RegisterType::SRV:
+return ResourceClass::SRV;
+ case RegisterType::UAV:
+return ResourceClass::UAV;
+ ca
@@ -985,88 +1026,92 @@ SemaHLSL::TakeLocForHLSLAttribute(const
HLSLAttributedResourceType *RT) {
return LocInfo;
}
-// get the record decl from a var decl that we expect
-// represents a resource
-static CXXRecordDecl *getRecordDeclFromVarDecl(VarDecl *VD) {
- const Type *
Sirraide wrote:
I.e. could we get it to emit something like:
```console
:10:5: warning: ignoring return value of type 'S' declared with
'nodiscard' attribute [-Wunused-result]
10 | getS(2);
| ^~~~ ~
1 warning generated.
```
https://github.com/llvm/llvm-project/pull/112289
_
https://github.com/sdkrystian edited
https://github.com/llvm/llvm-project/pull/112381
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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
@@ -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'?}}
+//
https://github.com/sookach updated
https://github.com/llvm/llvm-project/pull/112111
>From 64bde2ed7a39d5e270a7d1daca3a30a2cde6e0db 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
@@ -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",
@@ -0,0 +1,222 @@
+; RUN: opt -S -dxil-finalize-linkage
-mtriple=dxil-unknown-shadermodel6.5-compute %s | FileCheck %s
+; RUN: llc %s --filetype=asm -o - | FileCheck %s
pow2clk wrote:
Yes, and this test expects them to. The exported functions start at line 137
https://github.com/Mick235711 updated
https://github.com/llvm/llvm-project/pull/112289
>From 2376ab367715ef2f7f77ffc4d5af21393af876bd Mon Sep 17 00:00:00 2001
From: Yihe Li
Date: Tue, 15 Oct 2024 08:13:22 +0800
Subject: [PATCH] [clang] Generate note on declaration for nodiscard-related
attribu
AaronBallman wrote:
Question for @StephanTLavavej and @CaseyCarter -- are there plans to do
something similar for C23 as done for C++23? (Anything else we need to do on
our end?)
https://github.com/llvm/llvm-project/pull/112378
___
cfe-commits mailin
https://github.com/arsenm updated
https://github.com/llvm/llvm-project/pull/111976
>From a8e3a3ddeae1ba406b6f64d8b71e302a907cdc51 Mon Sep 17 00:00:00 2001
From: Matt Arsenault
Date: Fri, 11 Oct 2024 14:33:32 +0400
Subject: [PATCH 1/2] clang: Remove requires system-linux from some driver
tests
https://github.com/asudarsa updated
https://github.com/llvm/llvm-project/pull/112245
>From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001
From: Arvind Sudarsanam
Date: Fri, 27 Sep 2024 13:03:12 -0700
Subject: [PATCH 1/4] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link
@@ -548,6 +548,11 @@ Miscellaneous Clang Crashes Fixed
- Fixed internal assertion firing when a declaration in the implicit global
module is found through ADL. (GH#109879)
+Leaf Functions Do Not Retain FP Bug Fixed
+^
+
+- Fixed ``-fno
https://github.com/asudarsa updated
https://github.com/llvm/llvm-project/pull/112245
>From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001
From: Arvind Sudarsanam
Date: Fri, 27 Sep 2024 13:03:12 -0700
Subject: [PATCH 1/5] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link
201 - 300 of 532 matches
Mail list logo