Change prototype merging error into a warning for builtins
authorAaron Ballman <aaron@aaronballman.com>
Tue, 9 Aug 2022 15:35:37 +0000 (11:35 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 9 Aug 2022 15:36:48 +0000 (11:36 -0400)
commit4c02ab8c9742f6c32b17f49a306b3b072486f5c5
tree1dd1174db9de9bb9df45ac90119bbc65c6103ab4
parentd79e7dc939a3e9c422ecb4f7de17ca7a6d827ba7
Change prototype merging error into a warning for builtins

As was observed in https://reviews.llvm.org/D123627#3707635, it's
confusing that a user can write:
```
float rintf(void) {}
```
and get a warning, but writing:
```
float rintf() {}
```
gives an error. This patch changes the behavior so that both are
warnings, so that users who have functions which conflict with a
builtin identifier can still use that identifier as they wish.

Differential Revision: https://reviews.llvm.org/D131499
clang/lib/Sema/SemaDecl.cpp
clang/test/Sema/prototype-redecls.c