| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782 |
- // RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify %s -Wabsolute-value
- // RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only %s -Wabsolute-value -fdiagnostics-parseable-fixits 2>&1 | FileCheck %s
- int abs(int);
- long int labs(long int);
- long long int llabs(long long int);
- float fabsf(float);
- double fabs(double);
- long double fabsl(long double);
- float cabsf(float _Complex);
- double cabs(double _Complex);
- long double cabsl(long double _Complex);
- void test_int(int x) {
- (void)abs(x);
- (void)labs(x);
- (void)llabs(x);
- (void)fabsf(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of integer type}}
- // expected-note@-2 {{use function 'abs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"abs"
- (void)fabs(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of integer type}}
- // expected-note@-2 {{use function 'abs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"abs"
- (void)fabsl(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of integer type}}
- // expected-note@-2 {{use function 'abs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"abs"
- (void)cabsf(x);
- // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of integer type}}
- // expected-note@-2 {{use function 'abs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"abs"
- (void)cabs(x);
- // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of integer type}}
- // expected-note@-2 {{use function 'abs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"abs"
- (void)cabsl(x);
- // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of integer type}}
- // expected-note@-2 {{use function 'abs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"abs"
- (void)__builtin_abs(x);
- (void)__builtin_labs(x);
- (void)__builtin_llabs(x);
- (void)__builtin_fabsf(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_abs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_abs"
- (void)__builtin_fabs(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_abs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_abs"
- (void)__builtin_fabsl(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_abs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_abs"
- (void)__builtin_cabsf(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_abs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_abs"
- (void)__builtin_cabs(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_abs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_abs"
- (void)__builtin_cabsl(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_abs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_abs"
- }
- void test_long(long x) {
- (void)abs(x); // no warning - int and long are same length for this target
- (void)labs(x);
- (void)llabs(x);
- (void)fabsf(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of integer type}}
- // expected-note@-2 {{use function 'labs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"labs"
- (void)fabs(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of integer type}}
- // expected-note@-2 {{use function 'labs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"labs"
- (void)fabsl(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of integer type}}
- // expected-note@-2 {{use function 'labs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"labs"
- (void)cabsf(x);
- // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of integer type}}
- // expected-note@-2 {{use function 'labs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"labs"
- (void)cabs(x);
- // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of integer type}}
- // expected-note@-2 {{use function 'labs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"labs"
- (void)cabsl(x);
- // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of integer type}}
- // expected-note@-2 {{use function 'labs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"labs"
- (void)__builtin_abs(x); // no warning - int and long are same length for
- // this target
- (void)__builtin_labs(x);
- (void)__builtin_llabs(x);
- (void)__builtin_fabsf(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_labs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_labs"
- (void)__builtin_fabs(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_labs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_labs"
- (void)__builtin_fabsl(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_labs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_labs"
- (void)__builtin_cabsf(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_labs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_labs"
- (void)__builtin_cabs(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_labs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_labs"
- (void)__builtin_cabsl(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_labs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_labs"
- }
- void test_long_long(long long x) {
- (void)abs(x);
- // expected-warning@-1{{absolute value function 'abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value}}
- // expected-note@-2{{use function 'llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"llabs"
- (void)labs(x);
- // expected-warning@-1{{absolute value function 'labs' given an argument of type 'long long' but has parameter of type 'long' which may cause truncation of value}}
- // expected-note@-2{{use function 'llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"llabs"
- (void)llabs(x);
- (void)fabsf(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of integer type}}
- // expected-note@-2 {{use function 'llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"llabs"
- (void)fabs(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of integer type}}
- // expected-note@-2 {{use function 'llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"llabs"
- (void)fabsl(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of integer type}}
- // expected-note@-2 {{use function 'llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"llabs"
- (void)cabsf(x);
- // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of integer type}}
- // expected-note@-2 {{use function 'llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"llabs"
- (void)cabs(x);
- // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of integer type}}
- // expected-note@-2 {{use function 'llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"llabs"
- (void)cabsl(x);
- // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of integer type}}
- // expected-note@-2 {{use function 'llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"llabs"
- (void)__builtin_abs(x);
- // expected-warning@-1{{absolute value function '__builtin_abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value}}
- // expected-note@-2{{use function '__builtin_llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_llabs"
- (void)__builtin_labs(x);
- // expected-warning@-1{{absolute value function '__builtin_labs' given an argument of type 'long long' but has parameter of type 'long' which may cause truncation of value}}
- // expected-note@-2{{use function '__builtin_llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_llabs"
- (void)__builtin_llabs(x);
- (void)__builtin_fabsf(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_llabs"
- (void)__builtin_fabs(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_llabs"
- (void)__builtin_fabsl(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_llabs"
- (void)__builtin_cabsf(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_llabs"
- (void)__builtin_cabs(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_llabs"
- (void)__builtin_cabsl(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of integer type}}
- // expected-note@-2 {{use function '__builtin_llabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_llabs"
- }
- void test_float(float x) {
- (void)abs(x);
- // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"fabsf"
- (void)labs(x);
- // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabsf"
- (void)llabs(x);
- // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsf"
- (void)fabsf(x);
- (void)fabs(x);
- (void)fabsl(x);
- (void)cabsf(x);
- // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsf"
- (void)cabs(x);
- // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabsf"
- (void)cabsl(x);
- // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsf"
- (void)__builtin_abs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_fabsf"
- (void)__builtin_labs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabsf"
- (void)__builtin_llabs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsf"
- (void)__builtin_fabsf(x);
- (void)__builtin_fabs(x);
- (void)__builtin_fabsl(x);
- (void)__builtin_cabsf(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsf"
- (void)__builtin_cabs(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabsf"
- (void)__builtin_cabsl(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsf"
- }
- void test_double(double x) {
- (void)abs(x);
- // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"fabs"
- (void)labs(x);
- // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabs"
- (void)llabs(x);
- // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabs"
- (void)fabsf(x);
- // expected-warning@-1{{absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value}}
- // expected-note@-2{{use function 'fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabs"
- (void)fabs(x);
- (void)fabsl(x);
- (void)cabsf(x);
- // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabs"
- (void)cabs(x);
- // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabs"
- (void)cabsl(x);
- // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabs"
- (void)__builtin_abs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_fabs"
- (void)__builtin_labs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabs"
- (void)__builtin_llabs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabs"
- (void)__builtin_fabsf(x);
- // expected-warning@-1{{absolute value function '__builtin_fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value}}
- // expected-note@-2{{use function '__builtin_fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabs"
- (void)__builtin_fabs(x);
- (void)__builtin_fabsl(x);
- (void)__builtin_cabsf(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabs"
- (void)__builtin_cabs(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabs"
- (void)__builtin_cabsl(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabs"
- }
- void test_long_double(long double x) {
- (void)abs(x);
- // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"fabsl"
- (void)labs(x);
- // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabsl"
- (void)llabs(x);
- // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsl"
- (void)fabsf(x);
- // expected-warning@-1{{absolute value function 'fabsf' given an argument of type 'long double' but has parameter of type 'float' which may cause truncation of value}}
- // expected-note@-2{{use function 'fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsl"
- (void)fabs(x);
- // expected-warning@-1{{absolute value function 'fabs' given an argument of type 'long double' but has parameter of type 'double' which may cause truncation of value}}
- // expected-note@-2{{use function 'fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabsl"
- (void)fabsl(x);
- (void)cabsf(x);
- // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsl"
- (void)cabs(x);
- // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabsl"
- (void)cabsl(x);
- // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of floating point type}}
- // expected-note@-2 {{use function 'fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsl"
- (void)__builtin_abs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_fabsl"
- (void)__builtin_labs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabsl"
- (void)__builtin_llabs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsl"
- (void)__builtin_fabsf(x);
- // expected-warning@-1{{absolute value function '__builtin_fabsf' given an argument of type 'long double' but has parameter of type 'float' which may cause truncation of value}}
- // expected-note@-2{{use function '__builtin_fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsl"
- (void)__builtin_fabs(x);
- // expected-warning@-1{{absolute value function '__builtin_fabs' given an argument of type 'long double' but has parameter of type 'double' which may cause truncation of value}}
- // expected-note@-2{{use function '__builtin_fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabsl"
- (void)__builtin_fabsl(x);
- (void)__builtin_cabsf(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsl"
- (void)__builtin_cabs(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabsl"
- (void)__builtin_cabsl(x);
- // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of floating point type}}
- // expected-note@-2 {{use function '__builtin_fabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsl"
- }
- void test_complex_float(_Complex float x) {
- (void)abs(x);
- // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"cabsf"
- (void)labs(x);
- // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsf"
- (void)llabs(x);
- // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsf"
- (void)fabsf(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsf"
- (void)fabs(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsf"
- (void)fabsl(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsf"
- (void)cabsf(x);
- (void)cabs(x);
- (void)cabsl(x);
- (void)__builtin_abs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_cabsf"
- (void)__builtin_labs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsf"
- (void)__builtin_llabs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsf"
- (void)__builtin_fabsf(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsf"
- (void)__builtin_fabs(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsf"
- (void)__builtin_fabsl(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabsf' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsf"
- (void)__builtin_cabsf(x);
- (void)__builtin_cabs(x);
- (void)__builtin_cabsl(x);
- }
- void test_complex_double(_Complex double x) {
- (void)abs(x);
- // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"cabs"
- (void)labs(x);
- // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabs"
- (void)llabs(x);
- // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabs"
- (void)fabsf(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabs"
- (void)fabs(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabs"
- (void)fabsl(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabs"
- (void)cabsf(x);
- // expected-warning@-1 {{absolute value function 'cabsf' given an argument of type '_Complex double' but has parameter of type '_Complex float' which may cause truncation of value}}
- // expected-note@-2 {{use function 'cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabs"
- (void)cabs(x);
- (void)cabsl(x);
- (void)__builtin_abs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_cabs"
- (void)__builtin_labs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabs"
- (void)__builtin_llabs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabs"
- (void)__builtin_fabsf(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabs"
- (void)__builtin_fabs(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabs"
- (void)__builtin_fabsl(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabs"
- (void)__builtin_cabsf(x);
- // expected-warning@-1 {{absolute value function '__builtin_cabsf' given an argument of type '_Complex double' but has parameter of type '_Complex float' which may cause truncation of value}}
- // expected-note@-2 {{use function '__builtin_cabs' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabs"
- (void)__builtin_cabs(x);
- (void)__builtin_cabsl(x);
- }
- void test_complex_long_double(_Complex long double x) {
- (void)abs(x);
- // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"cabsl"
- (void)labs(x);
- // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsl"
- (void)llabs(x);
- // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsl"
- (void)fabsf(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsl"
- (void)fabs(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsl"
- (void)fabsl(x);
- // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of complex type}}
- // expected-note@-2 {{use function 'cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsl"
- (void)cabsf(x);
- // expected-warning@-1 {{absolute value function 'cabsf' given an argument of type '_Complex long double' but has parameter of type '_Complex float' which may cause truncation of value}}
- // expected-note@-2 {{use function 'cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsl"
- (void)cabs(x);
- // expected-warning@-1 {{absolute value function 'cabs' given an argument of type '_Complex long double' but has parameter of type '_Complex double' which may cause truncation of value}}
- // expected-note@-2 {{use function 'cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsl"
- (void)cabsl(x);
- (void)__builtin_abs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_cabsl"
- (void)__builtin_labs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsl"
- (void)__builtin_llabs(x);
- // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsl"
- (void)__builtin_fabsf(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsl"
- (void)__builtin_fabs(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsl"
- (void)__builtin_fabsl(x);
- // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of complex type}}
- // expected-note@-2 {{use function '__builtin_cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsl"
- (void)__builtin_cabsf(x);
- // expected-warning@-1 {{absolute value function '__builtin_cabsf' given an argument of type '_Complex long double' but has parameter of type '_Complex float' which may cause truncation of value}}
- // expected-note@-2 {{use function '__builtin_cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsl"
- (void)__builtin_cabs(x);
- // expected-warning@-1 {{absolute value function '__builtin_cabs' given an argument of type '_Complex long double' but has parameter of type '_Complex double' which may cause truncation of value}}
- // expected-note@-2 {{use function '__builtin_cabsl' instead}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsl"
- (void)__builtin_cabsl(x);
- }
- void test_unsigned_int(unsigned int x) {
- (void)abs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to 'abs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:""
- (void)labs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to 'labs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
- (void)llabs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to 'llabs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
- (void)fabsf(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to 'fabsf' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
- (void)fabs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to 'fabs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
- (void)fabsl(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to 'fabsl' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
- (void)cabsf(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to 'cabsf' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
- (void)cabs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to 'cabs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
- (void)cabsl(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to 'cabsl' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
- (void)__builtin_abs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_abs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:""
- (void)__builtin_labs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_labs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
- (void)__builtin_llabs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_llabs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
- (void)__builtin_fabsf(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_fabsf' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
- (void)__builtin_fabs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_fabs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
- (void)__builtin_fabsl(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_fabsl' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
- (void)__builtin_cabsf(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_cabsf' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
- (void)__builtin_cabs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_cabs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
- (void)__builtin_cabsl(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_cabsl' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
- }
- void test_unsigned_long(unsigned long x) {
- (void)abs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to 'abs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:""
- (void)labs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to 'labs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
- (void)llabs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to 'llabs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
- (void)fabsf(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to 'fabsf' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
- (void)fabs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to 'fabs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
- (void)fabsl(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to 'fabsl' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
- (void)cabsf(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to 'cabsf' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
- (void)cabs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to 'cabs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
- (void)cabsl(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to 'cabsl' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
- (void)__builtin_abs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_abs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:""
- (void)__builtin_labs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_labs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
- (void)__builtin_llabs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_llabs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
- (void)__builtin_fabsf(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_fabsf' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
- (void)__builtin_fabs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_fabs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
- (void)__builtin_fabsl(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_fabsl' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
- (void)__builtin_cabsf(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_cabsf' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
- (void)__builtin_cabs(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_cabs' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
- (void)__builtin_cabsl(x);
- // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
- // expected-note@-2 {{remove the call to '__builtin_cabsl' since unsigned values cannot be negative}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
- }
|