[all-commits] [llvm/llvm-project] d5444a: [clang][C2x] Remove confusing diagnostic auto stor...

Guillot Tony via All-commits all-commits at lists.llvm.org
Wed Oct 11 00:52:00 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d5444ab26743115e42e4abb3782bbefb0e8912d0
      https://github.com/llvm/llvm-project/commit/d5444ab26743115e42e4abb3782bbefb0e8912d0
  Author: Guillot Tony <tony.guillot at protonmail.com>
  Date:   2023-10-11 (Wed, 11 Oct 2023)

  Changed paths:
    M clang/lib/Parse/ParseDecl.cpp
    M clang/test/C/C2x/n3007.c
    M clang/test/Sema/c2x-auto.c

  Log Message:
  -----------
  [clang][C2x] Remove confusing diagnostic auto storage class specifier (#68710)

When declaring `auto int` at local or file scope, we emit a warning
intended for C++11 and later, which is incorrect and confusing in C23.
See [Godbolt example](https://godbolt.org/z/j1acGhecd).
Now this diagnostic does not show up in C23.




More information about the All-commits mailing list