11happy wrote:

**Here's the update for recent commit :**
- Modified the RegisterMatcher to support the `If` statement with brackets by 
adding this ```compoundStmt(has(binaryOperator(
                        hasOperatorName("="), hasLHS(expr().bind("lhsVar2")),
                        hasRHS(expr().bind("rhsVar2")))))``` as AST matchers 
for If statement with brackets looked like this:
                       
![Screenshot from 2024-01-17 
14-08-48](https://github.com/llvm/llvm-project/assets/76656712/8721f3ea-0e23-46e8-b446-06b8e04c95f9)

- Formatted by placing the `CHECK-FIXES` on a new line below `CHECK-MESSAGES`
- Added Test for Macro Functions & If statemnt with brackets
- Changed ```Lexer::getSourceText(
      CharSourceRange::getTokenRange(rhsVar1->getSourceRange()),
      Context.getSourceManager(), Context.getLangOpts())``` to ```
      Lexer::getSourceText(Source.getExpansionRange(lhsVar1->getSourceRange()),
                           Context.getSourceManager(), 
Context.getLangOpts());```
- I have kept the options for `AlgorithmHeader` instead of hardcoding to keep 
modularity also fixed the typo.


 


https://github.com/llvm/llvm-project/pull/77816
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to