diff options
Diffstat (limited to 'clang/test/Sema/cast.c')
-rw-r--r-- | clang/test/Sema/cast.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/cast.c b/clang/test/Sema/cast.c index 6ceec6923c8..ec19626d28e 100644 --- a/clang/test/Sema/cast.c +++ b/clang/test/Sema/cast.c @@ -5,4 +5,10 @@ cpumask_t x; void foo() { (void)x; } +void bar() { + char* a; + double b; + b = (double)a; // expected-error {{pointer cannot be cast to type}} + a = (char*)b; // expected-error {{cannot be cast to a pointer type}} +} |