@@ -964,17 +966,34 @@ static bool
pathOnlyInitializesGslPointer(IndirectLocalPath &Path) {
return false;
}
-void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity,
+void checkExprLifetime(Sema &SemaRef, const CheckingEntity &CEntity,
hokein w
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 closed 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 approved this pull request.
thanks!
https://github.com/llvm/llvm-project/pull/97327
___
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/97408
The lifetime_pointer case is handled before the assignment case. In some
scenario where we have the gsl::Pointer attr, we will end up with emitting the
`-Wdangling-gsl` warning for the assignment case. This means
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/97408
___
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/97408
>From d1ea90918702fec85714bdd9caa68942eb4a4218 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 2 Jul 2024 14:12:36 +0200
Subject: [PATCH 1/2] [clang] Don't emit the warn_dangling_lifetime_pointer
diagnostic
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/97408
>From d1ea90918702fec85714bdd9caa68942eb4a4218 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 2 Jul 2024 14:12:36 +0200
Subject: [PATCH 1/3] [clang] Don't emit the warn_dangling_lifetime_pointer
diagnostic
@@ -1023,7 +1023,7 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
return false;
}
- if (IsGslPtrInitWithGslTempOwner && DiagLoc.isValid()) {
+ if (InitEntity && IsGslPtrInitWithGslTempOwner && DiagLoc.isValid()) {
hokein wrote:
Do
@@ -0,0 +1,15 @@
+
+// RUN: %clang_cc1 -std=c++20 -verify -Wno-dangling-assignment %s
hokein wrote:
Done.
https://github.com/llvm/llvm-project/pull/97408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/97408
___
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/97473
This patch extend the lifetimebound analysis to cover assignments between
pointer-like objects (`gsl::Pointer`). Specifically, it tracks the RHS of
assignment operators to determine if it points to a temporary ob
https://github.com/hokein converted_to_draft
https://github.com/llvm/llvm-project/pull/97473
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
Withdrawing it from review now. I seem to find a potentially better approach
and will upload a revised version.
https://github.com/llvm/llvm-project/pull/97473
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/97473
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2220,23 +2220,103 @@ namespace {
class ExtractTypeForDeductionGuide
: public TreeTransform {
llvm::SmallVectorImpl &MaterializedTypedefs;
+ ClassTemplateDecl *NestedPattern;
+ const MultiLevelTemplateArgumentList *OuterInstantiationArgs;
public:
typedef TreeTran
hokein wrote:
Friendly ping, I'd like to get it landed before the release cut.
https://github.com/llvm/llvm-project/pull/93533
___
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/93533
>From b0b8d5b064c35e4f0b66e2538c4172afa9665dbe Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 17 May 2024 15:28:48 +0200
Subject: [PATCH 1/4] [clang] CTAD alias: fix transformation for require-clause
expr P
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/93533
___
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 much better.
https://github.com/llvm/llvm-project/pull/94740
___
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/98013
As described in
https://github.com/llvm/llvm-project/issues/90209#issuecomment-2135972202,
Clang may not preserve enough information during template argument deduction.
This can result in a merely canonical `Tem
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/96686
>From c835f5acbcb9c768c525df835d09fbe301edd197 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 25 Jun 2024 10:16:54 +0200
Subject: [PATCH 1/2] [clang] CTAD: Fix deduction guides for alias are not
generated f
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/96686
>From c835f5acbcb9c768c525df835d09fbe301edd197 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 25 Jun 2024 10:16:54 +0200
Subject: [PATCH 1/2] [clang] CTAD: Fix deduction guides for alias are not
generated f
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/106997
___
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/107213
This pull request enhances the GSL lifetime analysis to detect situations where
a dangling `Container` object is constructed:
```cpp
std::vector bad = {std::string()}; // dangling
```
The assignment case is n
@@ -393,11 +392,9 @@ static void visitFunctionCallArguments(IndirectLocalPath
&Path, Expr *Call,
Path.push_back({IndirectLocalPathEntry::LifetimeBoundCall, Arg, D});
if (Arg->isGLValue())
visitLocalsRetainedByReferenceBinding(Path, Arg, RK_ReferenceBinding,
-
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/105884
>From 0ec87486d6a42ea0ddb128621afd023b9ca4ddd4 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 23 Aug 2024 21:42:20 +0200
Subject: [PATCH 1/4] [clang] Remove the EnableLifetimeWarnings flag in
lifetime anal
https://github.com/hokein edited
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
https://github.com/hokein edited
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
https://github.com/hokein closed
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
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/104556
>From aa8dda3e3ccd24f12e50509f79ade63b90cf97b5 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 19 Aug 2024 13:46:16 +0200
Subject: [PATCH] [clang] Diagnose dangling issues for cases where a
gsl-pointer is c
@@ -344,9 +347,11 @@ static void handleGslAnnotatedTypes(IndirectLocalPath
&Path, Expr *Call,
break;
}
}
-Path.push_back({Value ? IndirectLocalPathEntry::GslPointerInit
- : IndirectLocalPathEntry::GslReferenceInit,
-
@@ -360,29 +365,26 @@ static void handleGslAnnotatedTypes(IndirectLocalPath
&Path, Expr *Call,
if (auto *MCE = dyn_cast(Call)) {
const auto *MD = cast_or_null(MCE->getDirectCallee());
if (MD && shouldTrackImplicitObjectArg(MD))
- VisitPointerArg(MD, MCE->getImpl
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
@@ -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
@@ -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/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
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
hokein wrote:
After further testing, this change introduces a new false positive -- we emit a
return-stack-address warning for the following case, this is not correct.
```
std::vector kk() {
std::vector s;
return s;
}
```
Looking now.
https://github.com/llvm/llvm-project/pull/107213
_
Author: Haojian Wu
Date: 2024-09-05T13:18:39+02:00
New Revision: 87b4b648585f69a2ea148e86543aa31474e59acd
URL:
https://github.com/llvm/llvm-project/commit/87b4b648585f69a2ea148e86543aa31474e59acd
DIFF:
https://github.com/llvm/llvm-project/commit/87b4b648585f69a2ea148e86543aa31474e59acd.diff
LO
Author: Haojian Wu
Date: 2024-09-05T13:24:38+02:00
New Revision: 3e070906eff720dc44aee86e533e12aafc8bb14b
URL:
https://github.com/llvm/llvm-project/commit/3e070906eff720dc44aee86e533e12aafc8bb14b
DIFF:
https://github.com/llvm/llvm-project/commit/3e070906eff720dc44aee86e533e12aafc8bb14b.diff
LO
@@ -326,24 +326,11 @@ static bool shouldTrackFirstArgument(const FunctionDecl
*FD) {
return false;
}
-static bool implicitObjectParamIsLifetimeBound(const FunctionDecl *FD) {
- const TypeSourceInfo *TSI = FD->getTypeSourceInfo();
- if (!TSI)
-return false;
- // Don't
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/104556
>From aba7fdb8ad0fda5486abd896a5029b661e4982bb Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 19 Aug 2024 13:46:16 +0200
Subject: [PATCH] [clang] Diagnose dangling issues for cases where a
gsl-pointer is c
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/104556
___
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/104556
___
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/107213
>From f6a9125f69ffe5231c21ad856e04cc1ff5127de5 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 28 Aug 2024 09:59:41 +0200
Subject: [PATCH] [clang] Diagnose dangling issues for "Container"
case.
We teach th
@@ -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
@@ -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 {
hokei
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/107213
>From f6a9125f69ffe5231c21ad856e04cc1ff5127de5 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
@@ -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:
@@ -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
@@ -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
hokein wrote:
I have fixed the false positives, and added testcases for them. (I have tested
this patch on our internal codebase, no new false positives being found).
https://github.com/llvm/llvm-project/pull/107213
___
cfe-commits mailing list
cfe-co
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/107213
>From 73ed8a2e42415b064cf8a35a84cc8c0c1dd20988 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 28 Aug 2024 09:59:41 +0200
Subject: [PATCH 1/3] [clang] Diagnose dangling issues for
"Container" case.
We teac
@@ -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
@@ -990,13 +1009,16 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
// int &p = *localUniquePtr;
// someContainer.add(std::move(localUniquePtr));
// return p;
-IsLocalGslOwner = isRecordWithAttr(L->getType());
+IsLocalGslOwner =
https://github.com/hokein closed
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/hokein created
https://github.com/llvm/llvm-project/pull/108205
This is a follow up of https://github.com/llvm/llvm-project/pull/107213,
supporting the assignment case.
With this patch, clang now diagnoses cases where a dangling
`container` is assigned, e.g.
```
void test(
Author: Haojian Wu
Date: 2024-08-09T08:19:49+02:00
New Revision: 16dadecc05fa4986d4522c2c3a09a7628feb0fd4
URL:
https://github.com/llvm/llvm-project/commit/16dadecc05fa4986d4522c2c3a09a7628feb0fd4
DIFF:
https://github.com/llvm/llvm-project/commit/16dadecc05fa4986d4522c2c3a09a7628feb0fd4.diff
LO
https://github.com/hokein approved this pull request.
thanks.
https://github.com/llvm/llvm-project/pull/102615
___
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/103716
With this patch, clang now automatically adds ``[[clang::lifetimebound]]`` to
the parameters of `std::span, std::string_view` constructors, this enables
Clang to capture more cases where the returned reference o
https://github.com/hokein approved this pull request.
https://github.com/llvm/llvm-project/pull/104033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Haojian Wu
Date: 2024-08-15T08:44:46+02:00
New Revision: 3eaf483c296bd95411bc855674707f289790e2a2
URL:
https://github.com/llvm/llvm-project/commit/3eaf483c296bd95411bc855674707f289790e2a2
DIFF:
https://github.com/llvm/llvm-project/commit/3eaf483c296bd95411bc855674707f289790e2a2.diff
LO
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/104556
The warning is not emitted for the case `string_view c =
std::vector({""}).at(0);` because we bail out during the visit of
the LHS at [this
point](https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/C
hokein wrote:
Testing it a bit more, unfortunately, it has a false positive on the following
case:
```
const char* kk() {
std::optional k;
return k.value().data(); // dangling warning, but we should not diagnose it.
}
```
https://github.com/llvm/llvm-project/pull/104556
___
Author: Haojian Wu
Date: 2024-04-04T09:58:43+02:00
New Revision: 35886dc63a2d024e20c10d2e1cb3f5fa5d9f72cc
URL:
https://github.com/llvm/llvm-project/commit/35886dc63a2d024e20c10d2e1cb3f5fa5d9f72cc
DIFF:
https://github.com/llvm/llvm-project/commit/35886dc63a2d024e20c10d2e1cb3f5fa5d9f72cc.diff
LO
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/87782
We have two identical "DeduceTemplateArguments" implementations for class and
variable partial template specializations, this patch removes the duplicated
code.
>From 209ace7709ca176216a94cfd10edee13ea26955d Mo
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/85904
>From a1ac905dfbcfd1d615c5326c45c7f599826cc097 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 15 Mar 2024 10:47:09 +0100
Subject: [PATCH 1/4] [clang] Move the aggreate deduction guide cache login to
SemaTem
@@ -9713,7 +9713,8 @@ class Sema final {
/// not already done so.
void DeclareImplicitDeductionGuides(TemplateDecl *Template,
SourceLocation Loc);
- FunctionTemplateDecl *DeclareImplicitDeductionGuideFromInitList(
+ /// Declare aggreg
@@ -2792,6 +2811,24 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
} else {
assert(false && "unhandled RHS type of the alias");
}
+ return {Template, AliasRhsTemplateArgs};
+}
+
+// Build deduction guides for a type alias template.
+void DeclareImplicitDeductionGu
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/87782
>From 209ace7709ca176216a94cfd10edee13ea26955d Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 5 Apr 2024 15:58:00 +0200
Subject: [PATCH 1/2] [Sema] Remove the duplicated `DeductionTemplateArguments`
for par
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/87782
___
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/85904
>From cd104cb541901ff6101a4bd471dd7f46703c3db1 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 15 Mar 2024 10:47:09 +0100
Subject: [PATCH 1/4] [clang] Move the aggreate deduction guide cache login to
SemaTem
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/85904
___
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/87346
___
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.
https://github.com/llvm/llvm-project/pull/88236
___
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/88236
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -89,7 +89,9 @@ const CodeCompleteOptions::CodeCompletionRankingModel
namespace {
-CompletionItemKind toCompletionItemKind(index::SymbolKind Kind) {
+CompletionItemKind
+toCompletionItemKind(index::SymbolKind Kind,
+ const llvm::StringRef *Signature = nu
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/86512
>From 0eec9639530a137da6c4c4b2cc4249a3f9dd9939 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 25 Mar 2024 15:10:51 +0100
Subject: [PATCH] [clang] Implement a bitwise_copyable builtin type trait.
This patch
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/86512
>From 3ce87797dbc36ae792b4d82077cd8f27f1eee53e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 25 Mar 2024 15:10:51 +0100
Subject: [PATCH] [clang] Implement a bitwise_copyable builtin type trait.
This patch
hokein wrote:
@vgvassilev
The reland d999ce0302f06d250f6d496b56a5a5f2dc331e61 makes the clang reject the
valid code now:
```
$ cat /tmp/t33.cpp
#include
#include
int main() {
}
hokein wrote:
Thanks for the prompt response. I think limiting it to C-only will fix the
issue (note that there is no `C` in `LangOpts`, you may want to use
`!getLangOpts().CPlusPlus` to exclude C++).
https://github.com/llvm/llvm-project/pull/89804
_
hokein wrote:
> Out of curiosity, in what context you use -fincremental-extensions?
The code snippet I provided is extracted from our internal test. We have an
internal clang-tool (with the `incremental-extensions` on) to generate headers
https://github.com/llvm/llvm-project/pull/89804
__
hokein wrote:
> I want to somehow record this breakage in the form of a test for our future
> selves when decide to revisit this workaround-looking code.
This is the processed file
https://gist.github.com/hokein/e4a5881329c3956494afa2de7d350476.
> I am a bit overwhelmed right now, are you wi
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/94471
The incremental processing mode doesn't seem to work well for C++.
>From 8457c4aa1758d10188da5978d30d2d1ed505e01e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 5 Jun 2024 15:46:56 +0200
Subject: [PATCH]
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/94471
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
unfortunately, this seems to break an existing test:
```
OK ] InterpreterTest.IncrementalInputTopLevelDecls (66 ms)
[ RUN ] InterpreterTest.Errors
ClangReplInterpreterTests:
/usr/local/google/home/hokein/workspace/llvm-project/clang/lib/Sema/IdentifierResolver.cpp:228:
hokein wrote:
> Oh, we need to adjust
> https://github.com/root-project/root/blob/be5d34934de883270683030b3af2cd1195d17ea8/cmake/modules/RootMacros.cmake#L272
> to skip in case of C++...
The link points to an irrelevant project, I assume you mean here
https://github.com/llvm/llvm-project/blob
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/94471
>From 8457c4aa1758d10188da5978d30d2d1ed505e01e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 5 Jun 2024 15:46:56 +0200
Subject: [PATCH 1/2] Fix clang reject valid C++ code after
d999ce0302f06d250f6d496b56a
hokein wrote:
I have update a new version, please take a second look.
https://github.com/llvm/llvm-project/pull/94471
___
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/94471
>From 8457c4aa1758d10188da5978d30d2d1ed505e01e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 5 Jun 2024 15:46:56 +0200
Subject: [PATCH 1/3] Fix clang reject valid C++ code after
d999ce0302f06d250f6d496b56a
@@ -413,7 +413,9 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit
&PTU) {
if (!ND)
continue;
// Check if we need to clean up the IdResolver chain.
-if (ND->getDeclName().getFETokenInfo())
+if (ND->getDeclName().getFETokenInfo() &&
+CI-
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/94471
>From 8457c4aa1758d10188da5978d30d2d1ed505e01e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 5 Jun 2024 15:46:56 +0200
Subject: [PATCH 1/4] Fix clang reject valid C++ code after
d999ce0302f06d250f6d496b56a
hokein wrote:
I'm landing it now to unblock our integration. I'm happy to address any post
comments.
https://github.com/llvm/llvm-project/pull/94471
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/94471
___
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/86512
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
2101 - 2200 of 3165 matches
Mail list logo