aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/CommentSema.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-03-02 02:39:57 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-03-02 02:39:57 +0000
commit8536fa14ee1048e5e2d62cb3dc11fc640c7dc00d (patch)
tree8e7f5e2534fa70dae25b32f41f52a77bb2df5ad5 /lib/AST/CommentSema.cpp
parent15e05e932ccf9ba2621394834b62684b42d6fd40 (diff)
Some refactoring in my patch on document
command source fidelity. // rdar://13066276 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CommentSema.cpp')
-rw-r--r--lib/AST/CommentSema.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/lib/AST/CommentSema.cpp b/lib/AST/CommentSema.cpp
index 3227138807..e7bd5c8cad 100644
--- a/lib/AST/CommentSema.cpp
+++ b/lib/AST/CommentSema.cpp
@@ -49,8 +49,9 @@ ParagraphComment *Sema::actOnParagraphComment(
BlockCommandComment *Sema::actOnBlockCommandStart(SourceLocation LocBegin,
SourceLocation LocEnd,
- unsigned CommandID) {
- return new (Allocator) BlockCommandComment(LocBegin, LocEnd, CommandID);
+ unsigned CommandID,
+ bool AtCommand) {
+ return new (Allocator) BlockCommandComment(LocBegin, LocEnd, CommandID, AtCommand);
}
void Sema::actOnBlockCommandArgs(BlockCommandComment *Command,
@@ -69,9 +70,10 @@ void Sema::actOnBlockCommandFinish(BlockCommandComment *Command,
ParamCommandComment *Sema::actOnParamCommandStart(SourceLocation LocBegin,
SourceLocation LocEnd,
- unsigned CommandID) {
+ unsigned CommandID,
+ bool AtCommand) {
ParamCommandComment *Command =
- new (Allocator) ParamCommandComment(LocBegin, LocEnd, CommandID);
+ new (Allocator) ParamCommandComment(LocBegin, LocEnd, CommandID, AtCommand);
if (!isFunctionDecl())
Diag(Command->getLocation(),
@@ -162,9 +164,10 @@ void Sema::actOnParamCommandFinish(ParamCommandComment *Command,
TParamCommandComment *Sema::actOnTParamCommandStart(SourceLocation LocBegin,
SourceLocation LocEnd,
- unsigned CommandID) {
+ unsigned CommandID,
+ bool AtCommand) {
TParamCommandComment *Command =
- new (Allocator) TParamCommandComment(LocBegin, LocEnd, CommandID);
+ new (Allocator) TParamCommandComment(LocBegin, LocEnd, CommandID, AtCommand);
if (!isTemplateOrSpecialization())
Diag(Command->getLocation(),
@@ -432,7 +435,7 @@ void Sema::checkBlockCommandEmptyParagraph(BlockCommandComment *Command) {
if (!DiagLoc.isValid())
DiagLoc = Command->getCommandNameRange(Traits).getEnd();
Diag(DiagLoc, diag::warn_doc_block_command_empty_paragraph)
- << Command->getHDCommand()
+ << Command->getAtCommand()
<< Command->getCommandName(Traits)
<< Command->getSourceRange();
}
@@ -460,7 +463,7 @@ void Sema::checkReturnsCommand(const BlockCommandComment *Command) {
}
Diag(Command->getLocation(),
diag::warn_doc_returns_attached_to_a_void_function)
- << Command->getHDCommand()
+ << Command->getAtCommand()
<< Command->getCommandName(Traits)
<< DiagKind
<< Command->getSourceRange();
@@ -472,7 +475,7 @@ void Sema::checkReturnsCommand(const BlockCommandComment *Command) {
Diag(Command->getLocation(),
diag::warn_doc_returns_not_attached_to_a_function_decl)
- << Command->getHDCommand()
+ << Command->getAtCommand()
<< Command->getCommandName(Traits)
<< Command->getSourceRange();
}
@@ -505,18 +508,18 @@ void Sema::checkBlockCommandDuplicate(const BlockCommandComment *Command) {
StringRef CommandName = Command->getCommandName(Traits);
StringRef PrevCommandName = PrevCommand->getCommandName(Traits);
Diag(Command->getLocation(), diag::warn_doc_block_command_duplicate)
- << Command->getHDCommand()
+ << Command->getAtCommand()
<< CommandName
<< Command->getSourceRange();
if (CommandName == PrevCommandName)
Diag(PrevCommand->getLocation(), diag::note_doc_block_command_previous)
- << PrevCommand->getHDCommand()
+ << PrevCommand->getAtCommand()
<< PrevCommandName
<< PrevCommand->getSourceRange();
else
Diag(PrevCommand->getLocation(),
diag::note_doc_block_command_previous_alias)
- << PrevCommand->getHDCommand()
+ << PrevCommand->getAtCommand()
<< PrevCommandName
<< CommandName;
}