blob: 582907184ea53411cc50c68f5a0210b02c8abe97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// RUN: %clang_cc1 -emit-llvm-only %s
// PR45410
// Ensure we mark local extern redeclarations with a different type as non-builtin.
void non_builtin() {
extern float exp();
exp(); // Will crash due to wrong number of arguments if this calls the builtin.
}
// PR45410
// We mark exp() builtin as const with -fno-math-errno (default).
// We mustn't do that for extern redeclarations of builtins where the type differs.
float attribute() {
extern float exp();
return exp(1);
}
|