microsoft / microsoft/vscode-cpptools
"anonymous namespace" should be "unnamed namespace" in C++
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
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:
- 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:
- 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 https://github.com/microsoft/vscode/issues/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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the breadcrumb wording in a C++ file containing an unnamed namespace, then trace the C/C++ extension's breadcrumb or symbol-display entry point. Search the extension and its dependencies for the displayed label, since the issue reports that a repository search for "anonymous" found nothing. Done means the breadcrumb uses the standard term "unnamed namespace" or an agreed shorter form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100