Skip to content

Unknown type attributes are diagnosed twice with [[]] spelling #54817

@AaronBallman

Description

@AaronBallman

Consider:

void func(void) {
  int [[attr]] i;
  (void)sizeof(int [[attr]]);
}

This generates four diagnostics, two for each unknown attribute. See https://godbolt.org/z/r6eGx1W6E for an example. The same does not happen for declaration attributes or statement attributes, and it does not happen for unknown type attributes spelled with __attribute__.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++11c23clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partygood first issuehttps://github.com/llvm/llvm-project/contribute

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions