llvm/llvm-project

auto allowed with a type in C++

已关闭

#164,273 创建于 2025年10月20日

 (10 条评论) (0 个反应) (1 位负责人)C++ (10,782 个派生)batch import
clang:frontenddiverges-from:edgdiverges-from:gccdiverges-from:msvcgood first issue

仓库指标

星标
 (26,378 个星标)
PR 合并指标
 (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.

贡献者指南