r176444 - comment parsing. Missed a case of referring

Fariborz Jahanian fjahanian at apple.com
Mon Mar 4 10:53:41 PST 2013


Author: fjahanian
Date: Mon Mar  4 12:53:41 2013
New Revision: 176444

URL: http://llvm.org/viewvc/llvm-project?rev=176444&view=rev
Log:
comment parsing. Missed a case of referring
to original command in diagnostic. // rdar://13066276

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td
    cfe/trunk/lib/AST/CommentSema.cpp
    cfe/trunk/test/Sema/warn-documentation.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td?rev=176444&r1=176443&r2=176444&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td Mon Mar  4 12:53:41 2013
@@ -69,7 +69,7 @@ def warn_doc_param_spaces_in_direction :
   InGroup<DocumentationPedantic>, DefaultIgnore;
 
 def warn_doc_param_not_attached_to_a_function_decl : Warning<
-  "'\\param' command used in a comment that is not attached to "
+  "'%select{\\|@}0param' command used in a comment that is not attached to "
   "a function declaration">,
   InGroup<Documentation>, DefaultIgnore;
 

Modified: cfe/trunk/lib/AST/CommentSema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentSema.cpp?rev=176444&r1=176443&r2=176444&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CommentSema.cpp (original)
+++ cfe/trunk/lib/AST/CommentSema.cpp Mon Mar  4 12:53:41 2013
@@ -78,6 +78,7 @@ ParamCommandComment *Sema::actOnParamCom
   if (!isFunctionDecl())
     Diag(Command->getLocation(),
          diag::warn_doc_param_not_attached_to_a_function_decl)
+      << AtCommand
       << Command->getCommandNameRange(Traits);
 
   return Command;

Modified: cfe/trunk/test/Sema/warn-documentation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/warn-documentation.cpp?rev=176444&r1=176443&r2=176444&view=diff
==============================================================================
--- cfe/trunk/test/Sema/warn-documentation.cpp (original)
+++ cfe/trunk/test/Sema/warn-documentation.cpp Mon Mar  4 12:53:41 2013
@@ -907,3 +907,11 @@ struct s;
 struct q* g(void);
 struct q;
 
+// expected-warning at +3 {{'@param' command used in a comment that is not attached to a function declaration}}
+// expected-warning at +3 {{'@result' command used in a comment that is not attached to a function or method declaration}}
+/*!	@function Base64EncodeEx
+	@param	inFlags  This is error flag
+	@result	Error
+*/
+typedef unsigned int Base64Flags;
+unsigned Base64EncodeEx(Base64Flags	inFlags);





More information about the cfe-commits mailing list