Skip to content

[Regression] Clang accepts a syntactically invalid use of uniform_int_distribution<>(1, ); #136254

@GINN-Imp

Description

@GINN-Imp

Clang-trunk accepts the following code without producing any syntax error.
https://godbolt.org/z/dnW5oWY84

#include <bits/stdc++.h>
using namespace std;
int a() { 
    uniform_int_distribution<>(1, ); 
    return 0;
}

Expected (Clang 19):

<source>:4:35: error: expected expression
    4 |     uniform_int_distribution<>(1, ); 
      |                                   ^
1 error generated.
ASM generation compiler returned: 1

bisect to 925e195

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"regression:20Regression in 20 release

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions