This revision was automatically updated to reflect the committed changes.
Closed by commit rL290492: [ASTMatchers] Add hasInClassInitializer traversal
matcher for FieldDecl. (authored by malcolm.parsons).
Changed prior to commit:
https://reviews.llvm.org/D28034?vs=82441=82442#toc
Repository:
malcolm.parsons updated this revision to Diff 82441.
malcolm.parsons added a comment.
Improve doc.
https://reviews.llvm.org/D28034
Files:
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Registry.cpp
aaron.ballman accepted this revision.
aaron.ballman added a reviewer: aaron.ballman.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM, modulo the unrelated documentation changes.
https://reviews.llvm.org/D28034
malcolm.parsons added inline comments.
Comment at: docs/LibASTMatchersReference.html:2442
};
-fieldDecl(isBitField())
+fieldDecl(hasBitWidth(2))
matches 'int a;' and 'int c;' but not 'int b;'.
Prazek wrote:
> Fix not connected to patch?
Yes. The
Prazek added inline comments.
Comment at: docs/LibASTMatchersReference.html:2442
};
-fieldDecl(isBitField())
+fieldDecl(hasBitWidth(2))
matches 'int a;' and 'int c;' but not 'int b;'.
Fix not connected to patch?
Comment at:
malcolm.parsons created this revision.
malcolm.parsons added reviewers: sbenza, bkramer, klimek.
malcolm.parsons added a subscriber: cfe-commits.
I needed to know whether a FieldDecl had an in-class
initializer for https://reviews.llvm.org/D26453. I used a narrowing matcher
there, but a