[PATCH] D122499: [libTooling] Support TransformerResult<void> in consumer callbacks
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 25 12:47:57 PDT 2022
ymandel accepted this revision.
ymandel added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/include/clang/Tooling/Transformer/Transformer.h:126-128
+template <typename T>
+std::enable_if_t<std::is_void<T>::value, void>
+assertMetadataSet(const transformer::RewriteRuleWith<T> &) {}
----------------
Why won't a simple specialization work?
================
Comment at: clang/include/clang/Tooling/Transformer/Transformer.h:191-193
+ } else {
+ // If we don't have metadata and we don't have any edits, skip.
+ if (std::is_void<T>::value)
----------------
simplify to `else if` ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122499/new/
https://reviews.llvm.org/D122499
More information about the cfe-commits
mailing list