llvm/llvm-project

auto allowed with a type in C++

Open

#164,273 opened on 2025年10月20日

GitHub で見る
 (10 comments) (0 reactions) (1 assignee)C++ (10,782 forks)batch import
clang:frontenddiverges-from:edgdiverges-from:gccdiverges-from:msvcgood first issue

Repository metrics

Stars
 (26,378 stars)
PR merge metrics
 (平均マージ 1d 2h) (30d で 1,000 merged PRs)

説明

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.

コントリビューターガイド