Author: Haojian Wu
Date: 2022-01-27T22:19:09+01:00
New Revision: 15dfe7a3f12c4862999e275195a14ef746ab975a
URL:
https://github.com/llvm/llvm-project/commit/15dfe7a3f12c4862999e275195a14ef746ab975a
DIFF:
https://github.com/llvm/llvm-project/commit/15dfe7a3f12c4862999e275195a14ef746ab975a.diff
LO
Author: Haojian Wu
Date: 2022-02-23T09:21:34+01:00
New Revision: a2fab82f33bb8cc38cd1dfe7856dae706ce4297a
URL:
https://github.com/llvm/llvm-project/commit/a2fab82f33bb8cc38cd1dfe7856dae706ce4297a
DIFF:
https://github.com/llvm/llvm-project/commit/a2fab82f33bb8cc38cd1dfe7856dae706ce4297a.diff
LO
Author: Haojian Wu
Date: 2022-02-23T21:34:54+01:00
New Revision: 302ca279cb83043ef7d60115eb5ba58f12064a4a
URL:
https://github.com/llvm/llvm-project/commit/302ca279cb83043ef7d60115eb5ba58f12064a4a
DIFF:
https://github.com/llvm/llvm-project/commit/302ca279cb83043ef7d60115eb5ba58f12064a4a.diff
LO
Author: Haojian Wu
Date: 2022-03-02T09:53:52+01:00
New Revision: 28efb1ccf5eabd25119a3a7df2c2c1f1407dbfec
URL:
https://github.com/llvm/llvm-project/commit/28efb1ccf5eabd25119a3a7df2c2c1f1407dbfec
DIFF:
https://github.com/llvm/llvm-project/commit/28efb1ccf5eabd25119a3a7df2c2c1f1407dbfec.diff
LO
Author: Haojian Wu
Date: 2022-03-02T10:05:49+01:00
New Revision: 7f99e1870f776a25e03526e3190105c094750d98
URL:
https://github.com/llvm/llvm-project/commit/7f99e1870f776a25e03526e3190105c094750d98
DIFF:
https://github.com/llvm/llvm-project/commit/7f99e1870f776a25e03526e3190105c094750d98.diff
LO
Author: Haojian Wu
Date: 2022-03-02T10:19:17+01:00
New Revision: 05d7e9f68ef005c43576278fe5d7ac03869974f3
URL:
https://github.com/llvm/llvm-project/commit/05d7e9f68ef005c43576278fe5d7ac03869974f3
DIFF:
https://github.com/llvm/llvm-project/commit/05d7e9f68ef005c43576278fe5d7ac03869974f3.diff
LO
Author: Haojian Wu
Date: 2022-03-03T10:33:40+01:00
New Revision: ba6c71b1377e8c99b62b2115a8519df74465f53c
URL:
https://github.com/llvm/llvm-project/commit/ba6c71b1377e8c99b62b2115a8519df74465f53c
DIFF:
https://github.com/llvm/llvm-project/commit/ba6c71b1377e8c99b62b2115a8519df74465f53c.diff
LO
Author: Haojian Wu
Date: 2022-03-03T14:27:44+01:00
New Revision: 28ccf326725d0fea8648834c8acdbdfe3aa40d7a
URL:
https://github.com/llvm/llvm-project/commit/28ccf326725d0fea8648834c8acdbdfe3aa40d7a
DIFF:
https://github.com/llvm/llvm-project/commit/28ccf326725d0fea8648834c8acdbdfe3aa40d7a.diff
LO
Author: Haojian Wu
Date: 2022-03-07T20:05:35+01:00
New Revision: d5b8ecbd33c95d9a6ac8371d5dc187196b71604d
URL:
https://github.com/llvm/llvm-project/commit/d5b8ecbd33c95d9a6ac8371d5dc187196b71604d
DIFF:
https://github.com/llvm/llvm-project/commit/d5b8ecbd33c95d9a6ac8371d5dc187196b71604d.diff
LO
Author: Haojian Wu
Date: 2022-03-07T20:24:37+01:00
New Revision: 2d01ac18df93f2f8dd925888aabb7681224fb670
URL:
https://github.com/llvm/llvm-project/commit/2d01ac18df93f2f8dd925888aabb7681224fb670
DIFF:
https://github.com/llvm/llvm-project/commit/2d01ac18df93f2f8dd925888aabb7681224fb670.diff
LO
Author: Haojian Wu
Date: 2022-01-04T11:53:42+01:00
New Revision: 20f8f46c60b39fb2c6b4371a03e580d0711e8d82
URL:
https://github.com/llvm/llvm-project/commit/20f8f46c60b39fb2c6b4371a03e580d0711e8d82
DIFF:
https://github.com/llvm/llvm-project/commit/20f8f46c60b39fb2c6b4371a03e580d0711e8d82.diff
LO
Author: Haojian Wu
Date: 2022-01-04T12:11:58+01:00
New Revision: cb9ccd38c55f729a6bd7986bbdcb34755b774240
URL:
https://github.com/llvm/llvm-project/commit/cb9ccd38c55f729a6bd7986bbdcb34755b774240
DIFF:
https://github.com/llvm/llvm-project/commit/cb9ccd38c55f729a6bd7986bbdcb34755b774240.diff
LO
Author: Haojian Wu
Date: 2022-01-05T15:50:07+01:00
New Revision: 7632d19ada4a1feebc4a06067490ee1c77cd4dc1
URL:
https://github.com/llvm/llvm-project/commit/7632d19ada4a1feebc4a06067490ee1c77cd4dc1
DIFF:
https://github.com/llvm/llvm-project/commit/7632d19ada4a1feebc4a06067490ee1c77cd4dc1.diff
LO
Author: Haojian Wu
Date: 2022-01-10T09:34:18+01:00
New Revision: 4a4b8e4f99e2a82286b0595d561a51e7ad1945d2
URL:
https://github.com/llvm/llvm-project/commit/4a4b8e4f99e2a82286b0595d561a51e7ad1945d2
DIFF:
https://github.com/llvm/llvm-project/commit/4a4b8e4f99e2a82286b0595d561a51e7ad1945d2.diff
LO
Author: Haojian Wu
Date: 2022-01-10T12:45:20+01:00
New Revision: abe3003ead808518190d1e9717495735786938d3
URL:
https://github.com/llvm/llvm-project/commit/abe3003ead808518190d1e9717495735786938d3
DIFF:
https://github.com/llvm/llvm-project/commit/abe3003ead808518190d1e9717495735786938d3.diff
LO
Author: Haojian Wu
Date: 2022-01-10T12:46:27+01:00
New Revision: 55d96ac3dc56bdebea854952a724c2a50d96ce19
URL:
https://github.com/llvm/llvm-project/commit/55d96ac3dc56bdebea854952a724c2a50d96ce19
DIFF:
https://github.com/llvm/llvm-project/commit/55d96ac3dc56bdebea854952a724c2a50d96ce19.diff
LO
Author: Haojian Wu
Date: 2022-01-10T13:46:56+01:00
New Revision: 37ec65e1d705f56fe5551de1dfcbac1e071588a2
URL:
https://github.com/llvm/llvm-project/commit/37ec65e1d705f56fe5551de1dfcbac1e071588a2
DIFF:
https://github.com/llvm/llvm-project/commit/37ec65e1d705f56fe5551de1dfcbac1e071588a2.diff
LO
Author: Haojian Wu
Date: 2022-01-10T15:18:41+01:00
New Revision: c2293bc17dd09d552c5fdd13ff2b7c5738c5a10a
URL:
https://github.com/llvm/llvm-project/commit/c2293bc17dd09d552c5fdd13ff2b7c5738c5a10a
DIFF:
https://github.com/llvm/llvm-project/commit/c2293bc17dd09d552c5fdd13ff2b7c5738c5a10a.diff
LO
Author: Haojian Wu
Date: 2022-01-11T12:06:18+01:00
New Revision: 41fbdfa4d5601cccbcdc0ded8ef35190d502f7f3
URL:
https://github.com/llvm/llvm-project/commit/41fbdfa4d5601cccbcdc0ded8ef35190d502f7f3
DIFF:
https://github.com/llvm/llvm-project/commit/41fbdfa4d5601cccbcdc0ded8ef35190d502f7f3.diff
LO
Author: Haojian Wu
Date: 2022-01-17T09:27:58+01:00
New Revision: 64c108c9e4e0525328ceb4da55e4ab4b765d4c27
URL:
https://github.com/llvm/llvm-project/commit/64c108c9e4e0525328ceb4da55e4ab4b765d4c27
DIFF:
https://github.com/llvm/llvm-project/commit/64c108c9e4e0525328ceb4da55e4ab4b765d4c27.diff
LO
Author: Haojian Wu
Date: 2022-01-17T10:35:55+01:00
New Revision: 884832407e47579a28e8c363492a620901f2eab4
URL:
https://github.com/llvm/llvm-project/commit/884832407e47579a28e8c363492a620901f2eab4
DIFF:
https://github.com/llvm/llvm-project/commit/884832407e47579a28e8c363492a620901f2eab4.diff
LO
Author: Haojian Wu
Date: 2022-01-17T11:33:11+01:00
New Revision: ab3f100bec03d72ecee947a323c51698d4b95207
URL:
https://github.com/llvm/llvm-project/commit/ab3f100bec03d72ecee947a323c51698d4b95207
DIFF:
https://github.com/llvm/llvm-project/commit/ab3f100bec03d72ecee947a323c51698d4b95207.diff
LO
Author: Haojian Wu
Date: 2022-01-17T15:08:53+01:00
New Revision: 192f8d97002f13ab5a74ee11c4d5559b5ca693a8
URL:
https://github.com/llvm/llvm-project/commit/192f8d97002f13ab5a74ee11c4d5559b5ca693a8
DIFF:
https://github.com/llvm/llvm-project/commit/192f8d97002f13ab5a74ee11c4d5559b5ca693a8.diff
LO
Author: Haojian Wu
Date: 2021-12-15T11:32:27+01:00
New Revision: b7d2d147477e4fa5e34a3bb74b2a393cdaab9779
URL:
https://github.com/llvm/llvm-project/commit/b7d2d147477e4fa5e34a3bb74b2a393cdaab9779
DIFF:
https://github.com/llvm/llvm-project/commit/b7d2d147477e4fa5e34a3bb74b2a393cdaab9779.diff
LO
Author: Haojian Wu
Date: 2021-03-24T14:22:15+01:00
New Revision: cfc36bf0179435ecbd489761bd7d5dae00846c87
URL:
https://github.com/llvm/llvm-project/commit/cfc36bf0179435ecbd489761bd7d5dae00846c87
DIFF:
https://github.com/llvm/llvm-project/commit/cfc36bf0179435ecbd489761bd7d5dae00846c87.diff
LO
Author: Haojian Wu
Date: 2021-01-08T13:29:11+01:00
New Revision: b83b7d08730e2b67d911653f59091b1b311c0213
URL:
https://github.com/llvm/llvm-project/commit/b83b7d08730e2b67d911653f59091b1b311c0213
DIFF:
https://github.com/llvm/llvm-project/commit/b83b7d08730e2b67d911653f59091b1b311c0213.diff
LO
Author: Haojian Wu
Date: 2021-01-08T13:44:20+01:00
New Revision: c909512fdb9ed63081b0578410430117811b86e8
URL:
https://github.com/llvm/llvm-project/commit/c909512fdb9ed63081b0578410430117811b86e8
DIFF:
https://github.com/llvm/llvm-project/commit/c909512fdb9ed63081b0578410430117811b86e8.diff
LO
Author: Haojian Wu
Date: 2021-01-08T13:50:57+01:00
New Revision: ed3b1f906115a0dcd2542fa294d0382a42eb177d
URL:
https://github.com/llvm/llvm-project/commit/ed3b1f906115a0dcd2542fa294d0382a42eb177d
DIFF:
https://github.com/llvm/llvm-project/commit/ed3b1f906115a0dcd2542fa294d0382a42eb177d.diff
LO
Author: Haojian Wu
Date: 2021-01-08T21:03:59+01:00
New Revision: 8e36d21fabcd23835d17855025d06946eb0dfb9b
URL:
https://github.com/llvm/llvm-project/commit/8e36d21fabcd23835d17855025d06946eb0dfb9b
DIFF:
https://github.com/llvm/llvm-project/commit/8e36d21fabcd23835d17855025d06946eb0dfb9b.diff
LO
Author: Haojian Wu
Date: 2021-01-11T10:26:50+01:00
New Revision: 1677c86124e5b82a8dbf991f2d5fc450d06db4ad
URL:
https://github.com/llvm/llvm-project/commit/1677c86124e5b82a8dbf991f2d5fc450d06db4ad
DIFF:
https://github.com/llvm/llvm-project/commit/1677c86124e5b82a8dbf991f2d5fc450d06db4ad.diff
LO
Author: Haojian Wu
Date: 2021-01-11T16:43:33+01:00
New Revision: a2dbf3443af79426c80e8a808821236c5a2b305e
URL:
https://github.com/llvm/llvm-project/commit/a2dbf3443af79426c80e8a808821236c5a2b305e
DIFF:
https://github.com/llvm/llvm-project/commit/a2dbf3443af79426c80e8a808821236c5a2b305e.diff
LO
Author: Haojian Wu
Date: 2021-01-20T13:23:20+01:00
New Revision: 42830f8bdc8f064fee648541f79f8e8d66072cce
URL:
https://github.com/llvm/llvm-project/commit/42830f8bdc8f064fee648541f79f8e8d66072cce
DIFF:
https://github.com/llvm/llvm-project/commit/42830f8bdc8f064fee648541f79f8e8d66072cce.diff
LO
Author: Haojian Wu
Date: 2021-01-21T11:06:43+01:00
New Revision: facea4a2d4fa543da2241fb4268c34e9c019fca6
URL:
https://github.com/llvm/llvm-project/commit/facea4a2d4fa543da2241fb4268c34e9c019fca6
DIFF:
https://github.com/llvm/llvm-project/commit/facea4a2d4fa543da2241fb4268c34e9c019fca6.diff
LO
Author: Haojian Wu
Date: 2021-10-18T10:00:21+02:00
New Revision: 6e63f96e11ee9af300b166c994980d3b80cea0c7
URL:
https://github.com/llvm/llvm-project/commit/6e63f96e11ee9af300b166c994980d3b80cea0c7
DIFF:
https://github.com/llvm/llvm-project/commit/6e63f96e11ee9af300b166c994980d3b80cea0c7.diff
LO
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/104556
>From e0f1fca3cb2d0d7b3476913c20755219aa47c0af 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 updated
https://github.com/llvm/llvm-project/pull/104556
>From ea86000bcba54e542a9a0f940451f15ac521e32b 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
hokein wrote:
I've refined the PR, and the new implementation eliminates the false positive
mentioned above (I've also added a few more tests to verify this). Please take
a look. The changes include some refactoring (I'm happy to split those out if
they make the review process harder).
https:
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/104906
In the current lifetime analysis, we have two parallel code paths: one for
lifetimebound and another for GSL. These paths perform the same logic, both
determining whether to continue visiting subexpressions.
Th
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/104906
>From 773a03b25a94d991206f4b517eefdf3693e6a287 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 20 Aug 2024 10:22:44 +0200
Subject: [PATCH 1/2] [clang] Merge the lifetimebound and GSL code paths for
lifetime
@@ -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
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/104906
>From 773a03b25a94d991206f4b517eefdf3693e6a287 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 20 Aug 2024 10:22:44 +0200
Subject: [PATCH 1/3] [clang] Merge the lifetimebound and GSL code paths for
lifetime
@@ -439,6 +378,8 @@ static void visitLifetimeBoundArguments(IndirectLocalPath
&Path, Expr *Call,
if (!Callee)
return;
+ bool EnableGSLAnalysis = !Callee->getASTContext().getDiagnostics().isIgnored(
hokein wrote:
> Can we move this to VisitGSLPointerAr
@@ -478,22 +444,38 @@ static void visitLifetimeBoundArguments(IndirectLocalPath
&Path, Expr *Call,
CheckCoroObjArg = false;
if (implicitObjectParamIsLifetimeBound(Callee) || CheckCoroObjArg)
VisitLifetimeBoundArg(Callee, ObjectArg);
+else if (EnableGSLAnaly
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/104906
>From d4778d06b71b34aa178ae7482c15a8e00d9f3f19 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 20 Aug 2024 10:22:44 +0200
Subject: [PATCH 1/4] [clang] Merge the lifetimebound and GSL code paths for
lifetime
https://github.com/hokein closed
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
hokein wrote:
Sorry for the breakage, and thanks for the revert. This is not expected, I will
take a look.
https://github.com/llvm/llvm-project/pull/104906
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
hokein wrote:
The removal of `EnableLifetimeWarnings` flag causes some behavior change when
we visit a lifetimebound function argument:
- before: the `EnableLifetimeWarnings` is always `false`, which means we never
run into the GSL codepath
- after: we remove this flag, we will continue to run
hokein wrote:
Reduced the libcxx failure to:
```
std::string_view test() {
return std::move(*std::optional());
}
```
We should not diagnose on this case. I think the PR
https://github.com/llvm/llvm-project/pull/104556 should fix this.
https://github.com/llvm/llvm-project/pull/104906
___
hokein wrote:
> I think the PR https://github.com/llvm/llvm-project/pull/104556 should fix
> this.
The PRdoesn't address this issue, it appears to be a different problem. I have
identified the correct solution, so my plan is as follows:
1. Reland this PR without removing EnableLifetimeWarning
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/105753
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
Thanks, acked. Closing it now. I will reland it.
https://github.com/llvm/llvm-project/pull/105753
___
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/105838
Reland without the `EnableLifetimeWarnings` removal. I will remove the
EnableLifetimeWarnings in a follow-up patch.
I have added a test to prevent regression.
>From c248c80164965e82807a8682d30ce387f7801cc4 Mon
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/105838
>From c248c80164965e82807a8682d30ce387f7801cc4 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 23 Aug 2024 16:20:45 +0200
Subject: [PATCH 1/2] Reland "[clang] Merge lifetimebound and GSL code paths
for life
https://github.com/hokein closed
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
Author: Haojian Wu
Date: 2024-08-23T20:02:37+02:00
New Revision: d86349cf40196bc7f52e3f294ed2afafacadf1f5
URL:
https://github.com/llvm/llvm-project/commit/d86349cf40196bc7f52e3f294ed2afafacadf1f5
DIFF:
https://github.com/llvm/llvm-project/commit/d86349cf40196bc7f52e3f294ed2afafacadf1f5.diff
LO
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/105884
Reland the remaining change of
https://github.com/llvm/llvm-project/pull/104906, with a proper fix for the
regression.
>From 82069c8eb2c31734ce149b510317cded04b3835e Mon Sep 17 00:00:00 2001
From: Haojian Wu
D
@@ -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,
-
@@ -5346,7 +5346,6 @@ static EvalStmtResult EvaluateStmt(StmtResult &Result,
EvalInfo &Info,
const Expr *RetExpr = cast(S)->getRetValue();
FullExpressionRAII Scope(Info);
if (RetExpr && RetExpr->isValueDependent()) {
- EvaluateDependentExpr(RetExpr, Info);
---
@@ -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/hokein updated
https://github.com/llvm/llvm-project/pull/105884
>From 82069c8eb2c31734ce149b510317cded04b3835e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 23 Aug 2024 21:42:20 +0200
Subject: [PATCH 1/2] [clang] Remove the EnableLifetimeWarnings flag in
lifetime anal
@@ -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.
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/105884
>From 0f8a051930491b33181bfc4e27320f0a6f31786c Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 23 Aug 2024 21:42:20 +0200
Subject: [PATCH 1/3] [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
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against an implicitly defined
+ // constructor, add a note for it. Neither these deduction guides nor their
+ // corresp
Author: Haojian Wu
Date: 2024-06-25T11:45:25+02:00
New Revision: f09b02484b865e4e6e2243ee2ff59d70b60d28e4
URL:
https://github.com/llvm/llvm-project/commit/f09b02484b865e4e6e2243ee2ff59d70b60d28e4
DIFF:
https://github.com/llvm/llvm-project/commit/f09b02484b865e4e6e2243ee2ff59d70b60d28e4.diff
LO
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/96686
This patch addresses an issue where non-template explicit deduction guides were
not considered when synthesized the deduction guides for alias templates.
Fixes #94927.
>From 92f9733b620f8d15283c520adceae161b11e
https://github.com/hokein commented:
Thanks, this looks good overall.
https://github.com/llvm/llvm-project/pull/96084
___
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/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
template
using Bar = Foo; // expected-note {{candidate template ignored:
couldn't infer template argument 'X'}} \
+
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
hokein wrote:
We have a open bug for this, https://github.com/llvm/llvm-project/issues/79798.
https://github.com/llvm/llvm-
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
template
using Bar = Foo; // expected-note {{candidate template ignored:
couldn't infer template argument 'X'}} \
+
@@ -3216,6 +3226,44 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
Guides.suppressDiagnostics();
for (auto *G : Guides) {
+if (auto *DG = dyn_cast(G)) {
+ // The deduction guide is a non-template function decl, we just clone it.
+ auto *FunctionType =
+
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/96758
This is a refactoring change for better code isolation and reuse, the first
step to extend it for assignments.
>From 3c5318893322d1f904a52b2f92d5ccd191aa5930 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri,
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/96758
>From 6b18b58f4b3c4032c21252177709ab7759060c1f Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 21 Jun 2024 11:48:33 +0200
Subject: [PATCH] [clang][sema] Move the initializer lifetime checking code
from SemaI
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/93533
>From 14817083f75f9615e9df4c905e09bc4e9b199336 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 17 May 2024 15:28:48 +0200
Subject: [PATCH 1/2] [clang] CTAD alias: fix transformation for require-clause
expr P
https://github.com/hokein edited 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 commented:
thanks for the review.
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
@@ -2840,8 +2841,22 @@ buildAssociatedConstraints(Sema &SemaRef,
FunctionTemplateDecl *F,
for (unsigned Index = 0; Index < DeduceResults.size(); ++Index) {
const auto &D = DeduceResults[Index];
-if (D.isNull())
+if (D.isNull()) { // non-deduced template paramete
@@ -2882,7 +2899,8 @@ buildAssociatedConstraints(Sema &SemaRef,
FunctionTemplateDecl *F,
// We add the outer template arguments which is [int] to the multi-level arg
// list to ensure that the occurrence U in `C` will be replaced with int
// during the substitution.
- i
@@ -2840,8 +2841,22 @@ buildAssociatedConstraints(Sema &SemaRef,
FunctionTemplateDecl *F,
for (unsigned Index = 0; Index < DeduceResults.size(); ++Index) {
const auto &D = DeduceResults[Index];
-if (D.isNull())
+if (D.isNull()) { // non-deduced template paramete
@@ -3100,6 +3118,7 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
Context.getInjectedTemplateArg(NewParam));
TransformedDeducedAliasArgs[AliasTemplateParamIdx] = NewTemplateArgument;
}
+ unsigned UndeducedTemplateParameterStartIndex = FPrimeTemplateParams.size
@@ -1189,6 +1189,16 @@ void DeclPrinter::printTemplateParameters(const
TemplateParameterList *Params,
Out << '>';
if (!OmitTemplateKW)
Out << ' ';
+
+ if (const Expr *RequiresClause = Params->getRequiresClause()) {
hokein wrote:
If I read the code co
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/96758
___
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, looks good.
https://github.com/llvm/llvm-project/pull/96864
___
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/96475
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -12078,6 +12079,43 @@ static void DiagnoseFailedExplicitSpec(Sema &S,
OverloadCandidate *Cand) {
<< (ES.getExpr() ? ES.getExpr()->getSourceRange() : SourceRange());
}
+static void NoteImplicitDeductionGuide(Sema &S, CXXDeductionGuideDecl *DG) {
+ // We want to alway
https://github.com/hokein approved this pull request.
thanks, looks good.
https://github.com/llvm/llvm-project/pull/96084
___
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/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -627,6 +627,9 @@ Improvements to Clang's diagnostics
used rather than when they are needed for constant evaluation or when code
is generated for them.
The check is now stricter to prevent crashes for some unsupported
declarations (Fixes #GH95495).
+- Clang now shows i
@@ -12078,6 +12079,43 @@ static void DiagnoseFailedExplicitSpec(Sema &S,
OverloadCandidate *Cand) {
<< (ES.getExpr() ? ES.getExpr()->getSourceRange() : SourceRange());
}
+static void NoteImplicitDeductionGuide(Sema &S, CXXDeductionGuideDecl *DG) {
+ // We want to alway
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/96908
- Fix some errors in the snippet;
- update the code snippet to reflect the current implementation status in clang;
>From 8da371ef1450852e3dede28b1f1dcb7c27ede530 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Th
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/96908
___
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/2] [clang] Extend the existing lifetimebound check for
assignments.
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
@@ -964,11 +966,26 @@ static bool
pathOnlyInitializesGslPointer(IndirectLocalPath &Path) {
return false;
}
-void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity,
+void checkExprLifetime(Sema &SemaRef, const CheckingEntity &CEntity,
E
https://github.com/hokein commented:
thanks for the review.
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
@@ -40,6 +40,12 @@ namespace usage_ok {
int *p = A().class_member(); // expected-warning {{temporary whose address
is used as value of local variable 'p' will be destroyed at the end of the
full-expression}}
int *q = A(); // expected-warning {{temporary whose address is us
@@ -964,11 +966,26 @@ static bool
pathOnlyInitializesGslPointer(IndirectLocalPath &Path) {
return false;
}
-void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity,
+void checkExprLifetime(Sema &SemaRef, const CheckingEntity &CEntity,
E
@@ -1053,16 +1072,23 @@ void checkExprLifetime(Sema &SemaRef, const
InitializedEntity &Entity,
if (pathContainsInit(Path))
return false;
-SemaRef.Diag(DiagLoc, diag::warn_dangling_variable)
-<< RK << !Entity.getParent()
-<< Ex
2501 - 2600 of 3165 matches
Mail list logo