https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/96475
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/96475
>From 97d1b80680112c3fa271501427a18273aed61dbe Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 24 Jun 2024 10:58:53 +0200
Subject: [PATCH 1/3] [clang] Extend the existing lifetimebound check for
assignments.
hokein wrote:
> You can also add "Fixes: #54492" to description to close this bug as this
> only asks for pointer type support
>
> Please also add release notes.
Done.
https://github.com/llvm/llvm-project/pull/96475
___
cfe-commits mailing list
cfe
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/108280
Fixes #108272
>From 0ee0f4660c8f9352c758ff80b0fa149bf9b5bd57 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 11 Sep 2024 21:45:40 +0200
Subject: [PATCH] [clang] Don't emit bogus dangling diagnostics when
hokein wrote:
Thanks, it looks like this introduces a new false positive:
```
#include
std::optional func(int a) {
if (a)
return std::make_optional(nullptr); // emit a dangling.
}
```
I'm going to revert it.
https://github.com/llvm/llvm-project/pull/107213
___
Author: Haojian Wu
Date: 2024-09-12T09:24:32+02:00
New Revision: 0683c4e839524c37fe4ddfa1bce1e31ba556041b
URL:
https://github.com/llvm/llvm-project/commit/0683c4e839524c37fe4ddfa1bce1e31ba556041b
DIFF:
https://github.com/llvm/llvm-project/commit/0683c4e839524c37fe4ddfa1bce1e31ba556041b.diff
LO
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/108344
This relands #107213, with a fix to the "make_optional(nullptr)" false positive
(please see the second commit in this PR).
>From d1096323a87897b917ede2c29afd42c9f2674cd7 Mon Sep 17 00:00:00 2001
From: Haojian Wu
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/108344
>From d1096323a87897b917ede2c29afd42c9f2674cd7 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 12 Sep 2024 09:27:03 +0200
Subject: [PATCH 1/2] Reapply "[clang] Diagnose dangling issues for the
"Container" c
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/108344
>From d1096323a87897b917ede2c29afd42c9f2674cd7 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 12 Sep 2024 09:27:03 +0200
Subject: [PATCH 1/2] Reapply "[clang] Diagnose dangling issues for the
"Container" c
@@ -300,6 +300,8 @@ Improvements to Clang's diagnostics
- Clang now diagnoses cases where a dangling ``GSLOwner`` object
is constructed, e.g. ``std::vector v = {std::string()};``
(#GH100526).
+- Don't emit bogus dangling diagnostics when ``[[gsl::Owner]]`` and
`[[clang::li
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/108344
>From d1096323a87897b917ede2c29afd42c9f2674cd7 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 12 Sep 2024 09:27:03 +0200
Subject: [PATCH 1/3] Reapply "[clang] Diagnose dangling issues for the
"Container" c
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/108344
>From e4b4b55fc169ce6a31aefadc523d26440bdf46d7 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 12 Sep 2024 09:27:03 +0200
Subject: [PATCH 1/4] Reapply "[clang] Diagnose dangling issues for the
"Container" c
@@ -347,6 +361,30 @@ static bool shouldTrackFirstArgument(const FunctionDecl
*FD) {
return false;
}
+// Returns true if we should perform the GSL analysis on the first argument for
+// the given constructor.
+static bool
+shouldTrackFirstArgumentForConstructor(const CXXCons
@@ -633,4 +633,12 @@ std::optional test4(int a) {
return std::make_optional(nullptr); // fine
}
+template
+struct [[gsl::Owner]] StatusOr {
+ const T &value() [[clang::lifetimebound]];
+};
hokein wrote:
Thanks a lot for these tests. I've added them with s
hokein wrote:
> We seem to be good at detecting new false positives but this is natural due
> to the visible compiler diagnositc. Unfortunately, same is not true for new
> false-negatives. More tests in our test-suite is the only way to detect those
> and we should be extensively adding more t
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/108280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/108280
>From 05bdd3878f6c958db52902d641bb0bb37b026616 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 11 Sep 2024 21:45:40 +0200
Subject: [PATCH] [clang] Don't emit bogus dangling diagnostics when
``[[gsl::Owner]]
hokein wrote:
> Can you add some more details to the summary e.g. "The fix adds an additional
> check in isGSLOwner() for Owner attribute" or something along those lines.
Done.
https://github.com/llvm/llvm-project/pull/108280
___
cfe-commits mailing
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/108280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/108280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/111753
This is a follow-up to https://github.com/llvm/llvm-project/pull/108344.
The original bailout check was overly strict, causing it to miss cases like the
vector(initializer_list, allocator) constructor. This patc
https://github.com/hokein approved this pull request.
Thanks, the logic looks reasonable to me.
https://github.com/llvm/llvm-project/pull/110091
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe
@@ -75,18 +76,61 @@ bool isPrivateProtoDecl(const NamedDecl &ND) {
if (ND.getIdentifier() == nullptr)
return false;
auto Name = ND.getIdentifier()->getName();
- if (!Name.contains('_'))
-return false;
- // Nested proto entities (e.g. Message::Nested) have top-leve
@@ -75,18 +76,61 @@ bool isPrivateProtoDecl(const NamedDecl &ND) {
if (ND.getIdentifier() == nullptr)
return false;
auto Name = ND.getIdentifier()->getName();
- if (!Name.contains('_'))
-return false;
- // Nested proto entities (e.g. Message::Nested) have top-leve
@@ -75,18 +76,61 @@ bool isPrivateProtoDecl(const NamedDecl &ND) {
if (ND.getIdentifier() == nullptr)
return false;
auto Name = ND.getIdentifier()->getName();
- if (!Name.contains('_'))
-return false;
- // Nested proto entities (e.g. Message::Nested) have top-leve
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/110091
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
> Should this have -fclang-abi-compat support?
(It seems like we should, although I don’t have direct experience with it.)
This is a bug fix for
https://github.com/llvm/llvm-project/commit/4b163e343cfa54c8d55c9da73c70d58f55ea9df2,
which is released in Clang 18 and Clang 19. Ther
@@ -693,14 +693,13 @@ ItaniumMangleContextImpl::getEffectiveDeclContext(const
Decl *D) {
if (VD->isExternC())
return getASTContext().getTranslationUnitDecl();
- if (const auto *FD = D->getAsFunction()) {
-if (FD->isExternC())
hokein wrote:
why
@@ -693,14 +693,13 @@ ItaniumMangleContextImpl::getEffectiveDeclContext(const
Decl *D) {
if (VD->isExternC())
return getASTContext().getTranslationUnitDecl();
- if (const auto *FD = D->getAsFunction()) {
-if (FD->isExternC())
- return getASTContext().getTr
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/113180
This issue is identified during the discussion of [this
comment](https://github.com/llvm/llvm-project/issues/112234#issuecomment-2426102198).
There will be no release note for this fix as it is a follow-up to [P
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/113180
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein approved this pull request.
Thanks, it looks good.
For this specific case, where a static lambda captures a local variable, I
think we could enhance Clang to detect this kind of use-after-free bug.
https://github.com/llvm/llvm-project/pull/111282
_
hokein wrote:
The current solution seems reasonable to me.
> somehow including the malformed block in the AST (by wrapping it in a
> RecoveryExpr perhaps?)
`RecoveryExpr` is designed to preserve `Expr` nodes, so it can't be used to
retain arbitrary AST nodes. In the case of `(^Ts)`, as far as
@@ -2292,9 +2289,26 @@ incomingCalls(const CallHierarchyItem &Item, const
SymbolIndex *Index) {
Index->lookup(ContainerLookup, [&](const Symbol &Caller) {
auto It = CallsIn.find(Caller.ID);
assert(It != CallsIn.end());
-if (auto CHI = symbolToCallHierarchyItem(Ca
@@ -2272,18 +2273,14 @@ incomingCalls(const CallHierarchyItem &Item, const
SymbolIndex *Index) {
// Initially store the ranges in a map keyed by SymbolID of the caller.
// This allows us to group different calls with the same caller
// into the same CallHierarchyIncoming
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/111753
>From 354b33432d0dafbf54667a9ee973f5b2712c5773 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 9 Oct 2024 21:34:49 +0200
Subject: [PATCH 1/2] [clang] Diagnose the dangling references for vector.
---
clang/
@@ -404,7 +404,7 @@ shouldTrackFirstArgumentForConstructor(const
CXXConstructExpr *Ctor) {
if (LHSRecordDecl->hasAttr())
return true;
- if (Ctor->getConstructor()->getNumParams() != 1 ||
+ if (Ctor->getConstructor()->getNumParams() < 1 ||
hokein wrote
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/111753
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/114044
This fixes a bug raised in
https://github.com/llvm/llvm-project/pull/112751#issuecomment-2443566707.
>From 32d808a6c30cb572c7905f93b9c14b5d8a25599d Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 29 Oct
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
->getDeductionCandidateKind() == DeductionCandidate::Aggregate)
continue;
-BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc);
+BuildDeductionGuideForTypeAlias(Sema
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/98788
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein approved this pull request.
Thanks! It looks good from my side. Please address the comments from the other
reviewers and wait a bit before landing, in case they have additional feedback.
https://github.com/llvm/llvm-project/pull/98788
__
@@ -2272,18 +2273,14 @@ incomingCalls(const CallHierarchyItem &Item, const
SymbolIndex *Index) {
// Initially store the ranges in a map keyed by SymbolID of the caller.
// This allows us to group different calls with the same caller
// into the same CallHierarchyIncoming
@@ -2292,9 +2289,26 @@ incomingCalls(const CallHierarchyItem &Item, const
SymbolIndex *Index) {
Index->lookup(ContainerLookup, [&](const Symbol &Caller) {
auto It = CallsIn.find(Caller.ID);
assert(It != CallsIn.end());
-if (auto CHI = symbolToCallHierarchyItem(Ca
@@ -269,6 +271,40 @@ void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) {
}
}
+static bool IsPointerLikeType(QualType QT) {
+ QT = QT.getNonReferenceType();
+ // if (QT->isPointerType())
hokein wrote:
any reason to comment it out? I think having thi
@@ -269,6 +271,40 @@ void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) {
}
}
+static bool IsPointerLikeType(QualType QT) {
hokein wrote:
we have a similar function in the CheckExprLifetime.cpp, we can move it to
`Sema.h` to make it reusable.
https:
@@ -269,6 +271,40 @@ void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) {
}
}
+static bool IsPointerLikeType(QualType QT) {
+ QT = QT.getNonReferenceType();
+ // if (QT->isPointerType())
+ // return true;
+ auto *RD = QT->getAsCXXRecordDecl();
+ if (!RD)
+re
@@ -1882,6 +1882,46 @@ def LifetimeBound : DeclOrTypeAttr {
let SimpleHandler = 1;
}
+def LifetimeCaptureBy : DeclOrTypeAttr {
+ let Spellings = [Clang<"lifetime_capture_by", 0>];
+ let Subjects = SubjectList<[ParmVar, ImplicitObjectParameter], ErrorDiag>;
+ let Args = [V
@@ -18,29 +18,42 @@
namespace clang::sema {
-/// Describes an entity that is being assigned.
-struct AssignedEntity {
- // The left-hand side expression of the assignment.
- Expr *LHS = nullptr;
+struct CapturingEntity {
hokein wrote:
+1.
I'd not change
@@ -1909,6 +1911,12 @@ void TypePrinter::printAttributedAfter(const
AttributedType *T,
OS << " [[clang::lifetimebound]]";
return;
}
+ if (T->getAttrKind() == attr::LifetimeCaptureBy) {
+// FIXME: Print the attribute arguments once we have a way to retrieve
thes
@@ -248,9 +256,12 @@ static void
visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path,
LocalVisitor Visit);
template static bool isRecordWithAttr(QualType Type) {
- if (auto *RD = Type->getAsCXXRecordDecl())
-re
@@ -1909,6 +1911,12 @@ void TypePrinter::printAttributedAfter(const
AttributedType *T,
OS << " [[clang::lifetimebound]]";
return;
}
+ if (T->getAttrKind() == attr::LifetimeCaptureBy) {
+// FIXME: Print the attribute arguments once we have a way to retrieve
thes
@@ -452,6 +452,7 @@ def ShiftOpParentheses: DiagGroup<"shift-op-parentheses">;
def OverloadedShiftOpParentheses: DiagGroup<"overloaded-shift-op-parentheses">;
def DanglingAssignment: DiagGroup<"dangling-assignment">;
def DanglingAssignmentGsl : DiagGroup<"dangling-assignment-gs
@@ -1107,8 +1172,32 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
Sema::CodeSynthesisContext::BuildingDeductionGuides)) {
auto *GG = cast(FPrime);
-Expr *IsDeducible = buildIsDeducibleConstraint(
-SemaRef, AliasTemplate, FPrime->getReturnType(), F
hokein wrote:
Forgot to push the new change of the test file after addressing the comment.
The buildbot failures should be fixed after
https://github.com/llvm/llvm-project/commit/56f75b5c1510cea7648cad0cb32e4e0810edd0d9.
https://github.com/llvm/llvm-project/pull/113180
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/113180
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Haojian Wu
Date: 2024-10-22T14:39:36+02:00
New Revision: 56f75b5c1510cea7648cad0cb32e4e0810edd0d9
URL:
https://github.com/llvm/llvm-project/commit/56f75b5c1510cea7648cad0cb32e4e0810edd0d9
DIFF:
https://github.com/llvm/llvm-project/commit/56f75b5c1510cea7648cad0cb32e4e0810edd0d9.diff
LO
@@ -4961,7 +4961,6 @@ void Sema::InstantiateFunctionDefinition(SourceLocation
PointOfInstantiation,
bool AtEndOfTU) {
if (Function->isInvalidDecl() || isa(Function))
return;
-
hokein wrote:
nit: unintended change
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/113180
>From f6a4945ea02a34deff3e9cbf7f6af87f96a26c4e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 21 Oct 2024 17:04:35 +0200
Subject: [PATCH 1/2] [clang] Lifetimebound in assignment operator should work
for no
@@ -330,8 +330,8 @@ struct StatusOr {
};
void test(StatusOr foo1, StatusOr foo2) {
- foo1 = Foo(); // expected-warning {{object backing the pointer foo1 will be
destroyed at the end}}
- // No warning on non-gsl annotated types.
- foo2 = NonAnnotatedFoo();
+ foo1 = Foo();
@@ -1882,6 +1882,46 @@ def LifetimeBound : DeclOrTypeAttr {
let SimpleHandler = 1;
}
+def LifetimeCaptureBy : DeclOrTypeAttr {
+ let Spellings = [Clang<"lifetime_capture_by", 0>];
+ let Subjects = SubjectList<[ParmVar, ImplicitObjectParameter], ErrorDiag>;
+ let Args = [V
@@ -3379,6 +3379,18 @@ def err_callback_callee_is_variadic : Error<
"'callback' attribute callee may not be variadic">;
def err_callback_implicit_this_not_available : Error<
"'callback' argument at position %0 references unavailable implicit 'this'">;
+
+def err_capture_by_
@@ -269,6 +271,40 @@ void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) {
}
}
+static bool IsPointerLikeType(QualType QT) {
+ QT = QT.getNonReferenceType();
+ // if (QT->isPointerType())
+ // return true;
+ auto *RD = QT->getAsCXXRecordDecl();
+ if (!RD)
+re
@@ -1094,6 +1094,24 @@ static bool pathOnlyHandlesGslPointer(IndirectLocalPath
&Path) {
return false;
}
+static bool
+isLifetimeboundInterleaveInGSL(llvm::ArrayRef PathRef)
{
hokein wrote:
> I am just wondering if this is the right approach to filter thi
@@ -780,3 +780,30 @@ void test13() {
}
} // namespace GH100526
+
+namespace test {
+
+struct [[gsl::Pointer]] FooOwner {};
+struct [[gsl::Pointer]] FooPointer {
+ FooPointer(const FooOwner&);
+};
+
+template
+struct [[gsl::Owner]] Container {
+ const T& get() const [[clang::
@@ -1960,24 +1960,38 @@ class ExplicitSpecifier {
class CXXDeductionGuideDecl : public FunctionDecl {
void anchor() override;
+public:
+ enum class SourceKind {
hokein wrote:
@cor3ntin, if you have any ideas for a better name, could you suggest one?
I thi
hokein wrote:
> Thanks for the reviews!
>
> > ```
> > * can you give a description if what needs to be done in subsequent PRs?
> > (maybe cxx_status.html should say "partial"
> > ```
>
> The remaining tasks are:
>
> * Supporting dependent using-declarators such as `using Derived::Base::Base`
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/114808
None
>From 38c41b134b7092d880ba349bcca1a7bb6887d1dc Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 4 Nov 2024 16:03:27 +0100
Subject: [PATCH] [clangd] Fix use-after-free issues in TidyProvider.cpp
---
cl
https://github.com/hokein commented:
(No action required) – we have other extensions in clangd e.g.
`references.container` `offsetEncoding`. Do we plan to do the same thing for
them?
https://github.com/llvm/llvm-project/pull/114699
___
cfe-commits ma
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/114044
>From 3cb4219e3f09c8a21ce49af7dbafee39eb3d46c6 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 1 Nov 2024 16:51:03 +0100
Subject: [PATCH 1/2] [clang] Fix the post-filtering heuristics for GSLPointer
case.
@@ -1093,6 +1093,87 @@ static bool pathOnlyHandlesGslPointer(const
IndirectLocalPath &Path) {
}
return false;
}
+// Result of analyzing the Path for GSLPointer.
+enum AnalysisResult {
+ // Path does not correspond to a GSLPointer.
+ NotGSLPointer,
+
+ // A relevant case
@@ -1093,6 +1093,87 @@ static bool pathOnlyHandlesGslPointer(const
IndirectLocalPath &Path) {
}
return false;
}
+// Result of analyzing the Path for GSLPointer.
+enum AnalysisResult {
hokein wrote:
We don’t have a strict policy on using enum class vs enum
@@ -1093,6 +1093,87 @@ static bool pathOnlyHandlesGslPointer(const
IndirectLocalPath &Path) {
}
return false;
}
+// Result of analyzing the Path for GSLPointer.
hokein wrote:
It is intended. I think these three `pathOnlyHandlesGslPointer`,
`AnalysisResul
@@ -793,3 +794,44 @@ void test13() {
}
} // namespace GH100526
+
+namespace LifetimeboundInterleave {
+
+const std::string& Ref(const std::string& abc [[clang::lifetimebound]]);
+std::string_view test1() {
+ std::string_view t1 = Ref(std::string()); // expected-warning {{obje
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/114044
>From 1252cfdea59e94a91750a49fd5aaab4a6c2650b6 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 1 Nov 2024 16:51:03 +0100
Subject: [PATCH 1/3] [clang] Fix the post-filtering heuristics for GSLPointer
case.
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/114859
>From 04254d2352a385df1ab57c855d6b5de6e668844d Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 4 Nov 2024 21:01:32 +0100
Subject: [PATCH 1/2] [clang] Add maintainer for Recovery expressions.
---
clang/Main
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/114044
>From 1252cfdea59e94a91750a49fd5aaab4a6c2650b6 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 1 Nov 2024 16:51:03 +0100
Subject: [PATCH 1/4] [clang] Fix the post-filtering heuristics for GSLPointer
case.
@@ -793,3 +794,44 @@ void test13() {
}
} // namespace GH100526
+
+namespace LifetimeboundInterleave {
+
+const std::string& Ref(const std::string& abc [[clang::lifetimebound]]);
hokein wrote:
Added.
https://github.com/llvm/llvm-project/pull/114044
__
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/114044
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/114044
>From fcd963645ee7f3f9c794160fca63d0bef292baf1 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 1 Nov 2024 16:51:03 +0100
Subject: [PATCH] [clang] Fix the post-filtering heuristics for GSLPointer
case.
---
hokein wrote:
Figured out a way to fix the false positives while not introducing many false
negatives. I think it is ready for review, and please take a look on the new
version.
https://github.com/llvm/llvm-project/pull/114044
___
cfe-commits mailing
https://github.com/hokein ready_for_review
https://github.com/llvm/llvm-project/pull/114044
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/114044
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/114808
>From 0d9ff0bff259c7ee626f7aa1c02000899bdfaa70 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 4 Nov 2024 19:34:17 +0100
Subject: [PATCH] [clangd] Fix use-after-free issues in TidyProvider.cpp
---
clang-to
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/114859
None
>From 04254d2352a385df1ab57c855d6b5de6e668844d Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 4 Nov 2024 21:01:32 +0100
Subject: [PATCH] [clang] Add maintainer for Recovery expressions.
---
clang/Ma
hokein wrote:
> can we instead change the function return types to be `TidyProvider` ? unless
> there's something we get by making these static lambdas (which isn't obvious
> to me).
Sure, Done.
https://github.com/llvm/llvm-project/pull/114808
___
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/114859
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -69,6 +69,12 @@ Sema
| aeternalmail\@gmail.com (email), Sirraide (GitHub), Ætérnal (Discord),
Sirraide (Discourse)
+Recovery AST
+
+| Haojian Wu
+| hokein.wu\@gmail.com (email), hokein (Phabricator), hokein (GitHub)
hokein wrote:
Added Discou
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/114808
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein ready_for_review
https://github.com/llvm/llvm-project/pull/114213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1094,6 +1094,24 @@ static bool pathOnlyHandlesGslPointer(IndirectLocalPath
&Path) {
return false;
}
+static bool
+isLifetimeboundInterleaveInGSL(llvm::ArrayRef PathRef)
{
hokein wrote:
> I was wondering if we can also look at the types here.
I had a
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/114213
This patch extends the filtering heuristic to apply for the Lifetimebound code
path.
This will suppress a common false positive:
```
namespace std {
template
struct unique_ptr {
T &operator*();
T *get() con
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/114213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/114213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Haojian Wu
Date: 2024-11-02T12:00:18+01:00
New Revision: 67c8b0efbe5c783f39556be2ee841441b50600b5
URL:
https://github.com/llvm/llvm-project/commit/67c8b0efbe5c783f39556be2ee841441b50600b5
DIFF:
https://github.com/llvm/llvm-project/commit/67c8b0efbe5c783f39556be2ee841441b50600b5.diff
LO
Author: Haojian Wu
Date: 2024-11-02T12:09:52+01:00
New Revision: 2804762e2643c793d12eeabf422b81f4de80ceea
URL:
https://github.com/llvm/llvm-project/commit/2804762e2643c793d12eeabf422b81f4de80ceea
DIFF:
https://github.com/llvm/llvm-project/commit/2804762e2643c793d12eeabf422b81f4de80ceea.diff
LO
@@ -3967,6 +3967,69 @@ Attribute ``trivial_abi`` has no effect in the following
cases:
}];
}
+
+def LifetimeCaptureByDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``lifetime_capture_by(X)`` attribute on a function parameter or
implic
@@ -3967,6 +3967,80 @@ Attribute ``trivial_abi`` has no effect in the following
cases:
}];
}
+
+def LifetimeCaptureByDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+Similar to `lifetimebound`_, the ``lifetime_capture_by(X)`` attribute on a
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -ast-dump | FileCheck %s
+
+// Verify that we print the [[clang::lifetime_capture_by(X)]] attribute.
+
+struct S {
+void foo(int &a, int &b) [[clang::lifetime_capture_by(a, b, global)]];
+};
+
+// CHECK: CXXMethodDecl {{.*}}clang::lifetim
@@ -3967,6 +3967,80 @@ Attribute ``trivial_abi`` has no effect in the following
cases:
}];
}
+
+def LifetimeCaptureByDocs : Documentation {
hokein wrote:
nit: let's move this section immediately right after the `LifetimeboundDocs`.
https://github.com/llvm
2601 - 2700 of 3165 matches
Mail list logo