Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google-readability-namespace-comments check does the wrong thing for macro id tokens on closing namespace #26648

Closed
nico opened this issue Jan 23, 2016 · 3 comments
Labels
bugzilla Issues migrated from bugzilla clang-tidy

Comments

@nico
Copy link
Contributor

nico commented Jan 23, 2016

Bugzilla Link 26274
Resolution FIXED
Resolved on Dec 06, 2019 01:12
Version unspecified
OS All
CC @d0k,@mydeveloperday

Extended Description

Consider:

#define MY_NAMESPACE foo

namespace MY_NAMESPACE {
} // namespace MY_NAMESPACE

clang-tidy wants to change the last line to } // namespace foo. It shouldn't. (Fix: If the namespace name is a macro token, check if the macro name matches what's in the closing comment, and don't change that if so.)

https://codereview.chromium.org/1629693002/diff/1/base/containers/hash_tables.h

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 25, 2019

It was fixed in commit:

4736d63

Review can be found here:

https://reviews.llvm.org/D69855

I will close this bug now.

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 3, 2019

Reverted 4736d63, because it introduces false positives. Sent out an alternative fix: https://reviews.llvm.org/D70974

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 6, 2019

The new fix has landed in commit fac4e3c.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang-tidy
Projects
None yet
Development

No branches or pull requests

2 participants