[clang] [NFC] Fix hasQualifier comment (PR #90485)

via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 29 08:34:42 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Jorge Pinto Sousa (sousajo-cc)

<details>
<summary>Changes</summary>

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
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

``````````

</details>


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


More information about the cfe-commits mailing list