llvm/llvm-project

auto allowed with a type in C++

Open

#164,273 建立於 2025年10月20日

在 GitHub 查看
 (10 留言) (0 反應) (1 負責人)C++ (10,782 fork)batch import
clang:frontenddiverges-from:edgdiverges-from:gccdiverges-from:msvcgood first issue

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

We currently allow something like this in C++: https://godbolt.org/z/7fabbGfe6

void f() {
  auto int x = 1;
}

It looks like this was allowed as an extension in C++ because it was valid C but I don't think it makes sense to support this anymore.

貢獻者指南