// Look up absolute value function in TU scope.
DeclarationName DN(&S.Context.Idents.get(AbsName));
LookupResult R(S, DN, Loc, Sema::LookupAnyName);
+ R.suppressDiagnostics();
S.LookupName(R, S.TUScope);
// Skip notes if multiple results found in lookup.
--- /dev/null
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify %s -Wabsolute-value
+
+extern "C" {
+int abs(int);
+long labs(long);
+}
+
+using ::labs;
+
+long test(long x) {
+ return ::abs(x);
+ // expected-warning@-1{{using integer absolute value function 'abs' when argument is of floating point type}}
+}