https://github.com/usx95 approved this pull request.
Thanks. LGTM.
https://github.com/llvm/llvm-project/pull/109653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -327,6 +369,103 @@ static bool shouldTrackFirstArgument(const FunctionDecl
*FD) {
return false;
}
+// Returns true if the given constructor is a copy-like constructor, such as
+// `Ctor(Owner&&)` or `Ctor(const Owner&)`.
+static bool isCopyLikeConstructor(const CXXConstr
@@ -357,35 +369,101 @@ static bool shouldTrackFirstArgument(const FunctionDecl
*FD) {
return false;
}
+// Returns true if the given constructor is a copy-like constructor, such as
+// `Ctor(Owner&&)` or `Ctor(const Owner&)`.
+static bool isCopyLikeConstructor(const CXXConst
@@ -285,6 +285,18 @@ static bool isContainerOfPointer(const RecordDecl
*Container) {
}
return false;
}
+static bool isContainerOfOwner(const RecordDecl *Container) {
+ if (const auto *CTSD =
+ dyn_cast_if_present(Container)) {
usx95 wrote:
nit:
https://github.com/usx95 approved this pull request.
https://github.com/llvm/llvm-project/pull/108344
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -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
https://github.com/usx95 approved this pull request.
LGTM. Thanks.
https://github.com/llvm/llvm-project/pull/108344
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -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]];
+};
usx95 wrote:
Some ideas: https://godbolt.org/z/Y6nPM9j1b
Feel free
@@ -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
@@ -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]];
+};
usx95 wrote:
This is a nice test case for coverage of interactions
@@ -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
https://github.com/usx95 commented:
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
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/108344
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/108197
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
usx95 wrote:
Thanks for the review. Landing now. For other reviewers, feel free to drop more
comments, and I would be happy to address in a followup.
https://github.com/llvm/llvm-project/pull/108197
___
cfe-commits mailing list
cfe-commits@lists.llvm.
https://github.com/usx95 updated
https://github.com/llvm/llvm-project/pull/108197
>From 5901d82ea0543074853b963f7dc9106a6fe3bcee Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Wed, 11 Sep 2024 11:33:45 +
Subject: [PATCH 1/7] [clang] Do not expand pack while retaining expansion
---
cl
https://github.com/usx95 updated
https://github.com/llvm/llvm-project/pull/108197
>From 5901d82ea0543074853b963f7dc9106a6fe3bcee Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Wed, 11 Sep 2024 11:33:45 +
Subject: [PATCH 1/7] [clang] Do not expand pack while retaining expansion
---
cl
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
usx95 wrote:
Done.
https://github.com/llvm/llvm-project/pull/108197
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
https://github.com/usx95 updated
https://github.com/llvm/llvm-project/pull/108197
>From 5901d82ea0543074853b963f7dc9106a6fe3bcee Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Wed, 11 Sep 2024 11:33:45 +
Subject: [PATCH 1/6] [clang] Do not expand pack while retaining expansion
---
cl
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/108197
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/108197
___
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/108197
>From 5901d82ea0543074853b963f7dc9106a6fe3bcee Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Wed, 11 Sep 2024 11:33:45 +
Subject: [PATCH 1/5] [clang] Do not expand pack while retaining expansion
---
cl
usx95 wrote:
Thanks. I have moved this to `ForgetPartiallySubstitutedPackRAII`.
https://github.com/llvm/llvm-project/pull/108197
___
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/108197
>From 5901d82ea0543074853b963f7dc9106a6fe3bcee Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Wed, 11 Sep 2024 11:33:45 +
Subject: [PATCH 1/4] [clang] Do not expand pack while retaining expansion
---
cl
https://github.com/usx95 updated
https://github.com/llvm/llvm-project/pull/108197
>From 5901d82ea0543074853b963f7dc9106a6fe3bcee Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Wed, 11 Sep 2024 11:33:45 +
Subject: [PATCH 1/3] [clang] Do not expand pack while retaining expansion
---
cl
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/108197
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -601,17 +601,23 @@ void test() {
std::optional o4 = std::optional(s);
// FIXME: should work for assignment cases
usx95 wrote:
nit: remove fixme.
https://github.com/llvm/llvm-project/pull/108205
___
cfe-comm
https://github.com/usx95 approved this pull request.
https://github.com/llvm/llvm-project/pull/108205
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/108197
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/108197
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 created
https://github.com/llvm/llvm-project/pull/108197
Consider when Input[I] is a VarDecl with parameter pack. We would have already
expanded the pack before the code change in the loop`for (unsigned I = 0; I !=
*NumExpansions; ++I) {`.
Now in `if (RetainExpansion)
https://github.com/usx95 updated
https://github.com/llvm/llvm-project/pull/108197
>From 5901d82ea0543074853b963f7dc9106a6fe3bcee Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Wed, 11 Sep 2024 11:33:45 +
Subject: [PATCH 1/2] [clang] Do not expand pack while retaining expansion
---
cl
https://github.com/usx95 approved this pull request.
https://github.com/llvm/llvm-project/pull/107213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -309,7 +309,10 @@ enum BuiltinTemplateKind : int {
BTK__make_integer_seq,
/// This names the __type_pack_element BuiltinTemplateDecl.
- BTK__type_pack_element
+ BTK__type_pack_element,
+
+ /// This names the __type_list_dedup BuiltinTemplateDecl.
+ BTK__type_list_de
@@ -38,9 +40,11 @@
#include "clang/Sema/Template.h"
#include "clang/Sema/TemplateDeduction.h"
#include "llvm/ADT/BitVector.h"
+#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
+#include "
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/106730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 commented:
We also need documentation explaining the new builtin.
Can you also add ReleaseNotes.
https://github.com/llvm/llvm-project/pull/106730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/c
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/107213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/107213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -990,13 +1009,16 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
// int &p = *localUniquePtr;
// someContainer.add(std::move(localUniquePtr));
// return p;
-IsLocalGslOwner = isRecordWithAttr(L->getType());
+IsLocalGslOwner =
@@ -292,7 +292,7 @@ Improvements to Clang's diagnostics
- Clang now warns for u8 character literals used in C23 with
``-Wpre-c23-compat`` instead of ``-Wpre-c++17-compat``.
-- Clang now diagnoses cases where a dangling `GSLOwner`` object is
constructed, e.g. `std::vector v
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/107213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 approved this pull request.
LGTM. Thanks.
https://github.com/llvm/llvm-project/pull/107213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/107213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/107213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/107213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -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);
-
@@ -525,3 +544,31 @@ void test() {
std::string_view svjkk1 = ReturnStringView(StrCat("bar", "x")); //
expected-warning {{object backing the pointer will be destroyed at the end of
the full-expression}}
}
} // namespace GH100549
+
+namespace GH100526 {
usx95
@@ -6690,6 +6690,20 @@ When the Owner's lifetime ends, it will consider the
Pointer to be dangling.
P.getInt(); // P is dangling
}
+If a template class is annotated with [[gsl::Owner]], and the first
instantiated
+template argument is a [[gsl::Pointer]] type, the analy
@@ -525,3 +544,31 @@ void test() {
std::string_view svjkk1 = ReturnStringView(StrCat("bar", "x")); //
expected-warning {{object backing the pointer will be destroyed at the end of
the full-expression}}
}
} // namespace GH100549
+
+namespace GH100526 {
+void test() {
+ std:
@@ -525,3 +544,31 @@ void test() {
std::string_view svjkk1 = ReturnStringView(StrCat("bar", "x")); //
expected-warning {{object backing the pointer will be destroyed at the end of
the full-expression}}
}
} // namespace GH100549
+
+namespace GH100526 {
+void test() {
+ std:
@@ -278,6 +278,8 @@ Improvements to Clang's diagnostics
- The lifetimebound and GSL analysis in clang are coherent, allowing clang to
detect more use-after-free bugs. (#GH100549).
+- Clang now diagnoses cases where a dangling `GSLOwner`` object is
constructed, e.g. `std::ve
@@ -6690,6 +6690,20 @@ When the Owner's lifetime ends, it will consider the
Pointer to be dangling.
P.getInt(); // P is dangling
}
+If a template class is annotated with [[gsl::Owner]], and the first
instantiated
+template argument is a [[gsl::Pointer]] type, the analy
@@ -525,3 +544,31 @@ void test() {
std::string_view svjkk1 = ReturnStringView(StrCat("bar", "x")); //
expected-warning {{object backing the pointer will be destroyed at the end of
the full-expression}}
}
} // namespace GH100549
+
+namespace GH100526 {
+void test() {
+ std:
https://github.com/usx95 commented:
Thanks. LG. Some comments on adding more tests.
https://github.com/llvm/llvm-project/pull/107213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/107213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -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}}
---
@@ -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}}
---
@@ -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);
-
@@ -363,10 +363,14 @@ static bool implicitObjectParamIsLifetimeBound(const
FunctionDecl *FD) {
if (ATL.getAttrAs())
return true;
}
-
return isNormalAsisgnmentOperator(FD);
}
+bool isFirstTemplateArgumentGSLPointer(const TemplateArgumentList &TAs) {
+ return
https://github.com/usx95 commented:
Thanks. This looks quite useful.
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.
https
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/107213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -152,6 +154,11 @@ timeTraceProfilerBegin(StringRef Name,
TimeTraceProfilerEntry *timeTraceAsyncProfilerBegin(StringRef Name,
StringRef Detail);
+// Mark an instant event.
+void timeTraceProfilerInsert(StringRef Name,
+
@@ -104,6 +105,23 @@ struct llvm::TimeTraceProfilerEntry {
}
};
+struct InProgressEntry {
+ std::unique_ptr Event;
+ std::vector InstantEvents;
usx95 wrote:
Can you add documentation about InstantEvents and that they are associated with
a parent duration
@@ -18046,6 +18048,19 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc,
FunctionDecl *Func,
std::make_pair(Func, PointOfInstantiation));
// Notify the consumer that a function was implicitly instantiated.
Consumer.HandleCXXImplici
@@ -18046,6 +18048,19 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc,
FunctionDecl *Func,
std::make_pair(Func, PointOfInstantiation));
// Notify the consumer that a function was implicitly instantiated.
Consumer.HandleCXXImplici
@@ -114,27 +132,46 @@ struct llvm::TimeTraceProfiler {
llvm::get_thread_name(ThreadName);
}
- TimeTraceProfilerEntry *begin(std::string Name,
-llvm::function_ref Detail,
-bool AsyncEvent = false) {
-Sta
https://github.com/usx95 updated
https://github.com/llvm/llvm-project/pull/106277
>From b2bb29ec61f4e9a7b3b7f9bcd0f5b7a12c844d14 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Tue, 27 Aug 2024 19:44:34 +
Subject: [PATCH 1/4] [clang] Properly set file and line info for -ftime-trace
---
https://github.com/usx95 updated
https://github.com/llvm/llvm-project/pull/106277
>From b2bb29ec61f4e9a7b3b7f9bcd0f5b7a12c844d14 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Tue, 27 Aug 2024 19:44:34 +
Subject: [PATCH 1/3] [clang] Properly set file and line info for -ftime-trace
---
@@ -223,15 +223,15 @@ Frontend (test.cc)
| | | | EvaluateAsRValue ()
| | | EvaluateAsBooleanCondition ()
| | | | EvaluateAsRValue ()
-| ParseDeclarationOrFunctionDefinition (test.cc:16:1)
+| ParseDeclarationOrFunctionDefinition (test.cc:16)
| | ParseFunctionDefinition (slow_te
@@ -1255,8 +1256,12 @@ Parser::DeclGroupPtrTy
Parser::ParseDeclarationOrFunctionDefinition(
// Add an enclosing time trace scope for a bunch of small scopes with
// "EvaluateAsConstExpr".
llvm::TimeTraceScope TimeScope("ParseDeclarationOrFunctionDefinition", [&]()
{
-
@@ -1255,8 +1256,12 @@ Parser::DeclGroupPtrTy
Parser::ParseDeclarationOrFunctionDefinition(
// Add an enclosing time trace scope for a bunch of small scopes with
// "EvaluateAsConstExpr".
llvm::TimeTraceScope TimeScope("ParseDeclarationOrFunctionDefinition", [&]()
{
-
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/106277
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
usx95 wrote:
What is the reason for changing from `llvm::TimeTraceProfilerEntry*` to
`std::shared_ptr`? We are also adding significant
devirtualization cost with the added different event types.
Can we do something like this:
```
enum class TimeTraceEventType { DurationEvent, InstantEvent };
st
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/106277
___
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/106277
>From b2bb29ec61f4e9a7b3b7f9bcd0f5b7a12c844d14 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Tue, 27 Aug 2024 19:44:34 +
Subject: [PATCH 1/2] [clang] Properly set file and line info for -ftime-trace
---
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/106277
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 created
https://github.com/llvm/llvm-project/pull/106277
Uniformly use file and line metadata information in `-ftime-trace` profiles.
This makes post processing simpler and not fragile.
>From b2bb29ec61f4e9a7b3b7f9bcd0f5b7a12c844d14 Mon Sep 17 00:00:00 2001
From: Utkar
https://github.com/usx95 updated
https://github.com/llvm/llvm-project/pull/105817
>From 77003063912f691d246c4f94dd7a952ceace9268 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 23 Aug 2024 11:57:40 +
Subject: [PATCH 1/3] [clang] Compiler builtin for deduping a list of types
---
.
https://github.com/usx95 approved this pull request.
https://github.com/llvm/llvm-project/pull/105884
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -408,7 +405,8 @@ static void visitFunctionCallArguments(IndirectLocalPath
&Path, Expr *Call,
// Once we initialized a value with a reference, it can no longer dangle.
if (!Value) {
for (const IndirectLocalPathEntry &PE : llvm::reverse(Path)) {
-if (PE.
@@ -408,7 +405,8 @@ static void visitFunctionCallArguments(IndirectLocalPath
&Path, Expr *Call,
// Once we initialized a value with a reference, it can no longer dangle.
if (!Value) {
for (const IndirectLocalPathEntry &PE : llvm::reverse(Path)) {
-if (PE.
@@ -461,15 +457,15 @@ static void visitFunctionCallArguments(IndirectLocalPath
&Path, Expr *Call,
I != N; ++I) {
if (CheckCoroCall || Callee->getParamDecl(I)->hasAttr())
VisitLifetimeBoundArg(Callee->getParamDecl(I), Args[I]);
-else if (EnableLifetimeWarni
https://github.com/usx95 approved this pull request.
LGTM. Thanks.
https://github.com/llvm/llvm-project/pull/105838
___
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/105817
>From 77003063912f691d246c4f94dd7a952ceace9268 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 23 Aug 2024 11:57:40 +
Subject: [PATCH 1/2] [clang] Compiler builtin for deduping a list of types
---
.
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/105817
___
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/105817
>From 77003063912f691d246c4f94dd7a952ceace9268 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 23 Aug 2024 11:57:40 +
Subject: [PATCH] [clang] Compiler builtin for deduping a list of types
---
.../c
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/105817
___
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/105817
>From 77003063912f691d246c4f94dd7a952ceace9268 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 23 Aug 2024 11:57:40 +
Subject: [PATCH] [clang] Compiler builtin for deduping a list of types
---
.../c
https://github.com/usx95 created
https://github.com/llvm/llvm-project/pull/105817
None
>From 77003063912f691d246c4f94dd7a952ceace9268 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 23 Aug 2024 11:57:40 +
Subject: [PATCH] [clang] Compiler builtin for deduping a list of types
---
https://github.com/usx95 approved this pull request.
https://github.com/llvm/llvm-project/pull/104906
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/104906
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 approved this pull request.
Thanks. This looks great.
https://github.com/llvm/llvm-project/pull/104906
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -478,22 +444,38 @@ static void visitLifetimeBoundArguments(IndirectLocalPath
&Path, Expr *Call,
CheckCoroObjArg = false;
if (implicitObjectParamIsLifetimeBound(Callee) || CheckCoroObjArg)
VisitLifetimeBoundArg(Callee, ObjectArg);
+else if (EnableGSLAnaly
@@ -439,6 +378,8 @@ static void visitLifetimeBoundArguments(IndirectLocalPath
&Path, Expr *Call,
if (!Callee)
return;
+ bool EnableGSLAnalysis = !Callee->getASTContext().getDiagnostics().isIgnored(
usx95 wrote:
Can we move this to `VisitGSLPointerArg`
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/104906
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -478,13 +449,32 @@ static void visitLifetimeBoundArguments(IndirectLocalPath
&Path, Expr *Call,
CheckCoroObjArg = false;
if (implicitObjectParamIsLifetimeBound(Callee) || CheckCoroObjArg)
VisitLifetimeBoundArg(Callee, ObjectArg);
+else if (EnableLifetime
@@ -478,13 +449,32 @@ static void visitLifetimeBoundArguments(IndirectLocalPath
&Path, Expr *Call,
CheckCoroObjArg = false;
if (implicitObjectParamIsLifetimeBound(Callee) || CheckCoroObjArg)
VisitLifetimeBoundArg(Callee, ObjectArg);
+else if (EnableLifetime
1 - 100 of 683 matches
Mail list logo