diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-08-09 00:03:17 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-08-09 00:03:17 +0000 |
commit | aa58081902ad31927df02e8537d972eabe29d6df (patch) | |
tree | b6f5f6acf0c80eaec20a2131369fd81026ede6a0 /unittests/AST/CommentParser.cpp | |
parent | 42f74f21ece01dc8573d5377859d327fbb23b26c (diff) |
Comment parsing: extract TableGen'able pieces into new CommandTraits class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161548 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/AST/CommentParser.cpp')
-rw-r--r-- | unittests/AST/CommentParser.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/unittests/AST/CommentParser.cpp b/unittests/AST/CommentParser.cpp index 1e106c59f1..7258a7ef57 100644 --- a/unittests/AST/CommentParser.cpp +++ b/unittests/AST/CommentParser.cpp @@ -14,6 +14,7 @@ #include "clang/AST/CommentLexer.h" #include "clang/AST/CommentParser.h" #include "clang/AST/CommentSema.h" +#include "clang/AST/CommentCommandTraits.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Allocator.h" #include <vector> @@ -54,11 +55,12 @@ FullComment *CommentParserTest::parseString(const char *Source) { FileID File = SourceMgr.createFileIDForMemBuffer(Buf); SourceLocation Begin = SourceMgr.getLocForStartOfFile(File); - comments::Lexer L(Allocator, Begin, CommentOptions(), + comments::CommandTraits Traits; + comments::Lexer L(Allocator, Traits, Begin, CommentOptions(), Source, Source + strlen(Source)); - comments::Sema S(Allocator, SourceMgr, Diags); - comments::Parser P(L, S, Allocator, SourceMgr, Diags); + comments::Sema S(Allocator, SourceMgr, Diags, Traits); + comments::Parser P(L, S, Allocator, SourceMgr, Diags, Traits); comments::FullComment *FC = P.parseFullComment(); if (DEBUG) { |