PiotrZSL accepted this revision.
PiotrZSL added a comment.

Consider delivering this check. I do not think that it will become much better 
with more refactoring.



================
Comment at: clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp:202-203
+  assert(FormatExpr);
+  if (!FormatExpr->isOrdinary())
+    return; // No wide string support yet
+  PrintfFormatString = FormatExpr->getString();
----------------
this check for isOrdinary could be done on matcher level, just add anonymous 
matcher, and use it there, you can still use it also here, but my idea is to 
reduce amount of calls to check method.
```
AST_MATCHER(StringLiteral, isOrdinary) {
  return Node.isOrdinary();
}
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149280/new/

https://reviews.llvm.org/D149280

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to