etienneb added a comment.
In http://reviews.llvm.org/D19871#429466, @Prazek wrote:
> +1 I will probably also use this.
>
> Does hasCastKind works for implicitCastExpr?
Yes, there is a unittest with the code.
http://reviews.llvm.org/D19871
___
cfe
jroelofs added a comment.
In http://reviews.llvm.org/D19871#429153, @etienneb wrote:
> In http://reviews.llvm.org/D19871#428997, @jroelofs wrote:
>
> > Drive-by thought: I think it would be useful to be able to match implicit
> > casts separately from explicit casts when using this new matcher.
Prazek added a subscriber: Prazek.
Prazek added a comment.
+1 I will probably also use this.
Does hasCastKind works for implicitCastExpr?
http://reviews.llvm.org/D19871
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/c
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM! Thank you for this!
http://reviews.llvm.org/D19871
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.
etienneb updated this revision to Diff 57124.
etienneb added a comment.
nit: indentation
http://reviews.llvm.org/D19871
Files:
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Marshallers.h
lib/ASTMatchers/Dynamic/Registry.cpp
unittests
etienneb added a comment.
In http://reviews.llvm.org/D19871#428997, @jroelofs wrote:
> Drive-by thought: I think it would be useful to be able to match implicit
> casts separately from explicit casts when using this new matcher.
Jonathan, I think what you are asking for is already supported.
I
etienneb updated this revision to Diff 57123.
etienneb added a comment.
add unittest
http://reviews.llvm.org/D19871
Files:
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Marshallers.h
lib/ASTMatchers/Dynamic/Registry.cpp
unittests/AST
jroelofs added a subscriber: jroelofs.
jroelofs added a comment.
Drive-by thought: I think it would be useful to be able to match implicit casts
separately from explicit casts when using this new matcher.
http://reviews.llvm.org/D19871
___
cfe-comm
etienneb updated this revision to Diff 57101.
etienneb marked an inline comment as done.
etienneb added a comment.
regenerate doc
http://reviews.llvm.org/D19871
Files:
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Marshallers.h
lib/AST
etienneb marked 3 inline comments as done.
etienneb added a comment.
This patch has been modified to support dynamic matchers.
It rely on : http://reviews.llvm.org/D20207
Comments?
Comment at: lib/ASTMatchers/Dynamic/Marshallers.h:102
@@ +101,3 @@
+ static clang::CastKind getC
etienneb updated this revision to Diff 57044.
etienneb marked an inline comment as done.
etienneb added a comment.
rebase over AST modifications
http://reviews.llvm.org/D19871
Files:
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Marshallers.h
lib/ASTMatchers/Dynamic/Regi
sbenza added inline comments.
Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:78
@@ -77,2 +77,3 @@
// Need Variant/Parser fixes:
+ // hasCastKind
// ofKind
Is it registered or not?
You add this comment, but also add the matcher in the registry below.
h
On Wed, May 4, 2016 at 6:58 PM, Etienne Bergeron wrote:
> etienneb added inline comments.
>
>
> Comment at: lib/ASTMatchers/Dynamic/Marshallers.h:102
> @@ +101,3 @@
> + static clang::CastKind getCastKind(llvm::StringRef AttrKind) {
> +return llvm::StringSwitch(AttrKind)
> +
etienneb added a comment.
Get back to this solution.
comments?
http://reviews.llvm.org/D19871
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
etienneb updated this revision to Diff 56428.
etienneb added a comment.
fix unittests
http://reviews.llvm.org/D19871
Files:
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Registry.cpp
unittests/ASTMatchers/ASTMatchersTest.cpp
Index: un
etienneb updated this revision to Diff 56427.
etienneb added a comment.
revert to previous solution
http://reviews.llvm.org/D19871
Files:
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Registry.cpp
unittests/ASTMatchers/ASTMatchersTest.cpp
Index: unittests/ASTMatchers/AS
sbenza added inline comments.
Comment at: lib/ASTMatchers/Dynamic/Marshallers.h:102
@@ +101,3 @@
+ static clang::CastKind getCastKind(llvm::StringRef AttrKind) {
+return llvm::StringSwitch(AttrKind)
+ .Case("CK_Dependent", CK_Dependent)
etienneb wrote:
>
etienneb added inline comments.
Comment at: lib/ASTMatchers/Dynamic/Marshallers.h:102
@@ +101,3 @@
+ static clang::CastKind getCastKind(llvm::StringRef AttrKind) {
+return llvm::StringSwitch(AttrKind)
+ .Case("CK_Dependent", CK_Dependent)
aaron.ballman w
aaron.ballman added inline comments.
Comment at: lib/ASTMatchers/Dynamic/Marshallers.h:102
@@ +101,3 @@
+ static clang::CastKind getCastKind(llvm::StringRef AttrKind) {
+return llvm::StringSwitch(AttrKind)
+ .Case("CK_Dependent", CK_Dependent)
This might
sbenza added a comment.
> > So even if the above solution is working, we still need to call it that way
> > (as a string):
>
> > clang-query> match castExpr(hasCastKind("CK_Dependent"))
>
>
> Correct, that's expected behavior for clang-query (though I would love if
> someday we could
etienneb updated this revision to Diff 56023.
etienneb added a comment.
nit
http://reviews.llvm.org/D19871
Files:
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Marshallers.h
lib/ASTMatchers/Dynamic/Registry.cpp
unittests/ASTMatchers/
etienneb updated this revision to Diff 56022.
etienneb added a comment.
add dynamic parsing
http://reviews.llvm.org/D19871
Files:
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Marshallers.h
lib/ASTMatchers/Dynamic/Registry.cpp
unitte
etienneb added a comment.
> though I would love if someday we could expose actual enumerations somehow
> instead of string literals
I would like too. Ditto for "equals" which is missing :)
http://reviews.llvm.org/D19871
___
cfe-commits mailing li
aaron.ballman added a comment.
In http://reviews.llvm.org/D19871#420095, @etienneb wrote:
> > I agree that when possible, matchers should be available via the dynamic
> > matchers API. It doesn't seem overly complicated to add this support here.
> > As far as I understand, we just need to regis
etienneb added a comment.
> I agree that when possible, matchers should be available via the dynamic
> matchers API. It doesn't seem overly complicated to add this support here. As
> far as I understand, we just need to register the matcher in
> lib/ASTMatchers/Dynamic/Registry.cpp and add su
alexfh added a comment.
In http://reviews.llvm.org/D19871#419947, @aaron.ballman wrote:
> Is this required for some purpose?
>
> I'm not keen on adding new AST matchers that we cannot expose via the dynamic
> API, so I would prefer to solve that problem if we want to add this matcher.
I agree
etienneb added a comment.
> It's good to have that context in a review for functionality that isn't part
> of the proposed patch. :-) Looking at the other patch, I would prefer to keep
> this matcher narrowed to just clang-tidy unless you can also solve how to
> expose it via the dynamic regist
sbenza added a comment.
In http://reviews.llvm.org/D19871#419985, @aaron.ballman wrote:
> In http://reviews.llvm.org/D19871#419954, @etienneb wrote:
>
> > In http://reviews.llvm.org/D19871#419947, @aaron.ballman wrote:
> >
> > > Is this required for some purpose?
> >
> >
> > It's used in clang-ti
aaron.ballman added a comment.
In http://reviews.llvm.org/D19871#419954, @etienneb wrote:
> In http://reviews.llvm.org/D19871#419947, @aaron.ballman wrote:
>
> > Is this required for some purpose?
>
>
> It's used in clang-tidy checkers.
>
> see http://reviews.llvm.org/D19841
It's good to have
etienneb added a comment.
In http://reviews.llvm.org/D19871#419947, @aaron.ballman wrote:
> Is this required for some purpose?
It's used in clang-tidy checkers.
see http://reviews.llvm.org/D19841
> I'm not keen on adding new AST matchers that we cannot expose via the dynamic
> API, so
aaron.ballman added a subscriber: aaron.ballman.
aaron.ballman added a reviewer: aaron.ballman.
aaron.ballman added a comment.
Is this required for some purpose?
I'm not keen on adding new AST matchers that we cannot expose via the dynamic
API, so I would prefer to solve that problem if we want
etienneb created this revision.
etienneb added reviewers: alexfh, sbenza, klimek.
etienneb added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
This AST matcher will match a given CastExpr kind.
It's an narrowing matcher on CastExpr.
http://reviews.llvm.org/D19871
Files:
include
32 matches
Mail list logo