Author: void
Date: Mon Jul 8 15:01:07 2019
New Revision: 365395
URL: http://llvm.org/viewvc/llvm-project?rev=365395&view=rev
Log:
Add parentheses to silence warnings.
Modified:
cfe/trunk/lib/Tooling/Syntax/BuildTree.cpp
Modified: cfe/trunk/lib/Tooling/Syntax/BuildTree.cpp
URL:
http://llvm.
Okay. I'll take a look at it. Sorry about the failure.
On Tue, Feb 25, 2020 at 1:37 AM Yvan Roux wrote:
> Hi Bill,
>
> This commit broke AArch64 bots, logs are available here:
>
> http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/22291/steps/ninja%20check%201/logs/FAIL%3A%20Clan
Author: Bill Wendling
Date: 2020-02-25T11:48:23-08:00
New Revision: e11f9fb4508534d31b09d2ba6cd22428ccc75f65
URL:
https://github.com/llvm/llvm-project/commit/e11f9fb4508534d31b09d2ba6cd22428ccc75f65
DIFF:
https://github.com/llvm/llvm-project/commit/e11f9fb4508534d31b09d2ba6cd22428ccc75f65.diff
Hi Vlad,
I just submitted a fix for this: e11f9fb4508534d31b09d2ba6cd22428ccc75f65
On Tue, Feb 25, 2020 at 11:42 AM Vlad Vereschaka via Phabricator <
revi...@reviews.llvm.org> wrote:
> vvereschaka added a comment.
>
> Hello @void ,
>
> this commit breaks Aarch64 builder with failed
> `Clang::uni
Author: Bill Wendling
Date: 2020-02-25T12:31:53-08:00
New Revision: 6d0d1a63f2a6c120f206a83e7c1ddae9fa5a569a
URL:
https://github.com/llvm/llvm-project/commit/6d0d1a63f2a6c120f206a83e7c1ddae9fa5a569a
DIFF:
https://github.com/llvm/llvm-project/commit/6d0d1a63f2a6c120f206a83e7c1ddae9fa5a569a.diff
I had to re-do the patch. It works for me now...Sorry about the failure!
On Tue, Feb 25, 2020 at 12:10 PM Leonard Chan via Phabricator <
revi...@reviews.llvm.org> wrote:
> leonardchan added a comment.
>
> Woops, sorry. Didn't see you sent out
> https://reviews.llvm.org/rGe11f9fb4508534d31b09d2ba6
Author: Bill Wendling
Date: 2020-03-10T13:48:48-07:00
New Revision: 72aa619a7fe0e2f90959b0614f6388c09aba8913
URL:
https://github.com/llvm/llvm-project/commit/72aa619a7fe0e2f90959b0614f6388c09aba8913
DIFF:
https://github.com/llvm/llvm-project/commit/72aa619a7fe0e2f90959b0614f6388c09aba8913.diff
Author: Bill Wendling
Date: 2020-03-10T15:26:03-07:00
New Revision: 218dd339541f574f76d7310f6c3269bfe3262d08
URL:
https://github.com/llvm/llvm-project/commit/218dd339541f574f76d7310f6c3269bfe3262d08
DIFF:
https://github.com/llvm/llvm-project/commit/218dd339541f574f76d7310f6c3269bfe3262d08.diff
Yeah. I reverted the push. The correct code should be in Phabricator now.
:-(
On Tue, Jan 7, 2020 at 2:45 PM James Y Knight via Phabricator <
revi...@reviews.llvm.org> wrote:
> jyknight added a comment.
>
> I think you pushed the incorrect change? This was the clang half, but now
> it's showing t
Author: Bill Wendling
Date: 2019-11-05T13:15:55-08:00
New Revision: ee10d93449eccfd3b6e6ae8f02551b1a03a4
URL:
https://github.com/llvm/llvm-project/commit/ee10d93449eccfd3b6e6ae8f02551b1a03a4
DIFF:
https://github.com/llvm/llvm-project/commit/ee10d93449eccfd3b6e6ae8f02551b1a03a4.diff
Author: Bill Wendling
Date: 2019-11-22T12:35:43-08:00
New Revision: 9180f8a57436da0ce91d9d4885702a10f89571bc
URL:
https://github.com/llvm/llvm-project/commit/9180f8a57436da0ce91d9d4885702a10f89571bc
DIFF:
https://github.com/llvm/llvm-project/commit/9180f8a57436da0ce91d9d4885702a10f89571bc.diff
Author: Bill Wendling
Date: 2019-11-22T12:51:41-08:00
New Revision: 2b795637b9024d76e53cd303ad74ac02ba22da5b
URL:
https://github.com/llvm/llvm-project/commit/2b795637b9024d76e53cd303ad74ac02ba22da5b
DIFF:
https://github.com/llvm/llvm-project/commit/2b795637b9024d76e53cd303ad74ac02ba22da5b.diff
Author: Bill Wendling
Date: 2019-12-02T14:09:21-08:00
New Revision: 936de1c5bc2dfbec25318985cddb7345d989a7ee
URL:
https://github.com/llvm/llvm-project/commit/936de1c5bc2dfbec25318985cddb7345d989a7ee
DIFF:
https://github.com/llvm/llvm-project/commit/936de1c5bc2dfbec25318985cddb7345d989a7ee.diff
Author: Bill Wendling
Date: 2020-02-24T18:51:29-08:00
New Revision: 50cac248773c3a023e8f6ceb9938bdd5e9f15da2
URL:
https://github.com/llvm/llvm-project/commit/50cac248773c3a023e8f6ceb9938bdd5e9f15da2
DIFF:
https://github.com/llvm/llvm-project/commit/50cac248773c3a023e8f6ceb9938bdd5e9f15da2.diff
Author: void
Date: Tue Jun 12 23:33:59 2018
New Revision: 334573
URL: http://llvm.org/viewvc/llvm-project?rev=334573&view=rev
Log:
Remove extraneous semicolon.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.
Author: void
Date: Tue Aug 6 15:41:22 2019
New Revision: 368104
URL: http://llvm.org/viewvc/llvm-project?rev=368104&view=rev
Log:
Delay diagnosing asm constraints that require immediates until after inlining
Summary:
An inline asm call may result in an immediate input value after inlining.
There
Author: void
Date: Wed Aug 7 12:36:48 2019
New Revision: 368202
URL: http://llvm.org/viewvc/llvm-project?rev=368202&view=rev
Log:
Add target requirements for those bots which don't handle x86.
Modified:
cfe/trunk/test/CodeGen/pr41027.c
Modified: cfe/trunk/test/CodeGen/pr41027.c
URL:
http:/
Author: void
Date: Tue Dec 18 14:54:03 2018
New Revision: 349561
URL: http://llvm.org/viewvc/llvm-project?rev=349561&view=rev
Log:
Emit ASM input in a constant context
Summary:
Some ASM input constraints (e.g., "i" and "n") require immediate values. At O0,
very few code transformations are perfor
Author: void
Date: Tue Dec 18 20:36:42 2018
New Revision: 349603
URL: http://llvm.org/viewvc/llvm-project?rev=349603&view=rev
Log:
Revert accidentally included code.
Modified:
cfe/trunk/lib/Sema/SemaStmtAsm.cpp
Modified: cfe/trunk/lib/Sema/SemaStmtAsm.cpp
URL:
http://llvm.org/viewvc/llvm-pr
Author: void
Date: Tue Dec 18 20:54:29 2018
New Revision: 349604
URL: http://llvm.org/viewvc/llvm-project?rev=349604&view=rev
Log:
Use "EvaluateAsRValue" instead of as a known int, because if it's not a known
integer we want to emit a diagnostic instead of asserting.
Modified:
cfe/trunk/lib/S
Author: Bill Wendling
Date: 2020-09-24T13:59:42-07:00
New Revision: 34ca5b3392ced08e2320fb4236cca5c7df4ec6e9
URL:
https://github.com/llvm/llvm-project/commit/34ca5b3392ced08e2320fb4236cca5c7df4ec6e9
DIFF:
https://github.com/llvm/llvm-project/commit/34ca5b3392ced08e2320fb4236cca5c7df4ec6e9.diff
Author: Bill Wendling
Date: 2020-09-24T14:34:28-07:00
New Revision: f97b68ef4ddd28a685e502653768c2a34c314cba
URL:
https://github.com/llvm/llvm-project/commit/f97b68ef4ddd28a685e502653768c2a34c314cba
DIFF:
https://github.com/llvm/llvm-project/commit/f97b68ef4ddd28a685e502653768c2a34c314cba.diff
Author: Bill Wendling
Date: 2020-09-24T15:21:28-07:00
New Revision: c9b53b3bf20d20d5752876be32a9e5887c702e53
URL:
https://github.com/llvm/llvm-project/commit/c9b53b3bf20d20d5752876be32a9e5887c702e53
DIFF:
https://github.com/llvm/llvm-project/commit/c9b53b3bf20d20d5752876be32a9e5887c702e53.diff
Author: Connor Kuehl
Date: 2022-04-08T12:48:30-07:00
New Revision: 3f0587d0c668202bb89d29a25432aa290e551a31
URL:
https://github.com/llvm/llvm-project/commit/3f0587d0c668202bb89d29a25432aa290e551a31
DIFF:
https://github.com/llvm/llvm-project/commit/3f0587d0c668202bb89d29a25432aa290e551a31.diff
Author: Bill Wendling
Date: 2022-04-08T14:42:12-07:00
New Revision: 893e1c18b98d8bbc7b8d7d22cc2c348f65c72ad9
URL:
https://github.com/llvm/llvm-project/commit/893e1c18b98d8bbc7b8d7d22cc2c348f65c72ad9
DIFF:
https://github.com/llvm/llvm-project/commit/893e1c18b98d8bbc7b8d7d22cc2c348f65c72ad9.diff
Author: Bill Wendling
Date: 2022-04-08T16:00:41-07:00
New Revision: e2e6899452998932b37f0fa9e66d104a02abe3e5
URL:
https://github.com/llvm/llvm-project/commit/e2e6899452998932b37f0fa9e66d104a02abe3e5
DIFF:
https://github.com/llvm/llvm-project/commit/e2e6899452998932b37f0fa9e66d104a02abe3e5.diff
Author: Bill Wendling
Date: 2022-04-08T17:04:22-07:00
New Revision: 8d7595be1dd41d7f7470ec90867936ca5e4e0d82
URL:
https://github.com/llvm/llvm-project/commit/8d7595be1dd41d7f7470ec90867936ca5e4e0d82
DIFF:
https://github.com/llvm/llvm-project/commit/8d7595be1dd41d7f7470ec90867936ca5e4e0d82.diff
Author: Bill Wendling
Date: 2022-04-08T17:41:36-07:00
New Revision: 2a2149c754f96376ddf8fed248102dd8e6092a22
URL:
https://github.com/llvm/llvm-project/commit/2a2149c754f96376ddf8fed248102dd8e6092a22
DIFF:
https://github.com/llvm/llvm-project/commit/2a2149c754f96376ddf8fed248102dd8e6092a22.diff
Author: Connor Kuehl
Date: 2022-04-09T13:15:36-07:00
New Revision: 7aa8c38a9e190aea14116028c38b1d9f54cbb0b3
URL:
https://github.com/llvm/llvm-project/commit/7aa8c38a9e190aea14116028c38b1d9f54cbb0b3
DIFF:
https://github.com/llvm/llvm-project/commit/7aa8c38a9e190aea14116028c38b1d9f54cbb0b3.diff
Author: Bill Wendling
Date: 2022-04-09T13:25:25-07:00
New Revision: 77e71bcfde7264466849babaa0e9ccbec51a8a08
URL:
https://github.com/llvm/llvm-project/commit/77e71bcfde7264466849babaa0e9ccbec51a8a08
DIFF:
https://github.com/llvm/llvm-project/commit/77e71bcfde7264466849babaa0e9ccbec51a8a08.diff
Author: Bill Wendling
Date: 2022-04-14T15:41:25-07:00
New Revision: 31ea4798ad0990838ccd27f80ca112f177ce91d9
URL:
https://github.com/llvm/llvm-project/commit/31ea4798ad0990838ccd27f80ca112f177ce91d9
DIFF:
https://github.com/llvm/llvm-project/commit/31ea4798ad0990838ccd27f80ca112f177ce91d9.diff
Author: Bill Wendling
Date: 2022-04-14T16:07:00-07:00
New Revision: 27dead3e3a532625704654a0b66d77f8654d1af2
URL:
https://github.com/llvm/llvm-project/commit/27dead3e3a532625704654a0b66d77f8654d1af2
DIFF:
https://github.com/llvm/llvm-project/commit/27dead3e3a532625704654a0b66d77f8654d1af2.diff
Author: Bill Wendling
Date: 2022-04-14T16:35:41-07:00
New Revision: 8c77a75fb6a82a4cc2182bca89e007e7190a83de
URL:
https://github.com/llvm/llvm-project/commit/8c77a75fb6a82a4cc2182bca89e007e7190a83de
DIFF:
https://github.com/llvm/llvm-project/commit/8c77a75fb6a82a4cc2182bca89e007e7190a83de.diff
Author: Bill Wendling
Date: 2022-04-15T12:29:32-07:00
New Revision: aed923b1246ac38335b222b89594516fcf0d6385
URL:
https://github.com/llvm/llvm-project/commit/aed923b1246ac38335b222b89594516fcf0d6385
DIFF:
https://github.com/llvm/llvm-project/commit/aed923b1246ac38335b222b89594516fcf0d6385.diff
Author: Bill Wendling
Date: 2022-04-15T15:17:07-07:00
New Revision: 2a404cdfd8bc75de593ce0e15fff0a7a0a18ec1c
URL:
https://github.com/llvm/llvm-project/commit/2a404cdfd8bc75de593ce0e15fff0a7a0a18ec1c
DIFF:
https://github.com/llvm/llvm-project/commit/2a404cdfd8bc75de593ce0e15fff0a7a0a18ec1c.diff
Author: Bill Wendling
Date: 2022-04-16T23:24:48-07:00
New Revision: 7f31b4a917d8cc13df5eac4b7f0520639c3a8fff
URL:
https://github.com/llvm/llvm-project/commit/7f31b4a917d8cc13df5eac4b7f0520639c3a8fff
DIFF:
https://github.com/llvm/llvm-project/commit/7f31b4a917d8cc13df5eac4b7f0520639c3a8fff.diff
Author: Bill Wendling
Date: 2022-04-21T19:41:00-07:00
New Revision: a7815d33bf8f955f2a1888abbccf974bd4858f79
URL:
https://github.com/llvm/llvm-project/commit/a7815d33bf8f955f2a1888abbccf974bd4858f79
DIFF:
https://github.com/llvm/llvm-project/commit/a7815d33bf8f955f2a1888abbccf974bd4858f79.diff
Maskray?
On Thu, Apr 21, 2022 at 8:00 PM Nico Weber via Phabricator <
revi...@reviews.llvm.org> wrote:
> thakis added a comment.
>
> Looks like this breaks tests on windows:
> http://45.33.8.238/win/56771/step_7.txt
>
> Please take a look and revert for now if it takes a while to fix.
>
>
> Repos
Author: Bill Wendling
Date: 2022-04-28T12:01:11-07:00
New Revision: 463790bfc70e15f9c23b76f1c53e228b644f8bb1
URL:
https://github.com/llvm/llvm-project/commit/463790bfc70e15f9c23b76f1c53e228b644f8bb1
DIFF:
https://github.com/llvm/llvm-project/commit/463790bfc70e15f9c23b76f1c53e228b644f8bb1.diff
Author: Bill Wendling
Date: 2022-04-29T11:05:09-07:00
New Revision: 6f79700830292d86afec5f3cf5143b00e6f3f1fd
URL:
https://github.com/llvm/llvm-project/commit/6f79700830292d86afec5f3cf5143b00e6f3f1fd
DIFF:
https://github.com/llvm/llvm-project/commit/6f79700830292d86afec5f3cf5143b00e6f3f1fd.diff
Author: Bill Wendling
Date: 2022-05-03T11:23:12-07:00
New Revision: f2639cf3fe46c30ad450cc2533c81eacd4788c33
URL:
https://github.com/llvm/llvm-project/commit/f2639cf3fe46c30ad450cc2533c81eacd4788c33
DIFF:
https://github.com/llvm/llvm-project/commit/f2639cf3fe46c30ad450cc2533c81eacd4788c33.diff
Author: Bill Wendling
Date: 2022-05-19T16:58:28-07:00
New Revision: 6e00a34cdb49ba1d4b72ec274e52260da9c52380
URL:
https://github.com/llvm/llvm-project/commit/6e00a34cdb49ba1d4b72ec274e52260da9c52380
DIFF:
https://github.com/llvm/llvm-project/commit/6e00a34cdb49ba1d4b72ec274e52260da9c52380.diff
bwendling wrote:
Okay, this was tougher than I thought. I make sure that we're not causing any
new side-effects in the code. I try as much as possible to use previously
generated code when accessing the `counted_by` variable. I also corrected how
offsets were calculated.
There are some a few
@@ -994,31 +1010,55 @@ class MemberExprBaseVisitor
// }
Expr *Visit(Expr *E) {
-return StmtVisitor::Visit(E);
+return StmtVisitor::Visit(E);
}
- Expr *VisitCastExpr(CastExpr *E) {
-return IsExpectedRecordDecl(E) ? E : Visit(E->getSubExpr());
- }
- E
@@ -1411,6 +1411,8 @@ class CodeGenFunction : public CodeGenTypeCache {
/// decls.
DeclMapTy LocalDeclMap;
+ llvm::SmallDenseMap ExprLValueMap;
bwendling wrote:
Done.
https://github.com/llvm/llvm-project/pull/73730
_
@@ -1411,6 +1411,8 @@ class CodeGenFunction : public CodeGenTypeCache {
/// decls.
DeclMapTy LocalDeclMap;
+ llvm::SmallDenseMap ExprLValueMap;
bwendling wrote:
It will. I did a test to see how many Exprs are typically stored. For both
Linux and Clang,
@@ -1411,6 +1411,8 @@ class CodeGenFunction : public CodeGenTypeCache {
/// decls.
DeclMapTy LocalDeclMap;
+ llvm::SmallDenseMap ExprLValueMap;
bwendling wrote:
I do this only when the sanitizer is enabled to keep us from building it
unnecessarily.
htt
bwendling wrote:
The problem with adding the code to `CodeGenFunction::EmitArraySubscriptExpr`
is that we need to emit the counted_by "count" for more than just an
`ArraySubscriptExpr`. Where `ExprLValueMap` is placed catches all of the
expressions we're interested in. We're doing something si
bwendling wrote:
> And ideally, the recursive visit should list those expressions explicitly,
> instead aborting on ones we know are bad.
I'm sorry, I don't understand what you're talking about here. The whole point
of the recursive visit is to find a suitable base pointer. If we run across an
bwendling wrote:
> I mean, the base case should be "return nullptr", and you should only
> explicitly list out expressions you know we need to handle. We shouldn't need
> to explicitly mention VisitUnaryPostDec etc.
The expression can be arbitrarily complex. For instance this:
```
struct s {
bwendling wrote:
The `__bdos` stuff is only a subset of the bounds checking code so we should
focus on that.
It's still messier than that, since it's not always going to be a pointer
directly to the FAM (e.g. p->a.b.c.array[index]), but I'll give it a shot. I
don't think it's going to be any
bwendling wrote:
Could you add the .c and .sh files? I'll try to recreate it on my end though.
https://github.com/llvm/llvm-project/pull/73730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
bwendling wrote:
Okay. I should have fixed that issue.
https://github.com/llvm/llvm-project/pull/73730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bwendling wrote:
> I actually think bdos is more complicated: array bounds checking can handle
> arbitrary base expressions, so it doesn't need to examine the base expression
> at all. bdos can't do that, so more work is required to handle precisely the
> cases you want to handle.
Yup! The co
bwendling wrote:
It's the __bdos cases that really benefit from the `ExprLValueMap`. The
`LocalDeclMap` will have any `allocas` or globals for local C decls. From that,
I'll be able to get enough information to generate the `count` lookup. The
`ExprLValueMap` improves this by allowing us to us
@@ -3022,18 +3022,24 @@ class CodeGenFunction : public CodeGenTypeCache {
void EmitBoundsCheck(const Expr *E, const Expr *Base, llvm::Value *Index,
QualType IndexType, bool Accessed);
+ void EmitBoundsCheck(const Expr *E, llvm::Value *Bound, llvm::Val
@@ -4022,8 +4168,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const
ArraySubscriptExpr *E,
ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true);
else
ArrayLV = EmitLValue(Array);
+
auto *Idx = EmitIdxAfterBase(/*Promote*/true);
+if (SanOp
@@ -994,31 +1010,55 @@ class MemberExprBaseVisitor
// }
Expr *Visit(Expr *E) {
-return StmtVisitor::Visit(E);
+return StmtVisitor::Visit(E);
}
- Expr *VisitCastExpr(CastExpr *E) {
-return IsExpectedRecordDecl(E) ? E : Visit(E->getSubExpr());
- }
- E
@@ -994,31 +1010,55 @@ class MemberExprBaseVisitor
// }
Expr *Visit(Expr *E) {
-return StmtVisitor::Visit(E);
+return StmtVisitor::Visit(E);
}
- Expr *VisitCastExpr(CastExpr *E) {
-return IsExpectedRecordDecl(E) ? E : Visit(E->getSubExpr());
- }
- E
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const
ArraySubscriptExpr *E,
ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true);
else
ArrayLV = EmitLValue(Array);
+
auto *Idx = EmitIdxAfterBase(/*Promote*/true);
+if (SanOp
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const
ArraySubscriptExpr *E,
ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true);
else
ArrayLV = EmitLValue(Array);
+
auto *Idx = EmitIdxAfterBase(/*Promote*/true);
+if (SanOp
https://github.com/bwendling edited
https://github.com/llvm/llvm-project/pull/73730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const
ArraySubscriptExpr *E,
ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true);
else
ArrayLV = EmitLValue(Array);
+
auto *Idx = EmitIdxAfterBase(/*Promote*/true);
+if (SanOp
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const
ArraySubscriptExpr *E,
ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true);
else
ArrayLV = EmitLValue(Array);
+
auto *Idx = EmitIdxAfterBase(/*Promote*/true);
+if (SanOp
bwendling wrote:
Friendly ping.
https://github.com/llvm/llvm-project/pull/73730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bwendling wrote:
@nathanchance Could you try the patch in
https://github.com/bwendling/llvm-project/tree/counted-by-offsets to see if it
helps? I'll take a look, but it's going to compile slowly on my machine...
https://github.com/llvm/llvm-project/pull/70606
__
bwendling wrote:
Erm...I meant this one:
https://github.com/llvm/llvm-project/compare/main...bwendling:llvm-project:llvm-project/counted-by-offsets
https://github.com/llvm/llvm-project/pull/70606
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/bwendling created
https://github.com/llvm/llvm-project/pull/72347
Ensure that we're dealing only with C99 flexible array members. I.e. ones with
incomplete types:
struct s {
int count;
char array[]; /* note: no size specified */
};
>From 21bea1699d80e53d857bf265
bwendling wrote:
Friendly ping to @rapidsna and @nickdesaulniers
https://github.com/llvm/llvm-project/pull/71877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -827,6 +827,165 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const
Expr *E, unsigned Type,
return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true);
}
+llvm::Value *
+CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type,
+
https://github.com/bwendling closed
https://github.com/llvm/llvm-project/pull/72347
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bwendling wrote:
> For the test cases, I wonder if it might be good to add __bdos() calls with
> type 0 as well. The results should always be the same, but we do want to
> check for that. i.e.:
>
> ` p->array[index] = __builtin_dynamic_object_size(&p->count, 0);`
I can do that in a separate c
bwendling wrote:
@kees interesting difference between `0` and `1` in `__bdos()`. You probably
know about it, but I was surprised: https://godbolt.org/z/KTeqanjKf
https://github.com/llvm/llvm-project/pull/71877
___
cfe-commits mailing list
cfe-commits@
@@ -827,6 +827,165 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const
Expr *E, unsigned Type,
return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true);
}
+llvm::Value *
+CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type,
+
https://github.com/bwendling created
https://github.com/llvm/llvm-project/pull/72790
The code that calculates the flexible array member size is big enough to
warrant its own method.
>From fcea607665cdbae3e98f08288b165c2c1af24f95 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Sun, 19 Nov 2
https://github.com/bwendling updated
https://github.com/llvm/llvm-project/pull/72790
>From fcea607665cdbae3e98f08288b165c2c1af24f95 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Sun, 19 Nov 2023 02:28:28 -0800
Subject: [PATCH 1/2] [NFC][Clang] Refactor code to calculate flexible array
mem
https://github.com/bwendling closed
https://github.com/llvm/llvm-project/pull/72790
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bwendling updated
https://github.com/llvm/llvm-project/pull/71877
>From 721415856f1e89d8fbe48e63751a9275b25e0fb8 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Thu, 9 Nov 2023 14:15:22 -0800
Subject: [PATCH] [Clang] Correct handling of negative and out-of-bounds
indices
@@ -827,6 +827,165 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const
Expr *E, unsigned Type,
return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true);
}
+llvm::Value *
+CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type,
+
https://github.com/bwendling closed
https://github.com/llvm/llvm-project/pull/71877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bwendling wrote:
> ```
> #include
> #include
> struct flex {
> int c;
> int fam[] __attribute__((counted_by(c)));
> };
>
> int main() {
> struct flex *p = (struct flex *)malloc(sizeof(struct flex) + sizeof(int)
> * 10);
> p->c = 100;
> printf("%lu\n", __builtin_dynamic_obj
@@ -966,9 +962,65 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction
&CGF,
return nullptr;
}
-FieldDecl *CodeGenFunction::FindCountedByField(
-const Expr *Base,
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) {
+const Expr *
+CodeGenFunction
bwendling wrote:
> I just wanted to call out that this case is interesting because the size
> derived from malloc and __counted_by compete each other. And __counted_by
> always wins. This conforms to how -fbounds-safety will see the size of
> objects, so sounds like we are all happy with it.
bwendling wrote:
@rapidsna Friendly ping. :-)
https://github.com/llvm/llvm-project/pull/70606
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
+// The code generated here calculates
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
+// The code generated here calculates
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
+// The code generated here calculates
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
+// The code generated here calculates
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
+// The code generated here calculates
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
+// The code generated here calculates
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
+// The code generated here calculates
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
+// The code generated here calculates
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
+// The code generated here calculates
bwendling wrote:
@rapidsna My recent commits try to address a lot of the issues you brought up.
If the FAM's array index is negative or out of bounds, it should now catch it
and return an appropriate value. There may still be some corner cases that have
to be hammered out, but I'd like to get
https://github.com/bwendling edited
https://github.com/llvm/llvm-project/pull/70606
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bwendling closed
https://github.com/llvm/llvm-project/pull/70606
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bwendling created
https://github.com/llvm/llvm-project/pull/71877
GCC returns 0 for a negative index on an array in a structure. It also
returns 0 for an array index that goes beyond the extent of the array.
In addition. a pointer to a struct field returns that field's size, n
bwendling wrote:
/sub @rapidsna
https://github.com/llvm/llvm-project/pull/71877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bwendling created
https://github.com/llvm/llvm-project/pull/70606
Break down the counted_by calculations so that they correctly handle
anonymous structs, which are specified internally as IndirectFieldDecls.
Also simplify the code to use helper methods to get the field referen
bwendling wrote:
To answer @nickdesaulniers 's question, the testcases are in the works. :-)
https://github.com/llvm/llvm-project/pull/70606
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
1 - 100 of 546 matches
Mail list logo