Alex Lorenz | 75391c7 | 2017-01-19 17:17:57 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | struct spinlock_t { |
| 4 | int lock; |
| 5 | } audit_skb_queue; |
| 6 | |
| 7 | void fn1() { |
| 8 | audit_skb_queue = (lock); // expected-error {{use of undeclared identifier 'lock'; did you mean 'long'?}} |
| 9 | } // expected-error@-1 {{assigning to 'struct spinlock_t' from incompatible type '<overloaded function type>'}} |
| 10 | |
| 11 | void fn2() { |
| 12 | audit_skb_queue + (lock); // expected-error {{use of undeclared identifier 'lock'; did you mean 'long'?}} |
| 13 | } // expected-error@-1 {{reference to overloaded function could not be resolved; did you mean to call it?}} |