llvm/llvm-project

auto allowed with a type in C++

Open

#164.273 aberto em 20 de out. de 2025

Ver no GitHub
 (10 comments) (0 reactions) (1 assignee)C++ (10.782 forks)batch import
clang:frontenddiverges-from:edgdiverges-from:gccdiverges-from:msvcgood first issue

Métricas do repositório

Stars
 (26.378 stars)
Métricas de merge de PR
 (Mesclagem média 1d 2h) (1.000 fundiu PRs em 30d)

Description

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.

Guia do colaborador