[PATCH] D29898: [Support] Add format_provider for StringLiteral

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 12:59:51 PST 2017


zturner added inline comments.


================
Comment at: include/llvm/Support/FormatProviders.h:49-50
     : public std::integral_constant<
-          bool, is_one_of<T, llvm::StringRef, std::string>::value ||
+          bool, is_one_of<T, llvm::StringRef, llvm::StringLiteral,
+                          std::string>::value ||
                     is_cstring<T>::value> {};
----------------
dblaikie wrote:
> Perhaps this should use "is_convertible" which would match the implementation (well, not quite - the implementation should probably use "StringRef S = V" rather than StringRef S(V))?
If it works I'm all for simplifying.  Need to be careful with potentially overlapping conditions though.


https://reviews.llvm.org/D29898





More information about the llvm-commits mailing list