Skip to content

"anonymous namespace" should be "unnamed namespace" in C++ #13533

@BenFrantzDale

Description

@BenFrantzDale

Environment

  • OS and Version: Win & Linux
  • VS Code Version: 1.96.2
  • C/C++ Extension Version: 1.23.6
  • If using SSH remote, specify OS of remote machine:

Bug Summary and Steps to Reproduce

Bug Summary:
In C++, while some people say "anonymous namespace", it's not a thing in the standard. (The only "anonymous" thing I see is unions.) The correct wording is "unnamed namespace" ([namespace.unnamed] in the standard).

Steps to Reproduce:

  1. In a C++ file with an unnamed namespace (namespace foo { int bar() { return 42; } }), put the cursor on bar and note that it says ".../{} (anonymous namespace)" in the breadcrumbs at the top.

Expected behavior:

  1. put the cursor on bar and note that it says ".../{} (unnamednamespace)" in the breadcrumbs at the top. (or possibly ".../{} (unnamed)"?).

While this is a extremely pedantic, there's enough confusing wording in C++, it's best to be consistent.

Moved here from microsoft/vscode#244455

I searched the vscode-cpptools project for "anonymous" but couldn't find where this string comes from :-/

Configuration and Logs

This isn't relevant.

Other Extensions

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServiceVisual StudioInherited from Visual Studiobugmore votes neededIssues that have been postponed until more community members upvote it

    Type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions