mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 03:56:08 +00:00

method parameter, provide a note pointing at the parameter itself so the user does not have to manually look for the function/method being called and match up parameters to arguments. For example, we now get: t.c:4:5: warning: incompatible pointer types passing 'long *' to parameter of type 'int *' [-pedantic] f(long_ptr); ^~~~~~~~ t.c:1:13: note: passing argument to parameter 'x' here void f(int *x); ^ llvm-svn: 102038
9 lines
334 B
C++
9 lines
334 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
// PR4103: Make sure we have a location for the error
|
|
class A {
|
|
float a(int *); // expected-note{{passing argument to parameter here}}
|
|
int b();
|
|
};
|
|
int A::b() { return a(a((int*)0)); } // expected-error {{cannot initialize a parameter of type 'int *' with an rvalue of type 'float'}}
|
|
|