From acf2e786d29d1dff0ace9b92a88c074e2baebd2e Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Fri, 22 Feb 2013 14:21:27 +0000 Subject: Comment parsing: add CommentOptions to allow specifying custom comment block commands Add an ability to specify custom documentation block comment commands via a new class CommentOptions. The intention is that this class will hold future customizations for comment parsing, including defining documentation comments with specific numbers of parameters, etc. CommentOptions instance is a member of LangOptions. CommentOptions is controlled by a new command-line parameter -fcomment-block-commands=Foo,Bar,Baz. llvm-svn: 175892 --- clang/lib/Frontend/ASTUnit.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/Frontend/ASTUnit.cpp') diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index fcc8ea8f8df..1e7d404a77f 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -573,6 +573,11 @@ private: // Initialize the ASTContext Context.InitBuiltinTypes(*Target); + + // We didn't have access to the comment options when the ASTContext was + // constructed, so register them now. + Context.getCommentCommandTraits().registerCommentOptions( + LangOpt.CommentOpts); } }; -- cgit v1.2.3