<div dir="ltr"><div><div>Hi,<br><br></div>I am currently writing a new refactoring action rule under this bug:<br><br><a href="https://bugs.llvm.org/show_bug.cgi?id=35000">https://bugs.llvm.org/show_bug.cgi?id=35000</a> <br><br></div>The idea is to write a new refactor action for clang-refactor that can convert a ternary operator into an if statement. <br><div><div><br>I have used LLVM and Clang before but this is my first time writing a small feature for the actual code base, so I have a few questions :<br><br></div><div>1. What does the function SourceChangeRefactoringRule::initiate does? I can't find documentation that talks about it</div><div>2. How can I traverse through the whole file to find the ternary operators? Where should this traversal take place, or do the APIs already take care of it. I looked up AST matchers and I am confused as to how it can be incorporated into the refactoring action. </div><div><br></div><div>Thanks!</div><div>Brenda<br></div></div></div>