r173978 - Cast to remove the narrowing conversion error in c++11.
Filipe Cabecinhas
me at filcab.net
Wed Jan 30 13:50:21 PST 2013
Author: filcab
Date: Wed Jan 30 15:50:21 2013
New Revision: 173978
URL: http://llvm.org/viewvc/llvm-project?rev=173978&view=rev
Log:
Cast to remove the narrowing conversion error in c++11.
Modified:
cfe/trunk/lib/Basic/Diagnostic.cpp
Modified: cfe/trunk/lib/Basic/Diagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Diagnostic.cpp?rev=173978&r1=173977&r2=173978&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Diagnostic.cpp (original)
+++ cfe/trunk/lib/Basic/Diagnostic.cpp Wed Jan 30 15:50:21 2013
@@ -744,8 +744,8 @@ FormatDiagnostic(const char *DiagStr, co
const char *Pipe = ScanFormat(Argument, Argument + ArgumentLen, '|');
const char *FirstDollar = ScanFormat(Argument, Pipe, '$');
const char *SecondDollar = ScanFormat(FirstDollar + 1, Pipe, '$');
- const char ArgStr1[] = { '%', '0' + ArgNo };
- const char ArgStr2[] = { '%', '0' + ArgNo2 };
+ const char ArgStr1[] = { '%', (char)('0' + ArgNo) };
+ const char ArgStr2[] = { '%', (char)('0' + ArgNo2) };
FormatDiagnostic(Argument, FirstDollar, OutStr);
FormatDiagnostic(ArgStr1, ArgStr1 + 2, OutStr);
FormatDiagnostic(FirstDollar + 1, SecondDollar, OutStr);
More information about the cfe-commits
mailing list