Ericsson / clang

Cross Translation Unit analysis capability for Clang Static Analyzer. (Fork of official clang at http://llvm.org/git/clang)
http://clang.llvm.org/
Other
15 stars 10 forks source link

Incorrect warnings about incompatible definition at protobuf analysis. #521

Closed balazske closed 5 years ago

balazske commented 5 years ago

When analyzing the protobuf source code many similar warnings are printed:

In file included from clang/testproject/protobuf/src/google/protobuf/message.h:122:
clang/testproject/protobuf/src/google/protobuf/descriptor.h:450:20: error: field 'oneof_decls_' declared with incompatible types in different translation units ('google::protobuf::OneofDescriptor *' vs. 'google::protobuf::OneofDescriptor *')
  OneofDescriptor* oneof_decls_;
                   ^
clang/testproject/protobuf/src/google/protobuf/descriptor.h:450:20: note: declared here with type 'google::protobuf::OneofDescriptor *'
  OneofDescriptor* oneof_decls_;

These are obviously not correct and should be eliminated.