aboutsummaryrefslogtreecommitdiffstats
path: root/test/Sema/PR28181.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-24 19:18:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-24 19:18:04 +0000
commit865493b10990f9932c79d135eef448ff418792ab (patch)
tree37718471b885f5ff7effe1fcbcdf114f20b8638b /test/Sema/PR28181.c
parent5df539a1004bc4db5c38b33ba3e219595a10ae3c (diff)
downloadsrc-vendor/clang/clang-release_40-r292951.tar.gz
src-vendor/clang/clang-release_40-r292951.zip
Vendor import of clang release_40 branch r292951:vendor/clang/clang-release_40-r292951
Diffstat (limited to 'test/Sema/PR28181.c')
-rw-r--r--test/Sema/PR28181.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Sema/PR28181.c b/test/Sema/PR28181.c
new file mode 100644
index 000000000000..3410f466fc73
--- /dev/null
+++ b/test/Sema/PR28181.c
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+struct spinlock_t {
+ int lock;
+} audit_skb_queue;
+
+void fn1() {
+ audit_skb_queue = (lock); // expected-error {{use of undeclared identifier 'lock'; did you mean 'long'?}}
+} // expected-error@-1 {{assigning to 'struct spinlock_t' from incompatible type '<overloaded function type>'}}
+
+void fn2() {
+ audit_skb_queue + (lock); // expected-error {{use of undeclared identifier 'lock'; did you mean 'long'?}}
+} // expected-error@-1 {{reference to overloaded function could not be resolved; did you mean to call it?}}