]> granicus.if.org Git - clang/commitdiff
Revert "Don't convert a char to a const char *"
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 24 Feb 2016 22:07:26 +0000 (22:07 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 24 Feb 2016 22:07:26 +0000 (22:07 +0000)
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

lib/Lex/PPDirectives.cpp

index e8a68ad9ec0212efb67704a3ead95198ba8cb7ac..320c16dbec2568250ffd95634fdd91584e5b311a 100644 (file)
@@ -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;