summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-12-26 03:35:45 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-12-26 03:35:45 +0000
commite14b1997db6e09028b3dfdb982fee7eb3ffe5e9f (patch)
tree77bf9b554a026166c2fb6af7cc75cb803aa21f7d /clang/test
parent11c7b1514872d98df0f03c9eaa4893b29a0295af (diff)
downloadbcm5719-llvm-e14b1997db6e09028b3dfdb982fee7eb3ffe5e9f.tar.gz
bcm5719-llvm-e14b1997db6e09028b3dfdb982fee7eb3ffe5e9f.zip
Don't look through casts when looking for the underlying decl for a function
call; the standard doesn't expect us to, and the program could be doing something crazy. Fixes PR5882. llvm-svn: 92166
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGen/func-ptr-cast-decl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/CodeGen/func-ptr-cast-decl.c b/clang/test/CodeGen/func-ptr-cast-decl.c
new file mode 100644
index 00000000000..e6307964294
--- /dev/null
+++ b/clang/test/CodeGen/func-ptr-cast-decl.c
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -emit-llvm-only %s -verify
+// PR5882
+
+int q_sk_num(void *a);
+typedef int (*fptr)(double);
+void a() { ((fptr)q_sk_num)(0); }
OpenPOWER on IntegriCloud