Fix handling of -> calls for modernize-use-emplace
Fixes #55869
Differential D142939
Fix handling of -> calls for modernize-use-emplace BigPeet on Jan 30 2023, 3:08 PM. Authored by
Details Fix handling of -> calls for modernize-use-emplace Fixes #55869
Diff Detail
Event TimelineComment Actions This is becoming repetitive, but I guess that's the nature of those things. Maybe something like this would help clean it up, not sure if any better for right now. template <typename T> // Lambda templates would have been nice. auto onTypeOrPointerType(const T &Type) { // onUnderlyingType ? return on(anyOf(hasType(Type), hasType(pointerType(pointee(Type))))); } Comment Actions Refactored the code a little bit to get rid of some repetitions. Should effectively match the same code as the accepted revision.
Comment Actions LGTM
Comment Actions
I will keep this in mind. Or should this be fixed in this revision? Anyway, if this gets merged, my username/mail are GitHub username: BigPeet Thanks for the fast review response!
Comment Actions Pushed, thanks for the contribution! I took the liberty of fixing the std::vector thing before pushing :) |
Generally we use prefer llvm::ArrayRef over const std::vector &