From: Dmitri Gribenko Date: Fri, 31 Aug 2012 10:35:30 +0000 (+0000) Subject: Remove the useless CommentOptions class. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af503a6f218cbef8704609812668360b0cbd0b60;p=clang Remove the useless CommentOptions class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162986 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/CommentLexer.h b/include/clang/AST/CommentLexer.h index 97e0d9674e..e72052191d 100644 --- a/include/clang/AST/CommentLexer.h +++ b/include/clang/AST/CommentLexer.h @@ -49,11 +49,6 @@ enum TokenKind { }; } // end namespace tok -class CommentOptions { -public: - bool Markdown; -}; - /// \brief Comment token. class Token { friend class Lexer; @@ -221,7 +216,6 @@ private: const char *const BufferStart; const char *const BufferEnd; SourceLocation FileLoc; - CommentOptions CommOpts; const char *BufferPtr; @@ -336,7 +330,7 @@ private: public: Lexer(llvm::BumpPtrAllocator &Allocator, const CommandTraits &Traits, - SourceLocation FileLoc, const CommentOptions &CommOpts, + SourceLocation FileLoc, const char *BufferStart, const char *BufferEnd); void lex(Token &T); diff --git a/lib/AST/CommentLexer.cpp b/lib/AST/CommentLexer.cpp index eb0ac2472a..53440c169f 100644 --- a/lib/AST/CommentLexer.cpp +++ b/lib/AST/CommentLexer.cpp @@ -695,11 +695,11 @@ void Lexer::lexHTMLEndTag(Token &T) { } Lexer::Lexer(llvm::BumpPtrAllocator &Allocator, const CommandTraits &Traits, - SourceLocation FileLoc, const CommentOptions &CommOpts, + SourceLocation FileLoc, const char *BufferStart, const char *BufferEnd): Allocator(Allocator), Traits(Traits), BufferStart(BufferStart), BufferEnd(BufferEnd), - FileLoc(FileLoc), CommOpts(CommOpts), BufferPtr(BufferStart), + FileLoc(FileLoc), BufferPtr(BufferStart), CommentState(LCS_BeforeComment), State(LS_Normal) { } diff --git a/lib/AST/RawCommentList.cpp b/lib/AST/RawCommentList.cpp index d75d49aff0..1003140849 100644 --- a/lib/AST/RawCommentList.cpp +++ b/lib/AST/RawCommentList.cpp @@ -144,8 +144,7 @@ const char *RawComment::extractBriefText(const ASTContext &Context) const { llvm::BumpPtrAllocator Allocator; comments::CommandTraits Traits; - comments::Lexer L(Allocator, Traits, - Range.getBegin(), comments::CommentOptions(), + comments::Lexer L(Allocator, Traits, Range.getBegin(), RawText.begin(), RawText.end()); comments::BriefParser P(L, Traits); @@ -166,7 +165,7 @@ comments::FullComment *RawComment::parse(const ASTContext &Context, comments::CommandTraits Traits; comments::Lexer L(Context.getAllocator(), Traits, - getSourceRange().getBegin(), comments::CommentOptions(), + getSourceRange().getBegin(), RawText.begin(), RawText.end()); comments::Sema S(Context.getAllocator(), Context.getSourceManager(), Context.getDiagnostics(), Traits); diff --git a/unittests/AST/CommentLexer.cpp b/unittests/AST/CommentLexer.cpp index 1168d1d143..b7bc078392 100644 --- a/unittests/AST/CommentLexer.cpp +++ b/unittests/AST/CommentLexer.cpp @@ -50,7 +50,7 @@ void CommentLexerTest::lexString(const char *Source, SourceLocation Begin = SourceMgr.getLocForStartOfFile(File); comments::CommandTraits Traits; - comments::Lexer L(Allocator, Traits, Begin, CommentOptions(), + comments::Lexer L(Allocator, Traits, Begin, Source, Source + strlen(Source)); while (1) { diff --git a/unittests/AST/CommentParser.cpp b/unittests/AST/CommentParser.cpp index 7258a7ef57..f04cf197b6 100644 --- a/unittests/AST/CommentParser.cpp +++ b/unittests/AST/CommentParser.cpp @@ -56,7 +56,7 @@ FullComment *CommentParserTest::parseString(const char *Source) { SourceLocation Begin = SourceMgr.getLocForStartOfFile(File); comments::CommandTraits Traits; - comments::Lexer L(Allocator, Traits, Begin, CommentOptions(), + comments::Lexer L(Allocator, Traits, Begin, Source, Source + strlen(Source)); comments::Sema S(Allocator, SourceMgr, Diags, Traits);