Comment to HTML and XML conversion: ignore commands that contain a declaration
as their argument.  For example, \fn, \function, \typedef, \method, \class etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161601 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CXComment.cpp b/tools/libclang/CXComment.cpp
index 0bb6ab7..c5c9ca8 100644
--- a/tools/libclang/CXComment.cpp
+++ b/tools/libclang/CXComment.cpp
@@ -478,10 +478,16 @@
     }
 
     case Comment::VerbatimBlockCommentKind:
-    case Comment::VerbatimLineCommentKind:
       MiscBlocks.push_back(cast<BlockCommandComment>(Child));
       break;
 
+    case Comment::VerbatimLineCommentKind: {
+      const VerbatimLineComment *VLC = cast<VerbatimLineComment>(Child);
+      if (!Traits.isDeclarationCommand(VLC->getCommandName()))
+        MiscBlocks.push_back(VLC);
+      break;
+    }
+
     case Comment::TextCommentKind:
     case Comment::InlineCommandCommentKind:
     case Comment::HTMLStartTagCommentKind: