xref: /llvm-project/clang/test/SemaCXX/typo-correction-builtin-func.cpp (revision f0899964e4041b1dc70dc66450a7f6b3e3a22262)
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 
3 // Test that clang does not emit 'declared here' note for builtin functions that don't have a declaration in source.
4 
t0()5 void t0() {
6   constexpr float A = __builtin_isinfinity(); // expected-error {{use of undeclared identifier '__builtin_isinfinity'; did you mean '__builtin_isfinite'?}}
7                                               // expected-error@-1 {{too few arguments to function call, expected 1, have 0}}
8 }
9