diff options
| author | George Burgess IV <george.burgess.iv@gmail.com> | 2015-08-18 18:18:27 +0000 |
|---|---|---|
| committer | George Burgess IV <george.burgess.iv@gmail.com> | 2015-08-18 18:18:27 +0000 |
| commit | 232c76213d43fbc9dac94a7350c1ee96e0be3d9f (patch) | |
| tree | b166487406fe2eee24f78d73c23c7f4bc91c2dfb /clang/test/Sema | |
| parent | 09bf4c102f9f78bb50df36d22714e7048d3bef16 (diff) | |
| download | bcm5719-llvm-232c76213d43fbc9dac94a7350c1ee96e0be3d9f.tar.gz bcm5719-llvm-232c76213d43fbc9dac94a7350c1ee96e0be3d9f.zip | |
Make __builtin_object_size always answer correctly
__builtin_object_size would return incorrect answers for many uses where
type=3. This fixes the inaccuracy by making us emit 0 instead of LLVM's
objectsize intrinsic.
Additionally, there are many cases where we would emit suboptimal (but
correct) answers, such as when arrays are involved. This patch fixes
some of these cases (please see new tests in test/CodeGen/object-size.c
for specifics on which cases are improved)
Patch mostly by Richard Smith.
Differential Revision: http://reviews.llvm.org/D12000
This fixes PR15212.
llvm-svn: 245323
Diffstat (limited to 'clang/test/Sema')
| -rw-r--r-- | clang/test/Sema/const-eval.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/test/Sema/const-eval.c b/clang/test/Sema/const-eval.c index 5f5b6f3dc19..317173a43bb 100644 --- a/clang/test/Sema/const-eval.c +++ b/clang/test/Sema/const-eval.c @@ -118,10 +118,6 @@ float varfloat; const float constfloat = 0; EVAL_EXPR(43, varfloat && constfloat) // expected-error {{must have a constant size}} -// <rdar://problem/11205586> -// (Make sure we continue to reject this.) -EVAL_EXPR(44, "x"[0]); // expected-error {{variable length array}} - // <rdar://problem/10962435> EVAL_EXPR(45, ((char*)-1) + 1 == 0 ? 1 : -1) EVAL_EXPR(46, ((char*)-1) + 1 < (char*) -1 ? 1 : -1) |

