Browse Source

CppParser: fix warning about FullComment

Fix the following warning by renaming RawComment::FullComment to
FullCommentBlock.

In file included from ../../../src/CppParser/AST.cpp:8:0:
../../../src/CppParser/AST.h:783:18: warning: declaration of ‘CppSharp::CppParser::AST::FullComment* CppSharp::CppParser::AST::RawComment::FullComment’ [-fpermissive]
     FullComment* FullComment;
                  ^
../../../src/CppParser/AST.h:760:15: warning: changes meaning of ‘FullComment’ from ‘struct CppSharp::CppParser::AST::FullComment’ [-fpermissive]
 struct CS_API FullComment : public Comment
               ^

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
pull/262/head
Tomi Valkeinen 11 years ago
parent
commit
d843ac1fd3
  1. 4
      src/Core/Parser/ASTConverter.cs
  2. 2
      src/CppParser/AST.cpp
  3. 2
      src/CppParser/AST.h
  4. 2
      src/CppParser/Comments.cpp

4
src/Core/Parser/ASTConverter.cs

@ -662,8 +662,8 @@ namespace CppSharp @@ -662,8 +662,8 @@ namespace CppSharp
Text = rawComment.Text,
};
if (rawComment.FullComment != null)
_rawComment.FullComment = commentConverter.Visit(rawComment.FullComment)
if (rawComment.FullCommentBlock != null)
_rawComment.FullComment = commentConverter.Visit(rawComment.FullCommentBlock)
as AST.FullComment;
return _rawComment;

2
src/CppParser/AST.cpp

@ -626,7 +626,7 @@ Comment::Comment(CommentKind kind) : Kind(kind) {} @@ -626,7 +626,7 @@ Comment::Comment(CommentKind kind) : Kind(kind) {}
DEF_STRING(RawComment, Text)
DEF_STRING(RawComment, BriefText)
RawComment::RawComment() : FullComment(0) {}
RawComment::RawComment() : FullCommentBlock(0) {}
FullComment::FullComment() : Comment(CommentKind::FullComment) {}

2
src/CppParser/AST.h

@ -780,7 +780,7 @@ struct CS_API RawComment @@ -780,7 +780,7 @@ struct CS_API RawComment
RawCommentKind Kind;
STRING(Text)
STRING(BriefText)
FullComment* FullComment;
FullComment* FullCommentBlock;
};
#pragma region Commands

2
src/CppParser/Comments.cpp

@ -264,6 +264,6 @@ void Parser::HandleComments(clang::Decl* D, Declaration* Decl) @@ -264,6 +264,6 @@ void Parser::HandleComments(clang::Decl* D, Declaration* Decl)
if (clang::comments::FullComment* FC = RC->parse(*AST, &C->getPreprocessor(), D))
{
auto CB = static_cast<FullComment*>(ConvertCommentBlock(FC));
RawComment->FullComment = CB;
RawComment->FullCommentBlock = CB;
}
}

Loading…
Cancel
Save