sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp:73 if (!Result.getTypePtr()->isDecltypeAuto() && !isStructuredBindingType(Node)) CachedLocation = Result; ---------------- i'd pull out a new function and just write `!isDeducedAsLambda(Node, Result.getLocation())` or so here... ================ Comment at: clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp:87 + // + // In the future, We could re-use this node we found here in apply(), but a + // better approach would be to fix getDeducedType() to not require walking ---------------- This comment makes it sound a bit more committed to fixing this than I feel :-\ I'd maybe limit this to: getDeducedType() does a traversal, which we want to avoid in prepare(). But at least check this isn't `auto x = []{...};`, which can't ever be expanded. (It would be nice if we had an efficient getDeducedType(), instead). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92847/new/ https://reviews.llvm.org/D92847 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits