forked from qt-creator/qt-creator
Clang: Cleanup more PrintTo functions
Change-Id: If1389462479ae10b067904f05cf785c3d8fb9638 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -114,15 +114,17 @@ SourceLocation::operator CXSourceLocation() const
|
||||
return cxSourceLocation;
|
||||
}
|
||||
|
||||
void PrintTo(const SourceLocation &sourceLocation, std::ostream *os)
|
||||
std::ostream &operator<<(std::ostream &os, const SourceLocation &sourceLocation)
|
||||
{
|
||||
auto filePath = sourceLocation.filePath();
|
||||
if (filePath.hasContent())
|
||||
*os << filePath.constData() << ", ";
|
||||
os << filePath << ", ";
|
||||
|
||||
*os << "line: " << sourceLocation.line()
|
||||
<< ", column: "<< sourceLocation.column()
|
||||
<< ", offset: "<< sourceLocation.offset();
|
||||
os << "line: " << sourceLocation.line()
|
||||
<< ", column: "<< sourceLocation.column()
|
||||
<< ", offset: "<< sourceLocation.offset();
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Reference in New Issue
Block a user