Status: New
Labels: Type-Defect Priority-Medium

New issue 650 by Clang barks at file->options() != NULL

With the ToT Clang the following warning is reported when I'm trying to build Chromium:

../../third_party/protobuf/src/google/protobuf/ -o obj/third_party/protobuf/src/google/protobuf/protobuf_full_do_not_use.descriptor.o ../../third_party/protobuf/src/google/protobuf/ error: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Werror,-Wtautological-undefined-compare]
         &file->options() != NULL &&
          ^~~~~~~~~~~~~~~    ~~~~
../../third_party/protobuf/src/google/protobuf/descriptor.h:1410:1: note: 'options' returns a reference
../../third_party/protobuf/src/google/protobuf/descriptor.h:1320:29: note: expanded from macro 'PROTOBUF_DEFINE_OPTIONS_ACCESSOR'
  inline const TYPE& CLASS::options() const { return *options_; }
1 error generated.

This line is still present in the upstream protobuf:

You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to