llvm::is_contained is shorter than llvm::all_of plus a lambda.
llvm::sort
getSingleElement
hasSingleElement