Skip to content

clang-tidy: modernize-use-using fails when type is implicitly forward declared #67529

Closed
@ThomasHuetsch

Description

@ThomasHuetsch

clang-tidy check modernize-use-using (LLVM 17.0.1 and before) fails to convert typedef to a type alias when the type is implicitly forward declared. The new type alias (BPtr) is an alias for the class itself and not a pointer to the class.

Before

class A;
typedef A* APtr; // OK
typedef class A* APtr2; // OK

typedef class B* BPtr; // * missing

After

class A;
using APtr = A *; // OK
using APtr2 = class A *; // OK

using BPtr = class B; // * missing

Should be

class A;
using APtr = A *; // OK
using APtr2 = class A *; // OK

using BPtr = class B *; // * missing

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorclang-tidy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions