https://github.com/efriedma-quic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/103917
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/91014
>From 88e4991013a05e26cece87d3989ad957a4e18e3d Mon Sep 17 00:00:00 2001
From: Reid Kleckner
Date: Wed, 4 Sep 2024 16:52:49 +
Subject: [PATCH 1/4] [clang] Fix FIXME in dynamic initializer emission, NFCI
This poten
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
Author: Reid Kleckner (rnk)
Changes
Governments around the world are starting to require labelling for AI-generated
content, and some LLVM stakeholders have asked if LLVM contains AI-generated
content. Defining a policy on the use of AI t
Author: Reid Kleckner
Date: 2024-09-04T17:34:26Z
New Revision: 601645c3b70e2a17d18779a3a51b8bc9ecdc9aa6
URL:
https://github.com/llvm/llvm-project/commit/601645c3b70e2a17d18779a3a51b8bc9ecdc9aa6
DIFF:
https://github.com/llvm/llvm-project/commit/601645c3b70e2a17d18779a3a51b8bc9ecdc9aa6.diff
LOG:
@@ -189,7 +189,7 @@ static StringRef NormalizeGNUAttrSpelling(StringRef
AttrSpelling) {
typedef std::vector> ParsedAttrMap;
-static ParsedAttrMap getParsedAttrList(const RecordKeeper &Records,
jurahul wrote:
And here's for the entire MLIR tablegen code:
ht
https://github.com/jurahul edited
https://github.com/llvm/llvm-project/pull/106658
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
@lukel97
If you can reduce, I would appreciate it.
You can also post here an unreduced pre-processed unit which compiles fine with
clang before this patch.
https://github.com/llvm/llvm-project/pull/100692
___
cfe-commits mailing lis
@@ -13559,6 +13562,27 @@ QualType Sema::CheckAssignmentOperands(Expr *LHSExpr,
ExprResult &RHS,
QualType LHSType = LHSExpr->getType();
QualType RHSType = CompoundType.isNull() ? RHS.get()->getType() :
CompoundType;
+
+ if (RHS.
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/106321
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane commented:
I did a pass, I think @Sirraide is on the right direction in his reviews here,
but the general direction of this patch is also completely acceptable.
https://github.com/llvm/llvm-project/pull/106321
___
cfe-com
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr
*E, bool CountInBytes,
return false;
}
+SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) {
+ // Note: This implementation relies on `CountAttributedType` being uniqu
@@ -3343,6 +3363,8 @@ class CountAttributedType final
static bool classof(const Type *T) {
return T->getTypeClass() == CountAttributed;
}
+
+ StringRef GetAttributeName(bool WithMacroPrefix) const;
erichkeane wrote:
```suggestion
StringRef getAttrib
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr
*E, bool CountInBytes,
return false;
}
+SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) {
erichkeane wrote:
I agree with Sirraide here, but would h
erichkeane wrote:
Rather than this being "not added in the header file", should we just make this
one of the attributes that is disallowed after the thing has been 'referenced'?
Or is that a dumb suggestion here?
https://github.com/llvm/llvm-project/pull/67520
https://github.com/erichkeane commented:
I've not done as in depth of a review as Corentin, but I approve of the
direction here, I think the approach is correct, and most of the changes are
fairly mechanical. So once Corentin is happy with the changes, so am I.
https://github.com/llvm/llvm-pr
https://github.com/SLTozer created
https://github.com/llvm/llvm-project/pull/107279
This is part of a series of patches that tries to improve DILocation bug
detection in Debugify; see below for more details. This is the patch that adds
the main feature, adding a set of `DebugLoc::get` function
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
Author: Stephen Tozer (SLTozer)
Changes
This is part of a series of patches that tries to improve DILocation bug
detection in Debugify; see below for more details. This is the patch that adds
the main feature, adding a set of `DebugLoc::g
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Stephen Tozer (SLTozer)
Changes
This is part of a series of patches that tries to improve DILocation bug
detection in Debugify; see below for more details. This is the patch that adds
the main feature, adding a set of `DebugLoc::get
https://github.com/eugenis created
https://github.com/llvm/llvm-project/pull/107280
Delay sanitizer arg parsing until after -Xclang flags are forwarded to the
clang command line. This allows the check in hasTargetFeaturMTE to pick up
manually specified target feature, and enables the following
https://github.com/eugenis edited
https://github.com/llvm/llvm-project/pull/107280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Evgenii Stepanov (eugenis)
Changes
Delay sanitizer arg parsing until after -Xclang flags are forwarded to the
clang command line. This allows the check in hasTargetFeatureMTE to pick up
manually specified target feature, and enables the f
@@ -4932,6 +4938,78 @@ class FunctionEffectsRef {
void dump(llvm::raw_ostream &OS) const;
};
+/// A mutable set of FunctionEffect::Kind.
+class FunctionEffectKindSet {
+ // For now this only needs to be a bitmap.
+ constexpr static size_t EndBitPos = 8;
+ using KindBitsT
https://github.com/fmayer approved this pull request.
https://github.com/llvm/llvm-project/pull/107280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -10950,6 +10950,51 @@ def warn_imp_cast_drops_unaligned : Warning<
InGroup>;
// Function effects
+def warn_func_effect_violation : Warning<
+ "'%0' %select{function|constructor|destructor|lambda|block|constructor's
member initializer}1 "
dougsonos wrote
@@ -15099,6 +15037,106 @@ class Sema final : public SemaBase {
std::string getFixItZeroLiteralForType(QualType T, SourceLocation Loc) const;
///@}
+
+ //
dougsonos wrote:
It's copied from the other groupings which separate methods (etc) which are
isolat
https://github.com/higher-performance updated
https://github.com/llvm/llvm-project/pull/102040
>From dc565488caf29366c3dc7257725a0b46fd00f11d Mon Sep 17 00:00:00 2001
From: higher-performance
Date: Mon, 5 Aug 2024 15:04:19 -0400
Subject: [PATCH] Add Clang attribute to ensure that fields are ini
@@ -10950,6 +10950,51 @@ def warn_imp_cast_drops_unaligned : Warning<
InGroup>;
// Function effects
+def warn_func_effect_violation : Warning<
+ "'%0' %select{function|constructor|destructor|lambda|block|constructor's
member initializer}1 "
erichkeane wrot
@@ -1419,6 +1419,28 @@ is not specified.
}];
}
+def ExplicitInitDocs : Documentation {
+ let Category = DocCatField;
+ let Content = [{
+The ``clang::explicit_init`` attribute indicates that the field must be
+initialized explicitly by the caller when the class is construc
@@ -15099,6 +15037,106 @@ class Sema final : public SemaBase {
std::string getFixItZeroLiteralForType(QualType T, SourceLocation Loc) const;
///@}
+
+ //
erichkeane wrote:
@endilll ?
https://github.com/llvm/llvm-project/pull/99656
__
@@ -4932,6 +4938,78 @@ class FunctionEffectsRef {
void dump(llvm::raw_ostream &OS) const;
};
+/// A mutable set of FunctionEffect::Kind.
+class FunctionEffectKindSet {
+ // For now this only needs to be a bitmap.
+ constexpr static size_t EndBitPos = 8;
+ using KindBitsT
@@ -5137,47 +5137,41 @@ StringRef FunctionEffect::name() const {
llvm_unreachable("unknown effect kind");
}
-bool FunctionEffect::canInferOnFunction(const Decl &Callee) const {
+std::optional FunctionEffect::effectProhibitingInference(
+const Decl &Callee, const Function
jyknight wrote:
If we don't keep the include-guard, then we'll report the same warning once per
`#include`, instead of once per TU, which is probably not ideal.
https://github.com/llvm/llvm-project/pull/107155
___
cfe-commits mailing list
cfe-commits@
ian-twilightcoder wrote:
That's true. Probably nobody's using this header anymore anyway so either way
should be fine I think.
https://github.com/llvm/llvm-project/pull/107155
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.
apolloww wrote:
> I don't know much about the Coro handling, but this not only makes it
> conditional but changes the default - what should the default behavior be?
Default behavior: Coro passes were always run in pre-link pipeline. Since all
the coro intrinsics are lowered, the output bitcode
@@ -8392,6 +8397,20 @@ void ASTReader::InitializeSema(Sema &S) {
NewOverrides.applyOverrides(SemaObj->getLangOpts());
}
+ if (!DeclsWithEffectsToVerify.empty()) {
+for (GlobalDeclID ID : DeclsWithEffectsToVerify) {
+ Decl *D = GetDecl(ID);
+ FunctionEf
@@ -10950,6 +10950,51 @@ def warn_imp_cast_drops_unaligned : Warning<
InGroup>;
// Function effects
+def warn_func_effect_violation : Warning<
+ "'%0' %select{function|constructor|destructor|lambda|block|constructor's
member initializer}1 "
dougsonos wrote
https://github.com/dougsonos edited
https://github.com/llvm/llvm-project/pull/99656
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -10950,6 +10950,51 @@ def warn_imp_cast_drops_unaligned : Warning<
InGroup>;
// Function effects
+def warn_func_effect_violation : Warning<
+ "'%0' %select{function|constructor|destructor|lambda|block|constructor's
member initializer}1 "
erichkeane wrot
@@ -8392,6 +8397,20 @@ void ASTReader::InitializeSema(Sema &S) {
NewOverrides.applyOverrides(SemaObj->getLangOpts());
}
+ if (!DeclsWithEffectsToVerify.empty()) {
+for (GlobalDeclID ID : DeclsWithEffectsToVerify) {
+ Decl *D = GetDecl(ID);
+ FunctionEf
@@ -0,0 +1,1566 @@
+//=== SemaFunctionEffects.cpp - Sema handling of function effects
-===//
+//
+// 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: A
@@ -0,0 +1,1566 @@
+//=== SemaFunctionEffects.cpp - Sema handling of function effects
-===//
+//
+// 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: A
@@ -189,7 +189,7 @@ static StringRef NormalizeGNUAttrSpelling(StringRef
AttrSpelling) {
typedef std::vector> ParsedAttrMap;
-static ParsedAttrMap getParsedAttrList(const RecordKeeper &Records,
jurahul wrote:
And for all clang-tablegen its here:
https://git
@@ -0,0 +1,1566 @@
+//=== SemaFunctionEffects.cpp - Sema handling of function effects
-===//
+//
+// 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: A
hekota wrote:
Thank you @kazutakahirata! I will remove the code; the consistency check is
repeated later in a called function.
https://github.com/llvm/llvm-project/pull/106657
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.
@@ -0,0 +1,1566 @@
+//=== SemaFunctionEffects.cpp - Sema handling of function effects
-===//
+//
+// 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: A
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/104544
>From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 15 Aug 2024 19:03:29 -0700
Subject: [PATCH 01/16] Implement `__builtin_is_intangible`
---
clang/include/clan
@@ -8392,6 +8397,20 @@ void ASTReader::InitializeSema(Sema &S) {
NewOverrides.applyOverrides(SemaObj->getLangOpts());
}
+ if (!DeclsWithEffectsToVerify.empty()) {
+for (GlobalDeclID ID : DeclsWithEffectsToVerify) {
+ Decl *D = GetDecl(ID);
+ FunctionEf
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 8e5b43c8effc0a01745bb7c53ca21fb6c8384c51
c62066b1cca052b6258ce1e44788cf1f9a35bb01 --e
https://github.com/joaosaffran created
https://github.com/llvm/llvm-project/pull/107292
None
>From f1ca0a6070aa34bcce92d76df3a2e897d44e5f9c Mon Sep 17 00:00:00 2001
From: Joao Saffran
Date: Tue, 3 Sep 2024 19:06:22 +
Subject: [PATCH] Adding `asuint` implementation to hlsl
---
clang/incl
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, it
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/107160
>From 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 3 Sep 2024 15:30:50 -0700
Subject: [PATCH 1/4] [HLSL] Apply resource attributes to the resource type
rather t
@@ -5695,6 +5696,15 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait
UTT,
return true;
return false;
}
+ case UTT_IsIntangibleType:
+assert(Self.getLangOpts().HLSL && "intangible types are HLSL-only
feature");
+if (!T->isVoidType() && !T->isI
@@ -249,4 +249,8 @@ FIELD(HasDeclaredCopyAssignmentWithConstParam, 1, MERGE_OR)
/// base classes or fields have a no-return destructor
FIELD(IsAnyDestructorNoReturn, 1, NO_MERGE)
+/// Whether the record type is intangible (if any base classes or fields have
+/// type that is i
@@ -77,6 +77,23 @@ class SemaHLSL : public SemaBase {
ExprResult ActOnOutParamExpr(ParmVarDecl *Param, Expr *Arg);
QualType getInoutParameterType(QualType Ty);
+
+ // FIXME: This can be hidden (as static function in SemaHLSL.cpp) once we no
+ // longer need to create bui
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/91014
>From 88e4991013a05e26cece87d3989ad957a4e18e3d Mon Sep 17 00:00:00 2001
From: Reid Kleckner
Date: Wed, 4 Sep 2024 16:52:49 +
Subject: [PATCH 1/4] [clang] Fix FIXME in dynamic initializer emission, NFCI
This poten
@@ -1,32 +1,32 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o
- %s | FileCheck %s
-
-// CHECK: -HLSLResourceClassAttr 0x{{[0-9a-f]+}} SRV
-struct Eg1 {
- [[hlsl::resource_class(SRV)]] int i;
+// CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} {{.*}}
@@ -0,0 +1,1566 @@
+//=== SemaFunctionEffects.cpp - Sema handling of function effects
-===//
+//
+// 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: A
https://github.com/rampitec created
https://github.com/llvm/llvm-project/pull/107293
None
>From 8361742ca5fe20a3168b3274166909412e225184 Mon Sep 17 00:00:00 2001
From: Stanislav Mekhanoshin
Date: Wed, 4 Sep 2024 12:00:27 -0700
Subject: [PATCH] [AMDGPU] Add target intrinsic for s_buffer_prefetc
llvmbot wrote:
@llvm/pr-subscribers-backend-amdgpu
Author: Stanislav Mekhanoshin (rampitec)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/107293.diff
16 Files Affected:
- (modified) clang/include/clang/Basic/BuiltinsAMDGPU.def (+1)
- (modified) clang/test/CodeGenOp
@@ -0,0 +1,1566 @@
+//=== SemaFunctionEffects.cpp - Sema handling of function effects
-===//
+//
+// 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: A
https://github.com/vabridgers created
https://github.com/llvm/llvm-project/pull/107294
Random testing revealed it's possible to crash the analyzer through a rare
command line invocation:
clang -cc1 -analyze -analyzer-checker=nullability empty.c
where the source file, empty.c is an empty sourc
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (vabridgers)
Changes
Random testing revealed it's possible to crash the analyzer through a rare
command line invocation:
clang -cc1 -analyze -analyzer-checker=nullability empty.c
where the source file, empty.c is an empty source fil
fmayer wrote:
super-nit: add `[sanitizers]` and remove `.` from commit message?
https://github.com/llvm/llvm-project/pull/107280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/damyanp approved this pull request.
https://github.com/llvm/llvm-project/pull/107160
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -15099,6 +15037,106 @@ class Sema final : public SemaBase {
std::string getFixItZeroLiteralForType(QualType T, SourceLocation Loc) const;
///@}
+
+ //
Endilll wrote:
Yes, this is consistent with the rest of Sema.h
https://github.com/llvm/llvm-project
https://github.com/hnrklssn edited
https://github.com/llvm/llvm-project/pull/97369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7981,7 +7969,7 @@ ExprResult Sema::ActOnStartCXXMemberReference(Scope *S,
Expr *Base,
SmallVector OperatorArrows;
CTypes.insert(Context.getCanonicalType(BaseType));
-while (BaseType->isRecordType()) {
+while (BaseType->getAsRecordDecl()) {
hnrklssn wrote:
Added tests and updated the script. Instead of only being a free-standing
script it's now (along with the UTC scripts) integrated into llvm-lit to
automatically detect which script can update a failing test, using the new flag
`--update-tests`.
https://github.com/llvm/llvm-pro
Author: Ziqing Luo
Date: 2024-09-04T12:34:43-07:00
New Revision: 0fffdeb5f46078ddcc61e112cd38856b1165f050
URL:
https://github.com/llvm/llvm-project/commit/0fffdeb5f46078ddcc61e112cd38856b1165f050
DIFF:
https://github.com/llvm/llvm-project/commit/0fffdeb5f46078ddcc61e112cd38856b1165f050.diff
LO
https://github.com/ziqingluo-90 closed
https://github.com/llvm/llvm-project/pull/101583
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Edd Dawson
Date: 2024-09-04T20:36:24+01:00
New Revision: f574b9c9297538a8d471658564619be3ad6e87dd
URL:
https://github.com/llvm/llvm-project/commit/f574b9c9297538a8d471658564619be3ad6e87dd
DIFF:
https://github.com/llvm/llvm-project/commit/f574b9c9297538a8d471658564619be3ad6e87dd.diff
LO
https://github.com/playstation-edd closed
https://github.com/llvm/llvm-project/pull/107112
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2062,6 +2066,7 @@ void TypePrinter::printBTFTagAttributedAfter(const
BTFTagAttributedType *T,
void TypePrinter::printHLSLAttributedResourceBefore(
const HLSLAttributedResourceType *T, raw_ostream &OS) {
printBefore(T->getWrappedType(), OS);
+ printAfter(T->getWrappe
@@ -12364,6 +12364,7 @@ def err_hlsl_packoffset_cross_reg_boundary :
Error<"packoffset cannot cross regi
def err_hlsl_packoffset_alignment_mismatch : Error<"packoffset at 'y' not
match alignment %0 required by %1">;
def err_hlsl_pointers_unsupported : Error<
"%select{pointe
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(NewAttr);
}
-void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) {
- if (!AL.isArgIdent(0)) {
-Diag(AL.getLoc(), diag::err_attribute_argument_type)
-
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(NewAttr);
}
-void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) {
- if (!AL.isArgIdent(0)) {
-Diag(AL.getLoc(), diag::err_attribute_argument_type)
-
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(NewAttr);
}
-void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) {
- if (!AL.isArgIdent(0)) {
-Diag(AL.getLoc(), diag::err_attribute_argument_type)
-
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(NewAttr);
}
-void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) {
- if (!AL.isArgIdent(0)) {
-Diag(AL.getLoc(), diag::err_attribute_argument_type)
-
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(NewAttr);
}
-void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) {
- if (!AL.isArgIdent(0)) {
-Diag(AL.getLoc(), diag::err_attribute_argument_type)
-
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/107213
>From 650054c3fa9a640b9cd255f98c46dbfbd0b8c590 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 28 Aug 2024 09:59:41 +0200
Subject: [PATCH 1/2] [clang] Diagnose dangling issues for
"Container" case.
We teac
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/107299
Changes the assert to test the same condition without using the variables.
This change is done in response to a comment
[here](https://github.com/llvm/llvm-project/pull/106657#issuecomment-2327493439).
>From
llvmbot wrote:
@llvm/pr-subscribers-hlsl
Author: Helena Kotas (hekota)
Changes
Changes the assert to test the same condition without using the variables.
This change is done in response to a comment
[here](https://github.com/llvm/llvm-project/pull/106657#issuecomment-2327493439).
---
@@ -470,10 +474,24 @@ static void visitFunctionCallArguments(IndirectLocalPath
&Path, Expr *Call,
VisitGSLPointerArg(Callee, Args[0],
!Callee->getReturnType()->isReferenceType());
} else {
-if (auto *CCE = dyn_cast(Call);
-
@@ -834,17 +834,10 @@ static void ValidateMultipleRegisterAnnotations(Sema &S,
Decl *TheDecl,
static void DiagnoseHLSLRegisterAttribute(Sema &S, SourceLocation &ArgLoc,
Decl *TheDecl, RegisterType regType)
{
- // Samplers, UAVs, and
@@ -363,10 +363,14 @@ static bool implicitObjectParamIsLifetimeBound(const
FunctionDecl *FD) {
if (ATL.getAttrAs())
return true;
}
-
return isNormalAsisgnmentOperator(FD);
}
+bool isFirstTemplateArgumentGSLPointer(const TemplateArgumentList &TAs) {
+ return
@@ -470,10 +474,24 @@ static void visitFunctionCallArguments(IndirectLocalPath
&Path, Expr *Call,
VisitGSLPointerArg(Callee, Args[0],
!Callee->getReturnType()->isReferenceType());
} else {
-if (auto *CCE = dyn_cast(Call);
-
@@ -499,3 +518,28 @@ std::string_view test2(int i,
std::optional a) {
return std::move(a.value());
}
}
+
+namespace GH100526 {
+void test() {
+ std::vector t1 = {std::string()}; // expected-warning
{{object backing the pointer will be destroyed at the end}}
---
hokein wrote:
> Since this is not limited to a hardcoded set of types/stl-containers, this is
> a substantial change in the behaviour of general Owner types and
> warrants extra documentation both in GSL analysis docs and ReleaseNotes.
Done.
https://github.com/llvm/llvm-project/pull/107213
_
https://github.com/bwendling created
https://github.com/llvm/llvm-project/pull/107300
Refactor attribute parsing so that the main code parsing an attribute can be
called by a separate code path that doesn't start with the '__attribute'
keyword.
>From c30c6c11686cc95ba20eb7000d210b17757fbfe3 M
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Bill Wendling (bwendling)
Changes
Refactor attribute parsing so that the main code parsing an attribute can be
called by a separate code path that doesn't start with the '__attribute'
keyword.
---
Full diff: https://github.com/llvm/llvm-
https://github.com/dfukalov created
https://github.com/llvm/llvm-project/pull/107301
(this is clang related part)
Without these explicit includes, removing other headers, who implicitly include
llvm-config.h, may have non-trivial side effects. For example, `clagd` may
report even `llvm-config
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 34f2c9a9ce73a61b27d75dab7e1eed256491afcc
c30c6c11686cc95ba20eb7000d210b17757fbfe3 --e
https://github.com/joaosaffran updated
https://github.com/llvm/llvm-project/pull/107292
>From f1ca0a6070aa34bcce92d76df3a2e897d44e5f9c Mon Sep 17 00:00:00 2001
From: Joao Saffran
Date: Tue, 3 Sep 2024 19:06:22 +
Subject: [PATCH 1/2] Adding `asuint` implementation to hlsl
---
clang/includ
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/107213
>From 0d9a5971121bf66608625de3514db346876d9091 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 28 Aug 2024 09:59:41 +0200
Subject: [PATCH 1/2] [clang] Diagnose dangling issues for
"Container" case.
We teac
@@ -0,0 +1,1566 @@
+//=== SemaFunctionEffects.cpp - Sema handling of function effects
-===//
+//
+// 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: A
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/107299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
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 d21e731c42d6b967e29dbe2edc16c1b86885df0d
fe0ca71b1d5cc3ff696e374b5b5bd03f748944aa --e
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/86618
>From 06250aa308d1662848726528bd31395fb2ad3ea0 Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 5 Mar 2024 03:14:49 +
Subject: [PATCH] implement wraps attribute
Signed-off-by: Justin Stitt
---
cl
FPar wrote:
@efriedma-quic Thank you for being patient. I do not have write permissions,
can you please merge this for me?
https://github.com/llvm/llvm-project/pull/100785
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/bwendling updated
https://github.com/llvm/llvm-project/pull/107300
>From c30c6c11686cc95ba20eb7000d210b17757fbfe3 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Wed, 4 Sep 2024 12:49:04 -0700
Subject: [PATCH 1/2] [Parser][NFC] Move the core parsing of an attribute into
a
201 - 300 of 375 matches
Mail list logo