From f4ea6039698a9d07cf88bc959e79a83b05de5a82 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Wed, 24 Feb 2016 21:55:58 +0000 Subject: [PATCH] Don't convert a char to a const char * This fixes PR26728. llvm-svn: 261780 --- clang/lib/Lex/PPDirectives.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 320c16d..e8a68ad 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/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; -- 2.7.4