aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-08-09 00:03:17 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-08-09 00:03:17 +0000
commitaa58081902ad31927df02e8537d972eabe29d6df (patch)
treeb6f5f6acf0c80eaec20a2131369fd81026ede6a0 /lib/AST/ASTContext.cpp
parent42f74f21ece01dc8573d5377859d327fbb23b26c (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 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 0ff0e35a43..4e8587d191 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -14,6 +14,7 @@
#include "clang/AST/ASTContext.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/Comment.h"
+#include "clang/AST/CommentCommandTraits.h"
#include "clang/AST/CommentLexer.h"
#include "clang/AST/CommentSema.h"
#include "clang/AST/CommentParser.h"
@@ -226,14 +227,16 @@ comments::FullComment *ASTContext::getCommentForDecl(const Decl *D) const {
return NULL;
const StringRef RawText = RC->getRawText(SourceMgr);
- comments::Lexer L(getAllocator(),
+ comments::CommandTraits Traits;
+ comments::Lexer L(getAllocator(), Traits,
RC->getSourceRange().getBegin(), comments::CommentOptions(),
RawText.begin(), RawText.end());
- comments::Sema S(getAllocator(), getSourceManager(), getDiagnostics());
+ comments::Sema S(getAllocator(), getSourceManager(), getDiagnostics(),
+ Traits);
S.setDecl(D);
comments::Parser P(L, S, getAllocator(), getSourceManager(),
- getDiagnostics());
+ getDiagnostics(), Traits);
comments::FullComment *FC = P.parseFullComment();
DeclComments[D].second = FC;