summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/CommentSema.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-03-01 22:51:30 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-03-01 22:51:30 +0000
commitd49963609d58ceaf85de6ad90170a359258a3a2c (patch)
tree7b995443c861e4f0a59b5ced57007c4f502ace81 /clang/lib/AST/CommentSema.cpp
parentdb4443f7af005588d4fd0df5669a2a2ee21fac11 (diff)
downloadbcm5719-llvm-d49963609d58ceaf85de6ad90170a359258a3a2c.tar.gz
bcm5719-llvm-d49963609d58ceaf85de6ad90170a359258a3a2c.zip
comment parsing. Keep the original command format
in AST for source fidelity and use it in diagnostics to refer to the original format. // rdar://13066276 llvm-svn: 176387
Diffstat (limited to 'clang/lib/AST/CommentSema.cpp')
-rw-r--r--clang/lib/AST/CommentSema.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/AST/CommentSema.cpp b/clang/lib/AST/CommentSema.cpp
index 73e49e71db0..32271388075 100644
--- a/clang/lib/AST/CommentSema.cpp
+++ b/clang/lib/AST/CommentSema.cpp
@@ -432,6 +432,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->getCommandName(Traits)
<< Command->getSourceRange();
}
@@ -459,6 +460,7 @@ void Sema::checkReturnsCommand(const BlockCommandComment *Command) {
}
Diag(Command->getLocation(),
diag::warn_doc_returns_attached_to_a_void_function)
+ << Command->getHDCommand()
<< Command->getCommandName(Traits)
<< DiagKind
<< Command->getSourceRange();
@@ -470,6 +472,7 @@ void Sema::checkReturnsCommand(const BlockCommandComment *Command) {
Diag(Command->getLocation(),
diag::warn_doc_returns_not_attached_to_a_function_decl)
+ << Command->getHDCommand()
<< Command->getCommandName(Traits)
<< Command->getSourceRange();
}
@@ -502,15 +505,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()
<< CommandName
<< Command->getSourceRange();
if (CommandName == PrevCommandName)
Diag(PrevCommand->getLocation(), diag::note_doc_block_command_previous)
+ << PrevCommand->getHDCommand()
<< PrevCommandName
<< PrevCommand->getSourceRange();
else
Diag(PrevCommand->getLocation(),
diag::note_doc_block_command_previous_alias)
+ << PrevCommand->getHDCommand()
<< PrevCommandName
<< CommandName;
}
OpenPOWER on IntegriCloud