forked from qt-creator/qt-creator
ClangBackEnd: Convert Windows line endings in Cursor::rawComment()
The comment really is "raw" in that clang does not convert \r\n, so we have to do that ourselves. This fixes another unit test case on Windows. Change-Id: If70678485ed31c241a04fc44b3502e1ff3252508 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -246,9 +246,11 @@ ClangString Cursor::briefComment() const
|
|||||||
return ClangString(clang_Cursor_getBriefCommentText(m_cxCursor));
|
return ClangString(clang_Cursor_getBriefCommentText(m_cxCursor));
|
||||||
}
|
}
|
||||||
|
|
||||||
ClangString Cursor::rawComment() const
|
Utf8String Cursor::rawComment() const
|
||||||
{
|
{
|
||||||
return ClangString(clang_Cursor_getRawCommentText(m_cxCursor));
|
Utf8String comment = ClangString(clang_Cursor_getRawCommentText(m_cxCursor));
|
||||||
|
comment.replace(Utf8String("\r\n"), Utf8String("\n"));
|
||||||
|
return comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Cursor::argumentCount() const
|
int Cursor::argumentCount() const
|
||||||
|
@@ -79,7 +79,7 @@ public:
|
|||||||
ClangString mangling() const;
|
ClangString mangling() const;
|
||||||
ClangString spelling() const;
|
ClangString spelling() const;
|
||||||
ClangString briefComment() const;
|
ClangString briefComment() const;
|
||||||
ClangString rawComment() const;
|
Utf8String rawComment() const;
|
||||||
int argumentCount() const;
|
int argumentCount() const;
|
||||||
|
|
||||||
Type type() const;
|
Type type() const;
|
||||||
|
Reference in New Issue
Block a user