[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / builtin-redeclaration.c
blob582907184ea53411cc50c68f5a0210b02c8abe97
1 // RUN: %clang_cc1 -emit-llvm-only %s
3 // PR45410
4 // Ensure we mark local extern redeclarations with a different type as non-builtin.
5 void non_builtin() {
6 extern float exp();
7 exp(); // Will crash due to wrong number of arguments if this calls the builtin.
10 // PR45410
11 // We mark exp() builtin as const with -fno-math-errno (default).
12 // We mustn't do that for extern redeclarations of builtins where the type differs.
13 float attribute() {
14 extern float exp();
15 return exp(1);