summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/CommentParser.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-09-11 19:22:03 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-09-11 19:22:03 +0000
commit9304d863295caee0921ddbb44df0fa3d9870d38e (patch)
treed29519a25340fc567c9644cd53227b442b2cf63e /clang/lib/AST/CommentParser.cpp
parent1778831a3d1d24ab6545635f63da4d9c5f8f0ac7 (diff)
downloadbcm5719-llvm-9304d863295caee0921ddbb44df0fa3d9870d38e.tar.gz
bcm5719-llvm-9304d863295caee0921ddbb44df0fa3d9870d38e.zip
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
Diffstat (limited to 'clang/lib/AST/CommentParser.cpp')
-rw-r--r--clang/lib/AST/CommentParser.cpp7
1 files changed, 7 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud