Skip to content

[NFC] Fix hasQualifier comment #90485

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

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

sousajo-cc
Copy link
Contributor

@sousajo-cc sousajo-cc commented Apr 29, 2024

operator bool from NestedNameSpecifierLoc and
member function hasQualifier both do the same thing, returning true iff the private data member Qualifier is not nullptr, so clearly one of the comments is wrong, and in this case it is the second one.

fixes #90472

operator bool from NestedNameSpecifierLoc and
member function hasQualifier both do the same thing,
returning true iff the private data member Qualifier
is not nullptr, so clearly one of the comments is wrong,
and in this case it is the second one.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Apr 29, 2024
@llvmbot
Copy link
Member

llvmbot commented Apr 29, 2024

@llvm/pr-subscribers-clang

Author: Jorge Pinto Sousa (sousajo-cc)

Changes

operator bool from NestedNameSpecifierLoc and
member function hasQualifier both do the same thing, returning true iff the private data member Qualifier is not nullptr, so clearly one of the comments is wrong, and in this case it is the second one.


Full diff: https://github.com/llvm/llvm-project/pull/90485.diff

1 Files Affected:

  • (modified) clang/include/clang/AST/NestedNameSpecifier.h (+1-1)
diff --git a/clang/include/clang/AST/NestedNameSpecifier.h b/clang/include/clang/AST/NestedNameSpecifier.h
index 3b6cf972118509..b4ccfa710e5166 100644
--- a/clang/include/clang/AST/NestedNameSpecifier.h
+++ b/clang/include/clang/AST/NestedNameSpecifier.h
@@ -266,7 +266,7 @@ class NestedNameSpecifierLoc {
   explicit operator bool() const { return Qualifier; }
 
   /// Evaluates true when this nested-name-specifier location is
-  /// empty.
+  /// non-empty.
   bool hasQualifier() const { return Qualifier; }
 
   /// Retrieve the nested-name-specifier to which this instance

@sousajo-cc
Copy link
Contributor Author

fixes #90472

Copy link
Collaborator

@shafik shafik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for the documentation fix.

@cor3ntin cor3ntin merged commit e5907c8 into llvm:main Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation for NestedNameSpecifierLoc::hasQualifier says "is empty", should say "is non-empty"
4 participants