llvm/llvm-project

auto allowed with a type in C++

Open

#164.273 aperta il 20 ott 2025

Vedi su GitHub
 (10 commenti) (0 reazioni) (1 assegnatario)C++ (10.782 fork)batch import
clang:frontenddiverges-from:edgdiverges-from:gccdiverges-from:msvcgood first issue

Metriche repository

Star
 (26.378 star)
Metriche merge PR
 (Merge medio 1g 2h) (1000 PR mergiate in 30 g)

Descrizione

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.

Guida contributor