| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Fixes PR27439
Reviewers: rsmith, Rakete1111
Reviewed By: rsmith
Subscribers: Rakete1111, cfe-commits
Differential Revision: https://reviews.llvm.org/D52750
llvm-svn: 344759
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rdar://problem/35539384
Reviewers: ahatanak, nicholas, rsmith, jkorous-apple
Reviewed By: jkorous-apple
Subscribers: cfe-commits, jkorous-apple
Differential Revision: https://reviews.llvm.org/D42938
llvm-svn: 328671
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also add testcases for a bunch of expression forms that cause our evaluator to
crash. See PR33140 and PR32864 for crashes that this was causing.
This reverts r305287, which reverted r305239, which reverted r301742. The
previous revert claimed that buildbots were broken, but did not add any
testcases and the buildbots have lost all memory of what was wrong here.
Changes to test/OpenMP are not reverted; another change has triggered those
tests to change their output in the same way that r301742 did.
llvm-svn: 306346
|
|
|
|
|
|
|
|
|
| |
full-exprs."
This reverts commit r305239 because it broke the buildbots (the
diag-flags.cpp test is failing).
llvm-svn: 305287
|
|
|
|
|
|
| |
This patch also exposed pre-existing bugs in clang, see PR32864 and PR33140#c3 .
llvm-svn: 305239
|
|
|
|
|
|
| |
The patch was itself correct but it uncovered other bugs which are going to be difficult to fix, per PR33140.
llvm-svn: 305233
|
|
|
|
|
|
| |
non-constexpr function calls unless the EvalInfo says to stop.
llvm-svn: 303317
|
|
|
|
|
|
| |
The fix is that ExprEvaluatorBase::VisitInitListExpr should handle transparent exprs instead of exprs with one element. Fixing that uncovers one testcase failure because the AST for "constexpr _Complex float test2 = {1};" is wrong (the _Complex prvalue should not be const-qualified), and a number of test failures in test/OpenMP where the captured stmt contains an InitListExpr that is in syntactic form.
llvm-svn: 301891
|
|
|
|
| |
llvm-svn: 301787
|
|
|
|
|
|
|
|
| |
supposed to continue evaluating them.
Also fix a crash casting a derived nullptr to a virtual base.
llvm-svn: 301785
|
|
|
|
|
|
|
|
| |
CheckForIntOverflow used to implement a whitelist of top-level expressions to
send to the constant expression evaluator, which handled many more expressions
than the CheckForIntOverflow whitelist did.
llvm-svn: 301742
|
|
|
|
|
|
| |
if we can't evaluate the base, if the evaluation mode tells us to continue evaluation.
llvm-svn: 301522
|
|
|
|
|
|
| |
expressions of a ConditionalOperator when the condition can't be evaluated and we're in an evaluation mode that says we should continue evaluating.
llvm-svn: 301520
|
|
|
|
|
|
|
| |
Add a triple to the run lines so that integers will the same sizes across runs.
Also add a compile time check to ensure the assumptions about sizes are met.
llvm-svn: 265991
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r257357 fixed clang to warn on integer overflow in struct initializers.
However, it didn't warn when a struct had a nested initializer. This
commit makes changes in Sema::CheckForIntOverflow to handle nested
initializers.
For example:
struct s {
struct t {
unsigned x;
} t;
} s = {
{
.x = 4 * 1024 * 1024 * 1024
}
};
rdar://problem/23526454
llvm-svn: 260360
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang wasn't issuing a warning when compiling the following code:
struct s {
unsigned x;
} s = {
.x = 4 * 1024 * 1024 * 1024
};
rdar://problem/23399683
Differential Revision: http://reviews.llvm.org/D15097
llvm-svn: 257357
|
|
|
|
|
|
|
|
| |
variables in C, in the cases where we can constant-fold it to a value
regardless (such as floating-point division by zero and signed integer
overflow). Strictly enforcing this rule breaks too much code.
llvm-svn: 254992
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
side-effect, so that we don't allow speculative evaluation of such expressions
during code generation.
This caused a diagnostic quality regression, so fix constant expression
diagnostics to prefer either the first "can't be constant folded" diagnostic or
the first "not a constant expression" diagnostic depending on the kind of
evaluation we're doing. This was always the intent, but didn't quite work
correctly before.
This results in certain initializers that used to be constant initializers to
no longer be; in particular, things like:
float f = 1e100;
are no longer accepted in C. This seems appropriate, as such constructs would
lead to code being executed if sanitizers are enabled.
llvm-svn: 254574
|
|
When visiting AssignmentOps, keep evaluating after a failure (when possible) in
order to identify overflow in subexpressions.
Differential Revision: http://reviews.llvm.org/D1238
llvm-svn: 228202
|