[PATCH] D61552: [clang] Adapt ASTMatcher to explicit(bool) specifier

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 19 09:10:19 PDT 2019


aaron.ballman added inline comments.


================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6190
+/// cxxDeductionGuideDecl(isExplicit()) will match #6, but not #5.
+/// cxxConstructorDecl(isExplicit()) will match #8, but not #7 or #9.
+AST_POLYMORPHIC_MATCHER(isExplicit, AST_POLYMORPHIC_SUPPORTED_TYPES(
----------------
Tyker wrote:
> aaron.ballman wrote:
> > Tyker wrote:
> > > aaron.ballman wrote:
> > > > Why won't it match #2?
> > > #2 matches.
> > I figured it would -- the comment should be updated to correct that (and then generate the docs again).
> but the comment says it matches
> 
> > cxxConstructorDecl(isExplicit()) will match #2, but not #1.
> 
> 
Because this comment says it doesn't:
```
/// cxxConstructorDecl(isExplicit()) will match #8, but not #7 or #9.
```
I see now that there are two different comments that say different and incorrect things. I'd say they should be combined into one correct comment.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61552/new/

https://reviews.llvm.org/D61552





More information about the cfe-commits mailing list