Skip to content

-Wattributes warnings with clang::Sema #125552

Open
@firewave

Description

@firewave
In file included from /home/user/CLionProjects/llvm-project/clang/include/clang/Parse/Parser.h:20,
                 from /home/user/CLionProjects/llvm-project/clang/lib/Parse/ParseExpr.cpp:29:
/home/user/CLionProjects/llvm-project/clang/include/clang/Sema/Sema.h:466:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::UnusedFileScopedDecls’ [-Wattributes]
  466 | class Sema final : public SemaBase {
      |       ^~~~
/home/user/CLionProjects/llvm-project/clang/include/clang/Sema/Sema.h:466:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::TentativeDefinitions’ [-Wattributes]
/home/user/CLionProjects/llvm-project/clang/include/clang/Sema/Sema.h:466:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::ExtVectorDecls’ [-Wattributes]
/home/user/CLionProjects/llvm-project/clang/include/clang/Sema/Sema.h:466:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::DelegatingCtorDecls’ [-Wattributes]

Also occurs from many other source files.

I am using gcc (GCC) 14.2.1 20240910 on Manjaro Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"code-quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions