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 12 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
Text = rawComment.Text, Text = rawComment.Text,
}; };
if (rawComment.FullComment != null) if (rawComment.FullCommentBlock != null)
_rawComment.FullComment = commentConverter.Visit(rawComment.FullComment) _rawComment.FullComment = commentConverter.Visit(rawComment.FullCommentBlock)
as AST.FullComment; as AST.FullComment;
return _rawComment; return _rawComment;

2
src/CppParser/AST.cpp

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

2
src/CppParser/AST.h

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

2
src/CppParser/Comments.cpp

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

Loading…
Cancel
Save