-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][Sema] Don't emit 'declared here' note for builtin functions w…
…ith no decl in source (#93394) Fixes #93369 --------- Co-authored-by: Timm Baeder <tbaeder@redhat.com> Co-authored-by: S. B. Tam <cpplearner@outlook.com>
- Loading branch information
1 parent
0b2094c
commit f089996
Showing
4 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// RUN: %clang_cc1 -fsyntax-only -verify %s | ||
|
||
// Test that clang does not emit 'declared here' note for builtin functions that don't have a declaration in source. | ||
|
||
void t0() { | ||
constexpr float A = __builtin_isinfinity(); // expected-error {{use of undeclared identifier '__builtin_isinfinity'; did you mean '__builtin_isfinite'?}} | ||
// expected-error@-1 {{too few arguments to function call, expected 1, have 0}} | ||
} |