Skip to content

[C++20][Modules][clang-format] Incorrect format for export import </> #57798

@kilasuelika

Description

@kilasuelika

I'm using clang-format 15. Recently I find that if I write

export import <Eigen/Core>;

Then clang-format will incorrectly convert it to

export import <Eigen / Core>;

Extrac space will trigger compilation error. If I only use import <Eigen/Core>; then it will be OK.

Full code will be:

export module MyLib;

import std.core;
using namespace std;

export import <Eigen/Core>;

Metadata

Metadata

Assignees

Labels

clang-formatinvalid-code-generationTool (e.g. clang-format) produced invalid code that no longer compiles

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions