From: David Majnemer Date: Wed, 24 Feb 2016 22:07:26 +0000 (+0000) Subject: Revert "Don't convert a char to a const char *" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=513b8a7c022674464acfb63affaace7b8d9ddb63;p=clang Revert "Don't convert a char to a const char *" This reverts commit r261780. It turns out the original code was just fine. An overload for ltrim which takes char was added but the Doxygen docs haven't seemed to pick it up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261784 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index e8a68ad9ec..320c16dbec 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -1226,7 +1226,7 @@ void Preprocessor::HandleUserDiagnosticDirective(Token &Tok, // Find the first non-whitespace character, so that we can make the // diagnostic more succinct. - StringRef Msg = StringRef(Message).ltrim(" "); + StringRef Msg = StringRef(Message).ltrim(' '); if (isWarning) Diag(Tok, diag::pp_hash_warning) << Msg;