From aab8383a2b3a1fb429d748f726f5306746fadaca Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Wed, 20 Jun 2012 00:34:58 +0000 Subject: Structured comment parsing, first step. * Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang llvm-svn: 158771 --- clang/lib/Sema/Sema.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/Sema/Sema.cpp') diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 6323589bd83..9e4b2919713 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -1014,6 +1014,11 @@ LambdaScopeInfo *Sema::getCurLambda() { return dyn_cast(FunctionScopes.back()); } +void Sema::ActOnComment(SourceRange Comment) { + RawComment RC(SourceMgr, Comment); + Context.addComment(RC); +} + // Pin this vtable to this file. ExternalSemaSource::~ExternalSemaSource() {} -- cgit v1.2.3