@@ -0,0 +1,87 @@
+==
+Adoption Guide for ``-fbounds-safety``
+==
+
+.. contents::
+ :local:
+
+Where to get ``-fbounds-safety``
+
+
+The open sourcing to llvm.org's ``llvm-pro
https://github.com/rapidsna edited
https://github.com/llvm/llvm-project/pull/120674
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,87 @@
+==
+Adoption Guide for ``-fbounds-safety``
+==
+
+.. contents::
+ :local:
+
+Where to get ``-fbounds-safety``
+
+
+The open sourcing to llvm.org's ``llvm-pro
https://github.com/rapidsna commented:
Thanks for addressing comments! LGTM. You may still need to wait on Clang code
owners review though.
https://github.com/llvm/llvm-project/pull/122198
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
@@ -1060,238 +1061,331 @@
CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type,
return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true);
}
-const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset(
-ASTContext &Ctx, const
@@ -1060,238 +1061,331 @@
CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type,
return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true);
}
-const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset(
-ASTContext &Ctx, const
@@ -1060,238 +1061,331 @@
CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type,
return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true);
}
-const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset(
-ASTContext &Ctx, const
@@ -1060,238 +1061,331 @@
CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type,
return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true);
}
-const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset(
-ASTContext &Ctx, const
@@ -1060,238 +1061,331 @@
CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type,
return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true);
}
-const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset(
-ASTContext &Ctx, const
@@ -1343,6 +1430,12 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
assert(Ptr->getType()->isPointerTy() &&
"Non-pointer passed to __builtin_object_size?");
+ if (IsDynamic)
rapidsna wrote:
Why did this code block move to
@@ -1060,238 +1061,331 @@
CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type,
return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true);
}
-const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset(
-ASTContext &Ctx, const
@@ -1060,238 +1061,331 @@
CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type,
return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true);
}
-const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset(
-ASTContext &Ctx, const
rapidsna wrote:
> Given the number of small changes that need to be made, I think it's worth
> mentioning that fix-its exist and how their fixes can be applied, since
> that's not always obvious when building in the terminal. Perhaps we also want
> to mention that we'd appreciate reports of sn
https://github.com/rapidsna created
https://github.com/llvm/llvm-project/pull/120674
This adds an instruction to adopt `-fbounds-safety` using the preview
implementation available in the fork of llvm-project.
>From 390d37d9706472e46a34366bcaa519d34496b888 Mon Sep 17 00:00:00 2001
From: Yeoul N
@@ -13,7 +13,10 @@ void init(void *
__attribute__((pass_dynamic_object_size(0;
// CHECK-LABEL: define dso_local void @_ZN3foo3barC1Ev(
// CHECK-SAME: ptr noundef nonnull align 4 dereferenceable(1) [[THIS:%.*]])
unnamed_addr #[[ATTR0:[0-9]+]] align 2 {
// CHECK-NEXT: entr
@@ -16,6 +16,8 @@ void test1(struct fam_struct *ptr, int size, int idx) {
*__builtin_counted_by_ref(ptr->array) = size; // ok
*__builtin_counted_by_ref(&ptr->array[idx]) = size; // ok
+ *__builtin_counted_by_ref(&ptr->array) = size;// ok
@@ -0,0 +1,182 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O2 -emit-llvm -o - %s |
FileCheck %s --check-prefix=X86_64
+// RUN: %clang_cc1 -triple i386-unknown-unknown
https://github.com/rapidsna edited
https://github.com/llvm/llvm-project/pull/107619
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1105,16 +1120,16 @@ enum AttributeDeclKind {
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
const ParsedAttr &At) {
- DB.AddTaggedVal(reinterpret_cast(At.getAttrName()),
+ const IdentifierInfo *Att
https://github.com/rapidsna updated
https://github.com/llvm/llvm-project/pull/107619
>From 1d00f0fca700c058320a39cd3f40cdd58c37cf8f Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Thu, 5 Sep 2024 09:52:41 -0700
Subject: [PATCH 1/3] [Parser][BoundsSafety] Print attribute as macro if it's
system d
@@ -1105,16 +1120,16 @@ enum AttributeDeclKind {
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
const ParsedAttr &At) {
- DB.AddTaggedVal(reinterpret_cast(At.getAttrName()),
+ const IdentifierInfo *Att
@@ -5055,6 +5058,17 @@ void Parser::ParseLexedCAttribute(LateParsedAttribute
&LA, bool EnterScope,
ParseGNUAttributeArgs(&LA.AttrName, LA.AttrNameLoc, Attrs, nullptr, nullptr,
SourceLocation(), ParsedAttr::Form::GNU(), nullptr);
+ const auto &SM = P
@@ -1105,16 +1120,16 @@ enum AttributeDeclKind {
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
const ParsedAttr &At) {
- DB.AddTaggedVal(reinterpret_cast(At.getAttrName()),
+ const IdentifierInfo *Att
@@ -5080,6 +5083,17 @@ void Parser::ParseLexedCAttribute(LateParsedAttribute
&LA, bool EnterScope,
ParseGNUAttributeArgs(&LA.AttrName, LA.AttrNameLoc, Attrs, nullptr, nullptr,
SourceLocation(), ParsedAttr::Form::GNU(), nullptr);
+ const auto &SM = P
@@ -14,12 +16,26 @@ void Func() {
auto NODEREF auto_i2 = i; // expected-warning{{'noderef' can only be used on
an array or pointer type}}
}
+// The diagnostic message is hard-coded as 'noderef' so using a system macro
doesn't change the behavior
+void Func_system_macro() {
https://github.com/rapidsna updated
https://github.com/llvm/llvm-project/pull/107619
>From 1d00f0fca700c058320a39cd3f40cdd58c37cf8f Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Thu, 5 Sep 2024 09:52:41 -0700
Subject: [PATCH 1/2] [Parser][BoundsSafety] Print attribute as macro if it's
system d
@@ -14,12 +16,26 @@ void Func() {
auto NODEREF auto_i2 = i; // expected-warning{{'noderef' can only be used on
an array or pointer type}}
}
+// The diagnostic message is hard-coded as 'noderef' so using a system macro
doesn't change the behavior
+void Func_system_macro() {
https://github.com/rapidsna edited
https://github.com/llvm/llvm-project/pull/107619
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna edited
https://github.com/llvm/llvm-project/pull/107619
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14,12 +16,26 @@ void Func() {
auto NODEREF auto_i2 = i; // expected-warning{{'noderef' can only be used on
an array or pointer type}}
}
+// The diagnostic message is hard-coded as 'noderef' so using a system macro
doesn't change the behavior
+void Func_system_macro() {
https://github.com/rapidsna updated
https://github.com/llvm/llvm-project/pull/107619
>From 1a0e2dede95bd69ab6badc9aafbd60d5eaf5d407 Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Thu, 5 Sep 2024 09:52:41 -0700
Subject: [PATCH] [Parser][BoundsSafety] Print attribute as macro if it's
system defin
rapidsna wrote:
Will fix several test failures.
https://github.com/llvm/llvm-project/pull/107619
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna edited
https://github.com/llvm/llvm-project/pull/107619
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna created
https://github.com/llvm/llvm-project/pull/107619
This correctly adds macro identifier for late parsed attrs, which has been
missing. 'operator<<' for StreamingDiagnostic and ParsedAttr checks if Attr
should be printed as macro and does it.
This also fixes t
rapidsna wrote:
> Also, I think there was a PR that added delayed parsing of attributes? Is
> that correct, or a false memory? :-)
@bwendling That too has already been merged in
https://github.com/llvm/llvm-project/pull/88596
https://github.com/llvm/llvm-project/pull/70480
___
rapidsna wrote:
@bwendling We've already landed the flag in
https://github.com/llvm/llvm-project/pull/92623. I will close this one.
https://github.com/llvm/llvm-project/pull/70480
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.l
https://github.com/rapidsna closed
https://github.com/llvm/llvm-project/pull/70480
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna edited
https://github.com/llvm/llvm-project/pull/106147
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna created
https://github.com/llvm/llvm-project/pull/106147
`-fbounds-safety` doesn't allow taking address of a variable referred to by
`__counted_by`, in order to prevent code from using the pointer to update the
variable without necessary checks to keep the invariant
https://github.com/rapidsna closed
https://github.com/llvm/llvm-project/pull/102076
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna created
https://github.com/llvm/llvm-project/pull/102076
…heckCountedByAttrOnField'
llvm::SmallVectorImpl &Decls is a vector of
declarations referred to by the argument of 'counted_by' attributes and
frields. Since 'BuildCountAttributedArrayOrPointerType' has been
https://github.com/rapidsna approved this pull request.
https://github.com/llvm/llvm-project/pull/99330
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna approved this pull request.
Thanks for fixing this issue! I left a minor comment. Other than that, LGTM.
https://github.com/llvm/llvm-project/pull/97902
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.l
@@ -1551,7 +1551,7 @@ ASTNodeImporter::VisitCountAttributedType(const
CountAttributedType *T) {
Expr *CountExpr = importChecked(Err, T->getCountExpr());
SmallVector CoupledDecls;
- for (auto TI : T->dependent_decls()) {
+ for (const TypeCoupledDeclRefInfo &TI : T->depen
https://github.com/rapidsna approved this pull request.
LGTM. Let me know if you need me to merge this change.
https://github.com/llvm/llvm-project/pull/95455
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
rapidsna wrote:
Still LGTM
https://github.com/llvm/llvm-project/pull/93231
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna closed
https://github.com/llvm/llvm-project/pull/95964
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rapidsna wrote:
@AaronBallman Thanks for your prompt feedback!
https://github.com/llvm/llvm-project/pull/95964
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna updated
https://github.com/llvm/llvm-project/pull/95964
>From 6ed8ac33952bc8f9a9b672740d45f25872ae1dbb Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Tue, 18 Jun 2024 11:05:17 -0700
Subject: [PATCH 1/2] [BoundsSafety][doc] Make it clear that the feature is
work-in-pr
@@ -1,10 +1,11 @@
// RUN: %clang_cc1 -fsyntax-only -verify -Wthread-safety -Wthread-safety-beta
%s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wthread-safety -Wthread-safety-beta
-fexperimental-late-parse-attributes -DLATE_PARSING %s
#define LOCKABLE__attribute__
@@ -8697,9 +8708,10 @@ static bool CheckCountedByAttrOnField(
InvalidTypeKind = CountedByInvalidPointeeTypeKind::FLEXIBLE_ARRAY_MEMBER;
}
- if (InvalidTypeKind != CountedByInvalidPointeeTypeKind::VALID) {
+ if (InvalidTypeKind != CountedByInvalidPointeeTypeKind::VALID
https://github.com/rapidsna edited
https://github.com/llvm/llvm-project/pull/95964
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rapidsna wrote:
@AaronBallman do you think we should remove the doc from the release notes
because it's not ready yet?
https://github.com/llvm/llvm-project/pull/95964
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-b
https://github.com/rapidsna created
https://github.com/llvm/llvm-project/pull/95964
The `-fbounds-safety` feature is not available yet and the implementation is
still in progress, which will be guarded by `-fexperimental-bounds-safety`.
This is to make it more explicit in the document that the
rapidsna wrote:
@AaronBallman We haven't exposed the `-fbounds-safety` flag yet. The idea was
to guard it under the experimental flag called `-fexperimental-bounds-safety`
as a CC1 flag for testing until we have the full feature available (the feature
is work-in-progress and is going to take s
https://github.com/rapidsna approved this pull request.
LGTM assuming you will be fixing the buildkite failures.
You may still need to wait on @AaronBallman's approval.
https://github.com/llvm/llvm-project/pull/94216
___
cfe-commits mailing list
cfe
rapidsna wrote:
> > You may also want to consider making the attribute late parsed in C when
> > `-fexperimental-late-parse-attributes` is enabled. See
> > https://github.com/llvm/llvm-project/pull/93121/files#diff-ae2ec9524bdbeea1f06917607482634dd89af5bcbb929805032463e5dafe79e7R2260
> > That w
@@ -28,7 +28,12 @@
struct LOCKABLE Mutex {};
struct Foo {
- struct Mutex *mu_;
+struct Mutex *mu_;
+struct Bar {
+struct Mutex *other_mu;
+} bar;
+ int a_value GUARDED_BY(mu_);
rapidsna wrote:
Nit: Please check indent
https://github.co
@@ -3330,6 +3340,63 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl,
}
}
+/// GuardedBy attributes (e.g., guarded_by):
+/// AttrName '(' expression ')'
+void Parser::ParseGuardedByAttribute(IdentifierInfo &AttrName,
+ SourceLocation
https://github.com/rapidsna edited
https://github.com/llvm/llvm-project/pull/94216
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna commented:
You may also want to consider making the attribute late parsed in C when
`-fexperimental-late-parse-attributes` is enabled. See
https://github.com/llvm/llvm-project/pull/93121/files#diff-ae2ec9524bdbeea1f06917607482634dd89af5bcbb929805032463e5dafe79e7R2260
https://github.com/rapidsna approved this pull request.
https://github.com/llvm/llvm-project/pull/93231
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -425,6 +425,12 @@ Attribute Changes in Clang
size_t count;
};
+- The attributes ``sized_by``, ``counted_by_or_null`` and ``sized_by_or_null```
+ have been added as variants on ``counted_by``, each with slightly different
semantics.
+ ``sized_by`` takes a byte
https://github.com/rapidsna edited
https://github.com/llvm/llvm-project/pull/93121
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4944,6 +4944,26 @@ void Parser::ParseStructDeclaration(
}
}
+// TODO: All callers of this function should be moved to
+// `Parser::ParseLexedAttributeList`.
+void Parser::ParseLexedCAttributeList(LateParsedAttrList &LAs, bool EnterScope,
+
@@ -4944,6 +4944,26 @@ void Parser::ParseStructDeclaration(
}
}
+// TODO: All callers of this function should be moved to
+// `Parser::ParseLexedAttributeList`.
+void Parser::ParseLexedCAttributeList(LateParsedAttrList &LAs, bool EnterScope,
+
@@ -0,0 +1,196 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+#define __counted_by(f) __attribute__((counted_by(f)))
+
+struct bar;
+
+struct not_found {
+ int count;
+ struct bar *fam[] __counted_by(bork); // expected-error {{use of undeclared
identifier 'bork'}}
+};
+
+s
https://github.com/rapidsna edited
https://github.com/llvm/llvm-project/pull/93121
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/93121
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rapidsna wrote:
@bwendling @kees Likely, we should not put `__counted_by` in that case. Could
we fix the source?
https://github.com/llvm/llvm-project/pull/90786
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
rapidsna wrote:
@bwendling @kees Wait. `ATOM_PPLIB_STATE_V2` is also a struct with flexible
array member? This is concerning because `ucNumEntries *
sizeof(ATOM_PPLIB_STATE_V2)` is not the correct size anyway. Do you know the
semantics of this structure?
https://github.com/llvm/llvm-project/p
rapidsna wrote:
@bwendling Thanks for reporting. We will relax the restrictions for arrays to
not break the existing users.
https://github.com/llvm/llvm-project/pull/90786
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
rapidsna wrote:
> The main concern I have with delaying support for this is that header files
> could find themselves in a state where they could not be refactored without
> removing counted_by attributes that refer to now-incomplete structs.
@kees Agreed. We will work on a follow up patch to
rapidsna wrote:
> I've been thinking about this restriction. Why is this necessary? My
> assumption was that applying counted_by to a pointer causes a bounds check on
> an index into the pointer rather than its underlying type.
@bwendling It's because these types are not indexable really.
**v
https://github.com/rapidsna closed
https://github.com/llvm/llvm-project/pull/87596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8547,15 +8547,25 @@ static const RecordDecl
*GetEnclosingNamedOrTopAnonRecord(const FieldDecl *FD) {
return RD;
}
-static bool
-CheckCountExpr(Sema &S, FieldDecl *FD, Expr *E,
- llvm::SmallVectorImpl &Decls) {
+static bool CheckCountedByAttrOnField(
+S
@@ -1371,14 +1371,23 @@ class Parser : public CodeCompletionHandler {
};
// A list of late-parsed attributes. Used by ParseGNUAttributes.
- class LateParsedAttrList: public SmallVector {
+ class LateParsedAttrList : public SmallVector {
rapidsna wrote:
https://github.com/rapidsna approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/88596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2101,9 +2173,21 @@ bool PragmaClangAttributeSupport::isAttributedSupported(
return SpecifiedResult;
// Opt-out rules:
- // An attribute requires delayed parsing (LateParsed is on)
- if (Attribute.getValueAsBit("LateParsed"))
+
+ // An attribute requires delayed pa
@@ -89,13 +89,23 @@ static StringRef normalizeAttrName(StringRef Name) {
return Name;
}
-/// isAttributeLateParsed - Return true if the attribute has arguments that
-/// require late parsing.
-static bool isAttributeLateParsed(const IdentifierInfo &II) {
+/// returns true if
@@ -91,11 +91,24 @@ static StringRef normalizeAttrName(StringRef Name) {
/// isAttributeLateParsed - Return true if the attribute has arguments that
/// require late parsing.
-static bool isAttributeLateParsed(const IdentifierInfo &II) {
+bool Parser::isAttributeLateParsed(con
@@ -592,6 +592,46 @@ class AttrSubjectMatcherAggregateRule
{
def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule;
+// Late Attribute parsing mode enum
+class LateAttrParseKind {
+ int Kind = val;
+}
+
+// Never late parsed
+def LateAttrParseNever : LateAttrParseKi
@@ -592,6 +592,46 @@ class AttrSubjectMatcherAggregateRule
{
def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule;
+// Late Attribute parsing mode enum
rapidsna wrote:
@delcypher Thanks! LGTM.
https://github.com/llvm/llvm-project/pull/88596
___
@@ -592,6 +592,16 @@ class AttrSubjectMatcherAggregateRule
{
def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule;
+// Late Attribute parsing mode enum
+class LateAttrParseKind {
+ int Kind = val;
+}
+def LateAttrParseNever : LateAttrParseKind<0>; // Never late par
rapidsna wrote:
> This should be fine, because count is declared before use—unless I'm getting
> type attributes confused with field attributes..
`struct size_unknown *__counted_by(count) buf` indicates that `buf` has
`sizeof(struct size_unknown) * count` byt
@@ -4997,7 +5087,11 @@ void Parser::ParseStructUnionBody(SourceLocation
RecordLoc,
ParsedAttributes attrs(AttrFactory);
// If attributes exist after struct contents, parse them.
- MaybeParseGNUAttributes(attrs);
+ MaybeParseGNUAttributes(attrs, &LateFieldAttrs);
+
+ as
https://github.com/rapidsna closed
https://github.com/llvm/llvm-project/pull/86017
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna updated
https://github.com/llvm/llvm-project/pull/86017
>From abfcb60e7b65e755733f4d41795aa9cfd44e0cc3 Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Thu, 21 Mar 2024 06:47:05 +0900
Subject: [PATCH 1/3] Unwrap CountAttributed for debug info
Fix crash caused by 3eb9ff
https://github.com/rapidsna updated
https://github.com/llvm/llvm-project/pull/86017
>From abfcb60e7b65e755733f4d41795aa9cfd44e0cc3 Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Thu, 21 Mar 2024 06:47:05 +0900
Subject: [PATCH 1/2] Unwrap CountAttributed for debug info
Fix crash caused by 3eb9ff
rapidsna wrote:
Fix crash in https://github.com/llvm/llvm-project/pull/78000
https://github.com/llvm/llvm-project/pull/86017
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rapidsna wrote:
Thanks @nathanchance. Opened PR to fix the crash.
https://github.com/llvm/llvm-project/pull/86017
https://github.com/llvm/llvm-project/pull/78000
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
https://github.com/rapidsna created
https://github.com/llvm/llvm-project/pull/86017
Fix crash caused by 3eb9ff30959a670559bcba03d149d4c51bf7c9c9
>From abfcb60e7b65e755733f4d41795aa9cfd44e0cc3 Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Thu, 21 Mar 2024 06:47:05 +0900
Subject: [PATCH] Unwrap
https://github.com/rapidsna updated
https://github.com/llvm/llvm-project/pull/78000
>From 3d2716ad6088f600c14d6ff724aa90453130a1f7 Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Mon, 18 Dec 2023 10:58:16 +0900
Subject: [PATCH 01/14] [BoundsSafety] Introduce CountAttributedType
CountAttributedTy
rapidsna wrote:
@AaronBallman Thank you! The -fbounds-safety documentation is currently shown
https://clang.llvm.org/docs/BoundsSafety.html, but yes, we're planning to add
the feature in the release note once we have more functionalities in place.
https://github.com/llvm/llvm-project/pull/7800
https://github.com/rapidsna updated
https://github.com/llvm/llvm-project/pull/78000
>From 3d2716ad6088f600c14d6ff724aa90453130a1f7 Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Mon, 18 Dec 2023 10:58:16 +0900
Subject: [PATCH 01/11] [BoundsSafety] Introduce CountAttributedType
CountAttributedTy
https://github.com/rapidsna updated
https://github.com/llvm/llvm-project/pull/78000
>From 3d2716ad6088f600c14d6ff724aa90453130a1f7 Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Mon, 18 Dec 2023 10:58:16 +0900
Subject: [PATCH 01/10] [BoundsSafety] Introduce CountAttributedType
CountAttributedTy
rapidsna wrote:
@Endilll I just rebased it so you can review `Sema.h`.
https://github.com/llvm/llvm-project/pull/78000
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rapidsna updated
https://github.com/llvm/llvm-project/pull/78000
>From 3d2716ad6088f600c14d6ff724aa90453130a1f7 Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Mon, 18 Dec 2023 10:58:16 +0900
Subject: [PATCH 1/9] [BoundsSafety] Introduce CountAttributedType
CountAttributedType
https://github.com/rapidsna updated
https://github.com/llvm/llvm-project/pull/78000
>From c39871ed2ec642ab00360f2c3a18fba7c915f82d Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Mon, 18 Dec 2023 10:58:16 +0900
Subject: [PATCH 1/9] [BoundsSafety] Introduce CountAttributedType
CountAttributedType
https://github.com/rapidsna updated
https://github.com/llvm/llvm-project/pull/78000
>From c39871ed2ec642ab00360f2c3a18fba7c915f82d Mon Sep 17 00:00:00 2001
From: Yeoul Na
Date: Mon, 18 Dec 2023 10:58:16 +0900
Subject: [PATCH 1/8] [BoundsSafety] Introduce CountAttributedType
CountAttributedType
1 - 100 of 290 matches
Mail list logo