[PATCH] D19357: [ASTMatchers] New matcher forFunction

Balogh, Ádám via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 21 02:47:51 PDT 2016

baloghadamsoftware created this revision.
baloghadamsoftware added a reviewer: sbenza.
baloghadamsoftware added subscribers: cfe-commits, xazax.hun, o.gyorgy.
Herald added a subscriber: klimek.

Matcher proposed in the review of checker misc-assign-operator (name pending). Its goal is to find the direct enclosing function declaration of a statement and run the inner matcher on it. Two version is attached in this patch (thus it will not compile), to be decided which approach to take. The first one always chooses one single parent, the other one does a depth-first search upwards (thus a height-first search) and returns the first positive match of the inner matcher (thus it always returns zero or one matches, not more). Further questions: is it enough to implement it in-place, or ASTMatchersInternals or maybe ASTMatchFinder should be involved?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19357.54475.patch
Type: text/x-patch
Size: 4299 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160421/d9de9c53/attachment-0001.bin>

More information about the cfe-commits mailing list