Skip to content

IntelliSense errors with Parsing the .pb.h header file generated from the protobuffer proto file #14116

@raholly

Description

@raholly

Environment

  • OS and Version: CentOS7
  • VS Code Version: 1.98.2
  • C/C++ Extension Version: 1.29.3

Bug Summary and Steps to Reproduce

Bug Summary:
Opening the .pb.h header file generated from the .proto file of Protobuf, there is IntelliSense error: this declaration has no storage class or type specifier.

  1. My protobuf version is 3.6.0
  2. The minimal case might look like this:
#include <google/protobuf/port_def.inc>
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/port_def.inc>
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
}  // namespace internal
PROTOBUF_NAMESPACE_CLOSE
  1. Error displayed on macro PROTOBUF_NAMESPACE_OPEN

  2. The attachment here is the header file provided by protobuf
    protobuf-include.zip

Configuration and Logs

{
    "configurations": [
        {
            "name": "Linux",
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "cStandard": "c11",
            "cppStandard": "c++11",
            "intelliSenseMode": "linux-gcc-x64"
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions