Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template not detected inside InitializerListExpression #1821

Open
peckto opened this issue Nov 6, 2024 · 0 comments
Open

Template not detected inside InitializerListExpression #1821

peckto opened this issue Nov 6, 2024 · 0 comments
Assignees
Labels
cxx Related to C/C++ language parsing

Comments

@peckto
Copy link
Collaborator

peckto commented Nov 6, 2024

Given the following C++ code:

#include <memory>

struct A {
    int i;
    A(int i) {
        this->i = i;
    }
};

int main() {
    std::unique_ptr<A> ptr{
          std::make_unique<A>(1)
    };
    return 0;
}

The InitializerListExpression std::make_unique<A>(1) is not parsed correctly and the template ends up as a BinaryOperator:
Image

@peckto peckto added the cxx Related to C/C++ language parsing label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cxx Related to C/C++ language parsing
Projects
None yet
Development

No branches or pull requests

1 participant