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.

贡献者指南