From 9304d863295caee0921ddbb44df0fa3d9870d38e Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Tue, 11 Sep 2012 19:22:03 +0000 Subject: Comment parsing: handle non-builtin commands correctly. After semantic analysis registers a command, it becomes a "known" command for the lexer, since it has an ID. Having this freedom of choice to register a command is a good thing since BriefParser does not need this. But the parser should still invoke the correct semantic analysis method (actOnUnknownCommand) in this case. llvm-svn: 163646 --- clang/lib/AST/CommentParser.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/lib/AST/CommentParser.cpp') diff --git a/clang/lib/AST/CommentParser.cpp b/clang/lib/AST/CommentParser.cpp index f6acd9645fb..d053dc0f180 100644 --- a/clang/lib/AST/CommentParser.cpp +++ b/clang/lib/AST/CommentParser.cpp @@ -554,6 +554,13 @@ BlockContentComment *Parser::parseParagraphOrBlockCommand() { return parseBlockCommand(); break; // Block command ahead, finish this parapgaph. } + if (Info->IsUnknownCommand) { + Content.push_back(S.actOnUnknownCommand(Tok.getLocation(), + Tok.getEndLocation(), + Info->getID())); + consumeToken(); + continue; + } assert(Info->IsInlineCommand); Content.push_back(parseInlineCommand()); continue; -- cgit v1.2.3