diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-02-22 06:45:27 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-02-22 06:45:27 +0000 |
commit | 578a97249c10eb83f25b408de1edfb70f5a4233c (patch) | |
tree | acb8a7a848aa0a7c2ca6e17a929e7e3ec2668b83 /test/Sema/const-ptr-int-ptr-cast.c | |
parent | e28099bf301ad8b0b77cb11f94caad3c38d97dda (diff) |
Throw the switch to exclusively use Evaluate (along with the small
helper isConstantInitializer) to check whether an initializer is
constant. This passes tests, but it's possible that it'll cause
regressions with real-world code.
Future work:
1. The diagnostics obtained this way are lower quality at the moment;
some work both here and in Evaluate is needed for accurate diagnostics.
2. We probably need some extra code when we're in -pedantic mode so we
can strictly enforce the rules in C99 6.6p7.
3. Dead code cleanup (this should wait until after 2, because we might
want to re-use some of the code).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/const-ptr-int-ptr-cast.c')
-rw-r--r-- | test/Sema/const-ptr-int-ptr-cast.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Sema/const-ptr-int-ptr-cast.c b/test/Sema/const-ptr-int-ptr-cast.c index 6bf44b05b3..3590583cd5 100644 --- a/test/Sema/const-ptr-int-ptr-cast.c +++ b/test/Sema/const-ptr-int-ptr-cast.c @@ -1,3 +1,5 @@ // RUN: clang -fsyntax-only -verify %s -char *a = (void*)(unsigned long long)(void*)&a; +#include <stdint.h> + +char *a = (void*)(uintptr_t)(void*)&a; |