2014-03-06 10:25:04 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify %s -Wabsolute-value
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
int abs(int);
|
2014-03-06 10:28:22 +08:00
|
|
|
double fabs(double);
|
2014-03-06 10:25:04 +08:00
|
|
|
}
|
|
|
|
|
2014-03-06 10:28:22 +08:00
|
|
|
using ::fabs;
|
2014-03-06 10:25:04 +08:00
|
|
|
|
2014-03-06 10:28:22 +08:00
|
|
|
double test(double x) {
|
2014-03-06 10:25:04 +08:00
|
|
|
return ::abs(x);
|
|
|
|
// expected-warning@-1{{using integer absolute value function 'abs' when argument is of floating point type}}
|
|
|
|
}
|