forked from OSchip/llvm-project
Resolve lint warning about converting unsigned to signed (NFC)
FileOffset is unsigned while getLocWithOffset() requires a signed value.
This commit is contained in:
parent
7347c28def
commit
86618e37bd
|
@ -193,7 +193,8 @@ DiagnosticBuilder ClangTidyContext::diag(const ClangTidyError &Error) {
|
|||
SM.getFileManager().getFile(Error.Message.FilePath);
|
||||
FileID ID = SM.getOrCreateFileID(*File, SrcMgr::C_User);
|
||||
SourceLocation FileStartLoc = SM.getLocForStartOfFile(ID);
|
||||
SourceLocation Loc = FileStartLoc.getLocWithOffset(Error.Message.FileOffset);
|
||||
SourceLocation Loc = FileStartLoc.getLocWithOffset(
|
||||
static_cast<SourceLocation::IntTy>(Error.Message.FileOffset));
|
||||
return diag(Error.DiagnosticName, Loc, Error.Message.Message,
|
||||
static_cast<DiagnosticIDs::Level>(Error.DiagLevel));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue