Skip to content

Rename shadowed variables #13037

@4kangjc

Description

@4kangjc

What version of protobuf and what language are you using?
Version: main
Language: C++

What operating system (Linux, Windows, ...) and version?
MacOS

What runtime / compiler are you using (e.g., python version or gcc version)

# Compile failed
$ bazel build --copt='-Wshadow-all' :protoc :protobuf
$ clang --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

What did you expect to see
Shadowed variables can cause readability issues. Ensure a shadowed
variable isn't used in header files which may be used in a dependent
project that explicitly disables them.
bazel build --copt='-Wshadow-all' :protoc :protobuf executed successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions