aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM aside from a minor nit.



================
Comment at: clang/lib/AST/Decl.cpp:2130
+  // the pretty-printed name of the capture instead.
+  if (isa<FieldDecl>(DD) &&
+      maybePrintFieldForLambdaCapture(OS, Policy, cast<FieldDecl>(DD)))
----------------
Rather than `isa<>` followed by a `cast<>`, how about:
```
if (const auto *FD = dyn_cast<FieldDecl>(DD)) {
  if (maybePrintFieldForLambdaCapture(...)
    return;
}
```
Alternatively, you could sink the `dyn_cast<>` down into 
`maybePrintFieldForLambdaCapture()` since that already has to handle case where 
it's not printing a field capture.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85033

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

Reply via email to