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.

貢獻者指南