xref: /llvm-project/clang/test/Misc/diag-func-call-ranges.cpp (revision 409a8097c5c728607eb6b05efb1744bf5f9096e1)
1 // RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-print-source-range-info %s 2>&1 | FileCheck %s --strict-whitespace
2 
3 // CHECK: error: no matching function for call to 'func'
4 
5 // CHECK:      :{[[@LINE+1]]:12-[[@LINE+1]]:18}: note: {{.*}} requires single argument
func(int aa)6 void func( int aa ) {}
7 // CHECK:      :{[[@LINE+1]]:12-[[@LINE+3]]:18}: note: {{.*}} requires 3 arguments
func(int aa,int bb,int cc)8 void func( int aa,
9            int bb,
10            int cc) {}
11 
arity_mismatch()12 void arity_mismatch() {
13   func(2, 4);
14 }
15