Skip to content

[clang-tidy] NOLINT not working in macros in clang-tidy-14 (regression) #55134

Closed
@paulaltin

Description

@paulaltin

Clang-tidy version 13 generates no warnings for this code:

#define CREATE_STRUCT(name)    \
struct name {	/* NOLINT */   \
    int a = 0;                 \
    int b;                     \
}; 				

CREATE_STRUCT(X)
CREATE_STRUCT(Y)
CREATE_STRUCT(Z)

when invoked as:

clang-tidy-13 test.cpp -checks=cppcoreguidelines-pro-type-member-init

Clang-tidy version 14 generates warnings on lines 7-9 when invoked the same way.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions