Skip to content
Snippets Groups Projects
  • Gabor Horvath's avatar
    0820d774
    [ASTMatchers] New matcher forFunction · 0820d774
    Gabor Horvath authored
    Summary: 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 second one always chooses one single parent while the first 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?
    
    Reviewers: sbenza
    
    Subscribers: aaron.ballman, klimek, o.gyorgy, xazax.hun, cfe-commits
    
    Differential Revision: http://reviews.llvm.org/D19357
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268490 91177308-0d34-0410-b5e6-96231b3b80d8
    0820d774
    History
    [ASTMatchers] New matcher forFunction
    Gabor Horvath authored
    Summary: 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 second one always chooses one single parent while the first 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?
    
    Reviewers: sbenza
    
    Subscribers: aaron.ballman, klimek, o.gyorgy, xazax.hun, cfe-commits
    
    Differential Revision: http://reviews.llvm.org/D19357
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268490 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.