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 Oct 30 20:48:47 2018
New Revision: 345692
URL: http://llvm.org/viewvc/llvm-project?rev=345692&view=rev
Log:
Create ConstantExpr class
A ConstantExpr class represents a full expression that's in a context where a
constant expression is required. This class reflects the path
Author: void
Date: Tue Oct 30 21:58:34 2018
New Revision: 345695
URL: http://llvm.org/viewvc/llvm-project?rev=345695&view=rev
Log:
Change "struct" to "class" to avoid warnings
Modified:
cfe/trunk/include/clang/AST/Expr.h
Modified: cfe/trunk/include/clang/AST/Expr.h
URL:
http://llvm.org/view
I didn't see that during my tests. Probably different -W flags or
something. I reverted that bit. I hope it fixes the problem.
-bw
On Tue, Oct 30, 2018 at 10:02 PM Kristina Brooks via Phabricator <
revi...@reviews.llvm.org> wrote:
> kristina added a comment.
>
> Ah, it was causing this warning d
Author: void
Date: Sat Jan 26 23:24:03 2019
New Revision: 352307
URL: http://llvm.org/viewvc/llvm-project?rev=352307&view=rev
Log:
Remove Expr sugar decorating the CXXUuidofExpr node.
Summary: Sugar, like ConstantExpr, causes an infinite expansion of the template
object.
Reviewers: rsmith, aaro
Author: void
Date: Thu Nov 8 16:41:36 2018
New Revision: 346455
URL: http://llvm.org/viewvc/llvm-project?rev=346455&view=rev
Log:
Compound literals, enums, et al require const expr
Summary:
Compound literals, enums, file-scoped arrays, etc. require their
initializers and size specifiers to be c
Author: void
Date: Thu Nov 8 17:04:05 2018
New Revision: 346458
URL: http://llvm.org/viewvc/llvm-project?rev=346458&view=rev
Log:
Use correct parameter name in comment.
Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
Modified: cfe/trunk/include/clang/StaticAnalyzer/C
Author: void
Date: Thu Nov 8 17:32:30 2018
New Revision: 346461
URL: http://llvm.org/viewvc/llvm-project?rev=346461&view=rev
Log:
Ignore implicit things like ConstantExpr.
Modified:
clang-tools-extra/trunk/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp
Modified:
clang-tools-extra
Author: void
Date: Thu Nov 8 18:03:24 2018
New Revision: 346467
URL: http://llvm.org/viewvc/llvm-project?rev=346467&view=rev
Log:
Remove unused c'tor.
Modified:
clang-tools-extra/trunk/modularize/ModuleAssistant.cpp
Modified: clang-tools-extra/trunk/modularize/ModuleAssistant.cpp
URL:
http
This fix was submitted because a test was failing without it. :-)
On Thu, Nov 8, 2018 at 10:08 PM Roman Lebedev wrote:
> Test?
>
> On Fri, Nov 9, 2018 at 4:34 AM Bill Wendling via cfe-commits
> wrote:
> >
> > Author: void
> > Date: Thu Nov 8 17:32:30 2018
> &
Author: void
Date: Tue Nov 20 00:53:30 2018
New Revision: 347294
URL: http://llvm.org/viewvc/llvm-project?rev=347294&view=rev
Log:
Use is.constant intrinsic for __builtin_constant_p
Summary:
A __builtin_constant_p may end up with a constant after inlining. Use
the is.constant intrinsic if it's a
Author: void
Date: Tue Nov 20 15:24:16 2018
New Revision: 347364
URL: http://llvm.org/viewvc/llvm-project?rev=347364&view=rev
Log:
Reinstate 347294 with a fix for the failures.
EvaluateAsInt() is sometimes called in a constant context. When that's the
case, we need to specify it as so.
Modified:
Author: void
Date: Tue Nov 20 15:24:39 2018
New Revision: 347366
URL: http://llvm.org/viewvc/llvm-project?rev=347366&view=rev
Log:
Update EvaluateAsInt to the new syntax.
Modified:
clang-tools-extra/trunk/clang-tidy/bugprone/MisplacedWideningCastCheck.cpp
clang-tools-extra/trunk/clang-tid
Author: void
Date: Wed Nov 21 12:44:18 2018
New Revision: 347417
URL: http://llvm.org/viewvc/llvm-project?rev=347417&view=rev
Log:
Re-Reinstate 347294 with a fix for the failures.
Don't try to emit a scalar expression for a non-scalar argument to
__builtin_constant_p().
Third time's a charm!
Ad
Author: void
Date: Wed Nov 21 12:45:00 2018
New Revision: 347419
URL: http://llvm.org/viewvc/llvm-project?rev=347419&view=rev
Log:
Update call to EvaluateAsInt() to the new syntax.
Modified:
clang-tools-extra/trunk/clang-tidy/bugprone/MisplacedWideningCastCheck.cpp
clang-tools-extra/trunk
Author: void
Date: Thu Nov 22 01:31:08 2018
New Revision: 347446
URL: http://llvm.org/viewvc/llvm-project?rev=347446&view=rev
Log:
The result of is.constant() is unsigned.
Added:
cfe/trunk/test/CodeGen/builtin-constant-p.c
Modified:
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Modified: cfe/trunk
Author: void
Date: Thu Nov 22 14:58:06 2018
New Revision: 347480
URL: http://llvm.org/viewvc/llvm-project?rev=347480&view=rev
Log:
A __builtin_constant_p() returns 0 with a function type.
Modified:
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
cfe/trunk/test/CodeGen/builtin-constant-p.c
Modified:
Author: void
Date: Sat Nov 24 02:45:55 2018
New Revision: 347512
URL: http://llvm.org/viewvc/llvm-project?rev=347512&view=rev
Log:
isEvaluatable() implies a constant context.
Assume that we're in a constant context if we're asking if the expression can
be compiled into a constant initializer. Thi
Author: void
Date: Sun Nov 25 18:10:53 2018
New Revision: 347531
URL: http://llvm.org/viewvc/llvm-project?rev=347531&view=rev
Log:
A "constexpr" is evaluated in a constant context. Make sure this is reflected
if a __builtin_constant_p() is a part of a constexpr.
Modified:
cfe/trunk/lib/AST/Ex
Author: void
Date: Fri Nov 30 12:40:06 2018
New Revision: 348029
URL: http://llvm.org/viewvc/llvm-project?rev=348029&view=rev
Log:
We're in a constant context in the ConstantEmitter.
Modified:
cfe/trunk/lib/CodeGen/CGExprConstant.cpp
cfe/trunk/test/CodeGen/builtin-constant-p.c
Modified:
Author: void
Date: Fri Nov 30 12:44:11 2018
New Revision: 348032
URL: http://llvm.org/viewvc/llvm-project?rev=348032&view=rev
Log:
Revert r348029. I was git-ing and jumped the gun.
Modified:
cfe/trunk/lib/CodeGen/CGExprConstant.cpp
cfe/trunk/test/CodeGen/builtin-constant-p.c
Modified: cf
Author: void
Date: Sat Dec 1 00:29:36 2018
New Revision: 348070
URL: http://llvm.org/viewvc/llvm-project?rev=348070&view=rev
Log:
Specify constant context in constant emitter
The constant emitter may need to evaluate the expression in a constant context.
For exasmple, global initializer lists.
Author: void
Date: Sat Dec 1 01:06:26 2018
New Revision: 348071
URL: http://llvm.org/viewvc/llvm-project?rev=348071&view=rev
Log:
Correct indentation.
Modified:
cfe/trunk/lib/CodeGen/CGExprConstant.cpp
Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL:
http://llvm.org/viewvc/llvm-proj
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: 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.
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
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
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
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
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
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
https://github.com/bwendling updated
https://github.com/llvm/llvm-project/pull/70606
>From 19dd7db8ab5f98a618c717944c96b34e604fbc30 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Sun, 29 Oct 2023 14:58:04 -0700
Subject: [PATCH 1/2] [CodeGen] Revamp counted_by calculations
Break down the co
https://github.com/bwendling updated
https://github.com/llvm/llvm-project/pull/70606
>From 19dd7db8ab5f98a618c717944c96b34e604fbc30 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Sun, 29 Oct 2023 14:58:04 -0700
Subject: [PATCH 1/3] [CodeGen] Revamp counted_by calculations
Break down the co
https://github.com/bwendling updated
https://github.com/llvm/llvm-project/pull/70606
>From 19dd7db8ab5f98a618c717944c96b34e604fbc30 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Sun, 29 Oct 2023 14:58:04 -0700
Subject: [PATCH 1/4] [CodeGen] Revamp counted_by calculations
Break down the co
https://github.com/bwendling updated
https://github.com/llvm/llvm-project/pull/70606
>From 19dd7db8ab5f98a618c717944c96b34e604fbc30 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Sun, 29 Oct 2023 14:58:04 -0700
Subject: [PATCH 1/5] [CodeGen] Revamp counted_by calculations
Break down the co
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction
&CGF,
return nullptr;
}
-FieldDecl *CodeGenFunction::FindCountedByField(
-const Expr *Base,
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) {
+Expr *CodeGenFunction::BuildC
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
-const Expr *Base = E->IgnoreParenImpCa
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction
&CGF,
return nullptr;
}
-FieldDecl *CodeGenFunction::FindCountedByField(
-const Expr *Base,
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) {
+Expr *CodeGenFunction::BuildC
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction
&CGF,
return nullptr;
}
-FieldDecl *CodeGenFunction::FindCountedByField(
-const Expr *Base,
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) {
+Expr *CodeGenFunction::BuildC
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
-const Expr *Base = E->IgnoreParenImpCa
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
-const Expr *Base = E->IgnoreParenImpCa
https://github.com/bwendling updated
https://github.com/llvm/llvm-project/pull/70606
>From 19dd7db8ab5f98a618c717944c96b34e604fbc30 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Sun, 29 Oct 2023 14:58:04 -0700
Subject: [PATCH 1/7] [CodeGen] Revamp counted_by calculations
Break down the co
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
-const Expr *Base = E->IgnoreParenImpCa
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 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
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
-const Expr *Base = E->IgnoreParenImpCa
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E,
unsigned Type,
}
if (IsDynamic) {
-LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
-getLangOpts().getStrictFlexArraysLevel();
-const Expr *Base = E->IgnoreParenImpCa
1 - 100 of 686 matches
Mail list logo