forked from OSchip/llvm-project
Fix two bugs that fell out from a testcase steve noticed. for this testcase:
extern int pintFunc(int *, int *); int test() { pintFunc(0, 3); } We now print: t3.c:4:13: warning: passing argument 2 makes pointer from integer without a cast pintFunc(0, ~~~~~~~~ ^ instead of: t3.c:4:13: warning: passing argument 2 makes pointer from integer without a cast pintFunc(0, ~~~~~~~~ llvm-svn: 39516
This commit is contained in:
parent
86272ea1fe
commit
e64a1b5275
|
@ -546,10 +546,10 @@ void DiagnosticPrinterSTDERR::HandleDiagnostic(Diagnostic::Level Level,
|
|||
HighlightRange(Ranges[i], LineNo, CaratLine, SourceLine);
|
||||
|
||||
// Next, insert the carat itself.
|
||||
if (ColNo < CaratLine.size())
|
||||
if (ColNo-1 < CaratLine.size())
|
||||
CaratLine[ColNo-1] = '^';
|
||||
else
|
||||
CaratLine.push_back(ColNo);
|
||||
CaratLine.push_back('^');
|
||||
|
||||
// Scan the source line, looking for tabs. If we find any, manually expand
|
||||
// them to 8 characters and update the CaratLine to match.
|
||||
|
|
Loading…
Reference in New Issue