1 // RUN: %clang_cc1 -fsyntax-only -verify -frecovery-ast -fno-recovery-ast-type %s
2 
3 int call(int); // expected-note3 {{'call' declared here}}
4 
test1(int s)5 void test1(int s) {
6   // verify "assigning to 'int' from incompatible type '<dependent type>'" is
7   // not emitted.
8   s = call(); // expected-error {{too few arguments to function call}}
9 
10   // verify diagnostic "operand of type '<dependent type>' where arithmetic or
11   // pointer type is required" is not emitted.
12   (float)call(); // expected-error {{too few arguments to function call}}
13   // verify disgnostic "called object type '<dependent type>' is not a function
14   // or function pointer" is not emitted.
15   (*__builtin_classify_type)(1); // expected-error {{builtin functions must be directly called}}
16 }
17 
test2(int * ptr,float f)18 void test2(int* ptr, float f) {
19   // verify diagnostic "used type '<dependent type>' where arithmetic or pointer
20   // type is required" is not emitted.
21   (call() ? ptr : f); // expected-error {{too few arguments to function call}}
22 }
23