llvm/llvm-project

auto allowed with a type in C++

Geschlossen

#164.273 geöffnet am 20.10.2025

 (10 Kommentare) (0 Reaktionen) (1 zugewiesene Person)C++ (10.782 Forks)batch import
clang:frontenddiverges-from:edgdiverges-from:gccdiverges-from:msvcgood first issue

Repository-Metriken

Stars
 (26.378 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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.

Contributor Guide