llvm/llvm-project

auto allowed with a type in C++

クローズ

#164,273 opened on 2025/10/20

 (10 件のコメント) (0 件のリアクション) (1 人の担当者)C++ (10,782 件のフォーク)batch import
clang:frontenddiverges-from:edgdiverges-from:gccdiverges-from:msvcgood first issue

Repository metrics

Stars
 (26,378 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

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