diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2008-08-25 20:46:57 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2008-08-25 20:46:57 +0000 |
| commit | 0a2ba3f10b47a1bd64ede213d03d8a74431fb8b1 (patch) | |
| tree | f36d43b48ad49086f4e05583940424f52c2b4a8a /clang/test | |
| parent | f2e69888c578052cea81990c5526c73bb411dea1 (diff) | |
| download | bcm5719-llvm-0a2ba3f10b47a1bd64ede213d03d8a74431fb8b1.tar.gz bcm5719-llvm-0a2ba3f10b47a1bd64ede213d03d8a74431fb8b1.zip | |
Fix for PR2720; be a little bit more permissive in initializers for
casting pointers to integers.
Eventually, we should check whether we can evaluate an expression
using Expr::tryEvaluate, and this codepath should be tightened to only
handle standard-compliant cases.
llvm-svn: 55331
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Sema/const-ptr-int-ptr-cast.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Sema/const-ptr-int-ptr-cast.c b/clang/test/Sema/const-ptr-int-ptr-cast.c new file mode 100644 index 00000000000..6bf44b05b35 --- /dev/null +++ b/clang/test/Sema/const-ptr-int-ptr-cast.c @@ -0,0 +1,3 @@ +// RUN: clang -fsyntax-only -verify %s + +char *a = (void*)(unsigned long long)(void*)&a; |

