[all-commits] [llvm/llvm-project] 4c02ab: Change prototype merging error into a warning for ...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Tue Aug 9 08:37:07 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c02ab8c9742f6c32b17f49a306b3b072486f5c5
      https://github.com/llvm/llvm-project/commit/4c02ab8c9742f6c32b17f49a306b3b072486f5c5
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-08-09 (Tue, 09 Aug 2022)

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/Sema/prototype-redecls.c

  Log Message:
  -----------
  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




More information about the All-commits mailing list