r206882 - Comment parsing: in the generated XML file, mark HTML that is safe to pass

Alp Toker alp at nuanti.com
Tue Apr 22 09:09:03 PDT 2014


On 22/04/2014 13:35, Dmitri Gribenko wrote:
> On Tue, Apr 22, 2014 at 12:45 PM, Alp Toker <alp at nuanti.com> wrote:
>> On 22/04/2014 11:59, Dmitri Gribenko wrote:
>>> +// The list is intentionally organized as one item per line to make it
>>> easier
>>> +// to compare with the HTML spec.
>>> +foreach AttrName = [
>>> +    "onabort",
>>> +    "onblur",
>>> +    "oncancel",
>>> +    "oncanplay",
>>> +    "oncanplaythrough",
>>> +    "onchange",
>>> +    "onclick",
>>> +    "onclose",
>>> +    "oncuechange",
>>> +    "ondblclick",
>>> +    "ondrag",
>>> +    "ondragend",
>>> +    "ondragenter",
>>> +    "ondragexit",
>>> +    "ondragleave",
>>> +    "ondragover",
>>> +    "ondragstart",
>>> +    "ondrop",
>>> +    "ondurationchange",
>>> +    "onemptied",
>>> +    "onended",
>>> +    "onerror",
>>> +    "onfocus",
>>> +    "oninput",
>>> +    "oninvalid",
>>> +    "onkeydown",
>>> +    "onkeypress",
>>> +    "onkeyup",
>>> +    "onload",
>>> +    "onloadeddata",
>>> +    "onloadedmetadata",
>>> +    "onloadstart",
>>> +    "onmousedown",
>>> +    "onmouseenter",
>>> +    "onmouseleave",
>>> +    "onmousemove",
>>> +    "onmouseout",
>>> +    "onmouseover",
>>> +    "onmouseup",
>>> +    "onmousewheel",
>>> +    "onpause",
>>> +    "onplay",
>>> +    "onplaying",
>>> +    "onprogress",
>>> +    "onratechange",
>>> +    "onreset",
>>> +    "onresize",
>>> +    "onscroll",
>>> +    "onseeked",
>>> +    "onseeking",
>>> +    "onselect",
>>> +    "onshow",
>>> +    "onstalled",
>>> +    "onsubmit",
>>> +    "onsuspend",
>>> +    "ontimeupdate",
>>> +    "ontoggle",
>>> +    "onvolumechange",
>>> +    "onwaiting"
>>> +  ] in {
>>> +  def Attr#AttrName : EventHandlerContentAttribute<AttrName>;
>>> +}
>>
>> Hi Dmitri,
>>
>> I've been meaning to bring this up earlier but I really don't think this
>> kind of functionality belongs in the core of the clang AST/Basic.
>>
>> We often ask contributors to add even useful features like warnings and
>> checks to clang-tools-extra or third-party plugins where it might keep
>> things trim. So it's surprising to me that at the same time there's a
>> full-featured HTML5 generator and XML parser/tree being incrementally
>> hard-coded into clang/AST.
> Hi Alp,
>
> Please note that HTML and XML *generation* is in libIndex, not in
> libAST.  Also, no piece of comment parsing (except for the diagnostic
> .td file) lives in libBasic.
>
> Comment parsing, including semantic analysis for HTML embedded in
> comments, is, indeed, in libAST.  Actually, at first, I put it into
> libComment library, because I had the same feeling -- it did not
> belong into libAST, but I had to merge it into libAST because of a
> dependency cycle: comment parsing depends on libAST in order to
> inspect declarations, and libAST (specifically, ASTContext) depends on
> libComment in order to parse comments.
>
> If you do feel strongly about this, we could bounce off an abstract
> base class that is declared in libAST and the only implementation of
> which lives in libComment.  Then libComment would depend on libAST,
> and something in libFrontend, which would depend on both libAST and
> libComment, would instantiate the comment parser appropriately and
> configure ASTContext with the instance.  But I don't think that it is
> a significant cleanup of libAST, it introduced even more complexity.
> All of lib/AST/Comment* is just 3.5 KLoC, include/clang/AST/Comment*
> (including all supporting tables) is less than 3 KLoC.  Compared to
> libAST as a whole, with over 100 KLoC, I don't think it adds much
> value to factor this small piece into a separate library.

Thanks for writing that up Dmitri.

I believe we can get a lot of mileage with some changes to internals.

I've been studying what's there and have some bite-sized suggestions:

1) RawComment::extractBriefText() introduces a dependency from the 
lightweight comment handling into the full comment AST. Could you 
extract this to a function like extractBriefText(RawComment&, ASTContext 
&Context)?

2) Split out comment AST C API in libclang from Index.h into 
CXComment.h. For now, include CXComment.h but this makes it easier to 
develop alternatives (and easier for libclang users to understand the 
separation of concerns).

(... and more items like, you get the idea)

By the way, my numbers don't agree with yours. I have a patch here to 
remove the doc comment functionality with all other tests passing:

  138 files changed, 655 insertions(+), 17760 deletions(-)

That's about one fifth the size of the whole libAST to use your 
benchmark :-)

While I'm not suggesting we actually apply the patch, it's a great way 
to view the comment system as a whole and identify possible simplifications.

So, if we shake things up a little we can reuse most of this work while 
addressing some of the issues. I'd bee keen to help out on this and have 
patches.

Ultimately I believe the Actions and AST style approach needs to go away 
in favour of something more direct and appropriate for parsing comments 
that can be run after initial AST generation / compilation.

Attached is the monolithic 696K patch against r206882 FYI.

Alp.


-- 
http://www.nuanti.com
the browser experts

-------------- next part --------------
diff --git a/include/clang-c/CXComment.h b/include/clang-c/CXComment.h
new file mode 100644
index 0000000..2c8e6cd
--- /dev/null
+++ b/include/clang-c/CXComment.h
@@ -0,0 +1,576 @@
+/*===========-- clang-c/CXComment.h - Comment indexing  ---*- C -*-===========*\
+|*                                                                            *|
+|*                     The LLVM Compiler Infrastructure                       *|
+|*                                                                            *|
+|* This file is distributed under the University of Illinois Open Source      *|
+|* License. See LICENSE.TXT for details.                                      *|
+|*                                                                            *|
+|*===----------------------------------------------------------------------===*|
+|*                                                                            *|
+|* This header provides a public inferface to index and process code          *|
+|* comments and documentation.                                                *|
+|*                                                                            *|
+\*===----------------------------------------------------------------------===*/
+
+#ifndef CLANG_CXCOMMENT_H
+#define CLANG_CXCOMMENT_H
+
+#include "clang-c/Platform.h"
+#include "clang-c/CXString.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** \defgroup CXCOMMENT CXComment functions
+ * \ingroup CINDEX
+ *
+ * @{
+ */
+
+/**
+ * \brief A comment AST node.
+ */
+typedef struct {
+  const void *ASTNode;
+  CXTranslationUnit TranslationUnit;
+} CXComment;
+
+
+/**
+ * \brief Given a cursor that represents a documentable entity (e.g.,
+ * declaration), return the associated \\brief paragraph; otherwise return the
+ * first paragraph.
+ */
+CINDEX_LINKAGE CXString clang_Cursor_getBriefCommentText(CXCursor C);
+
+/**
+ * \brief Given a cursor that represents a documentable entity (e.g.,
+ * declaration), return the associated parsed comment as a
+ * \c CXComment_FullComment AST node.
+ */
+CINDEX_LINKAGE CXComment clang_Cursor_getParsedComment(CXCursor C);
+
+
+/**
+ * @}
+ */
+
+
+/**
+ * @}
+ */
+
+/**
+ * \defgroup CINDEX_COMMENT Comment AST introspection
+ *
+ * The routines in this group provide access to information in the
+ * documentation comment ASTs.
+ *
+ * @{
+ */
+
+/**
+ * \brief Describes the type of the comment AST node (\c CXComment).  A comment
+ * node can be considered block content (e. g., paragraph), inline content
+ * (plain text) or neither (the root AST node).
+ */
+enum CXCommentKind {
+  /**
+   * \brief Null comment.  No AST node is constructed at the requested location
+   * because there is no text or a syntax error.
+   */
+  CXComment_Null = 0,
+
+  /**
+   * \brief Plain text.  Inline content.
+   */
+  CXComment_Text = 1,
+
+  /**
+   * \brief A command with word-like arguments that is considered inline content.
+   *
+   * For example: \\c command.
+   */
+  CXComment_InlineCommand = 2,
+
+  /**
+   * \brief HTML start tag with attributes (name-value pairs).  Considered
+   * inline content.
+   *
+   * For example:
+   * \verbatim
+   * <br> <br /> <a href="http://example.org/">
+   * \endverbatim
+   */
+  CXComment_HTMLStartTag = 3,
+
+  /**
+   * \brief HTML end tag.  Considered inline content.
+   *
+   * For example:
+   * \verbatim
+   * </a>
+   * \endverbatim
+   */
+  CXComment_HTMLEndTag = 4,
+
+  /**
+   * \brief A paragraph, contains inline comment.  The paragraph itself is
+   * block content.
+   */
+  CXComment_Paragraph = 5,
+
+  /**
+   * \brief A command that has zero or more word-like arguments (number of
+   * word-like arguments depends on command name) and a paragraph as an
+   * argument.  Block command is block content.
+   *
+   * Paragraph argument is also a child of the block command.
+   *
+   * For example: \\brief has 0 word-like arguments and a paragraph argument.
+   *
+   * AST nodes of special kinds that parser knows about (e. g., \\param
+   * command) have their own node kinds.
+   */
+  CXComment_BlockCommand = 6,
+
+  /**
+   * \brief A \\param or \\arg command that describes the function parameter
+   * (name, passing direction, description).
+   *
+   * For example: \\param [in] ParamName description.
+   */
+  CXComment_ParamCommand = 7,
+
+  /**
+   * \brief A \\tparam command that describes a template parameter (name and
+   * description).
+   *
+   * For example: \\tparam T description.
+   */
+  CXComment_TParamCommand = 8,
+
+  /**
+   * \brief A verbatim block command (e. g., preformatted code).  Verbatim
+   * block has an opening and a closing command and contains multiple lines of
+   * text (\c CXComment_VerbatimBlockLine child nodes).
+   *
+   * For example:
+   * \\verbatim
+   * aaa
+   * \\endverbatim
+   */
+  CXComment_VerbatimBlockCommand = 9,
+
+  /**
+   * \brief A line of text that is contained within a
+   * CXComment_VerbatimBlockCommand node.
+   */
+  CXComment_VerbatimBlockLine = 10,
+
+  /**
+   * \brief A verbatim line command.  Verbatim line has an opening command,
+   * a single line of text (up to the newline after the opening command) and
+   * has no closing command.
+   */
+  CXComment_VerbatimLine = 11,
+
+  /**
+   * \brief A full comment attached to a declaration, contains block content.
+   */
+  CXComment_FullComment = 12
+};
+
+/**
+ * \brief The most appropriate rendering mode for an inline command, chosen on
+ * command semantics in Doxygen.
+ */
+enum CXCommentInlineCommandRenderKind {
+  /**
+   * \brief Command argument should be rendered in a normal font.
+   */
+  CXCommentInlineCommandRenderKind_Normal,
+
+  /**
+   * \brief Command argument should be rendered in a bold font.
+   */
+  CXCommentInlineCommandRenderKind_Bold,
+
+  /**
+   * \brief Command argument should be rendered in a monospaced font.
+   */
+  CXCommentInlineCommandRenderKind_Monospaced,
+
+  /**
+   * \brief Command argument should be rendered emphasized (typically italic
+   * font).
+   */
+  CXCommentInlineCommandRenderKind_Emphasized
+};
+
+/**
+ * \brief Describes parameter passing direction for \\param or \\arg command.
+ */
+enum CXCommentParamPassDirection {
+  /**
+   * \brief The parameter is an input parameter.
+   */
+  CXCommentParamPassDirection_In,
+
+  /**
+   * \brief The parameter is an output parameter.
+   */
+  CXCommentParamPassDirection_Out,
+
+  /**
+   * \brief The parameter is an input and output parameter.
+   */
+  CXCommentParamPassDirection_InOut
+};
+
+/**
+ * \param Comment AST node of any kind.
+ *
+ * \returns the type of the AST node.
+ */
+CINDEX_LINKAGE enum CXCommentKind clang_Comment_getKind(CXComment Comment);
+
+/**
+ * \param Comment AST node of any kind.
+ *
+ * \returns number of children of the AST node.
+ */
+CINDEX_LINKAGE unsigned clang_Comment_getNumChildren(CXComment Comment);
+
+/**
+ * \param Comment AST node of any kind.
+ *
+ * \param ChildIdx child index (zero-based).
+ *
+ * \returns the specified child of the AST node.
+ */
+CINDEX_LINKAGE
+CXComment clang_Comment_getChild(CXComment Comment, unsigned ChildIdx);
+
+/**
+ * \brief A \c CXComment_Paragraph node is considered whitespace if it contains
+ * only \c CXComment_Text nodes that are empty or whitespace.
+ *
+ * Other AST nodes (except \c CXComment_Paragraph and \c CXComment_Text) are
+ * never considered whitespace.
+ *
+ * \returns non-zero if \c Comment is whitespace.
+ */
+CINDEX_LINKAGE unsigned clang_Comment_isWhitespace(CXComment Comment);
+
+/**
+ * \returns non-zero if \c Comment is inline content and has a newline
+ * immediately following it in the comment text.  Newlines between paragraphs
+ * do not count.
+ */
+CINDEX_LINKAGE
+unsigned clang_InlineContentComment_hasTrailingNewline(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_Text AST node.
+ *
+ * \returns text contained in the AST node.
+ */
+CINDEX_LINKAGE CXString clang_TextComment_getText(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_InlineCommand AST node.
+ *
+ * \returns name of the inline command.
+ */
+CINDEX_LINKAGE
+CXString clang_InlineCommandComment_getCommandName(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_InlineCommand AST node.
+ *
+ * \returns the most appropriate rendering mode, chosen on command
+ * semantics in Doxygen.
+ */
+CINDEX_LINKAGE enum CXCommentInlineCommandRenderKind
+clang_InlineCommandComment_getRenderKind(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_InlineCommand AST node.
+ *
+ * \returns number of command arguments.
+ */
+CINDEX_LINKAGE
+unsigned clang_InlineCommandComment_getNumArgs(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_InlineCommand AST node.
+ *
+ * \param ArgIdx argument index (zero-based).
+ *
+ * \returns text of the specified argument.
+ */
+CINDEX_LINKAGE
+CXString clang_InlineCommandComment_getArgText(CXComment Comment,
+                                               unsigned ArgIdx);
+
+/**
+ * \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST
+ * node.
+ *
+ * \returns HTML tag name.
+ */
+CINDEX_LINKAGE CXString clang_HTMLTagComment_getTagName(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_HTMLStartTag AST node.
+ *
+ * \returns non-zero if tag is self-closing (for example, <br />).
+ */
+CINDEX_LINKAGE
+unsigned clang_HTMLStartTagComment_isSelfClosing(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_HTMLStartTag AST node.
+ *
+ * \returns number of attributes (name-value pairs) attached to the start tag.
+ */
+CINDEX_LINKAGE unsigned clang_HTMLStartTag_getNumAttrs(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_HTMLStartTag AST node.
+ *
+ * \param AttrIdx attribute index (zero-based).
+ *
+ * \returns name of the specified attribute.
+ */
+CINDEX_LINKAGE
+CXString clang_HTMLStartTag_getAttrName(CXComment Comment, unsigned AttrIdx);
+
+/**
+ * \param Comment a \c CXComment_HTMLStartTag AST node.
+ *
+ * \param AttrIdx attribute index (zero-based).
+ *
+ * \returns value of the specified attribute.
+ */
+CINDEX_LINKAGE
+CXString clang_HTMLStartTag_getAttrValue(CXComment Comment, unsigned AttrIdx);
+
+/**
+ * \param Comment a \c CXComment_BlockCommand AST node.
+ *
+ * \returns name of the block command.
+ */
+CINDEX_LINKAGE
+CXString clang_BlockCommandComment_getCommandName(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_BlockCommand AST node.
+ *
+ * \returns number of word-like arguments.
+ */
+CINDEX_LINKAGE
+unsigned clang_BlockCommandComment_getNumArgs(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_BlockCommand AST node.
+ *
+ * \param ArgIdx argument index (zero-based).
+ *
+ * \returns text of the specified word-like argument.
+ */
+CINDEX_LINKAGE
+CXString clang_BlockCommandComment_getArgText(CXComment Comment,
+                                              unsigned ArgIdx);
+
+/**
+ * \param Comment a \c CXComment_BlockCommand or
+ * \c CXComment_VerbatimBlockCommand AST node.
+ *
+ * \returns paragraph argument of the block command.
+ */
+CINDEX_LINKAGE
+CXComment clang_BlockCommandComment_getParagraph(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_ParamCommand AST node.
+ *
+ * \returns parameter name.
+ */
+CINDEX_LINKAGE
+CXString clang_ParamCommandComment_getParamName(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_ParamCommand AST node.
+ *
+ * \returns non-zero if the parameter that this AST node represents was found
+ * in the function prototype and \c clang_ParamCommandComment_getParamIndex
+ * function will return a meaningful value.
+ */
+CINDEX_LINKAGE
+unsigned clang_ParamCommandComment_isParamIndexValid(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_ParamCommand AST node.
+ *
+ * \returns zero-based parameter index in function prototype.
+ */
+CINDEX_LINKAGE
+unsigned clang_ParamCommandComment_getParamIndex(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_ParamCommand AST node.
+ *
+ * \returns non-zero if parameter passing direction was specified explicitly in
+ * the comment.
+ */
+CINDEX_LINKAGE
+unsigned clang_ParamCommandComment_isDirectionExplicit(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_ParamCommand AST node.
+ *
+ * \returns parameter passing direction.
+ */
+CINDEX_LINKAGE
+enum CXCommentParamPassDirection clang_ParamCommandComment_getDirection(
+                                                            CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_TParamCommand AST node.
+ *
+ * \returns template parameter name.
+ */
+CINDEX_LINKAGE
+CXString clang_TParamCommandComment_getParamName(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_TParamCommand AST node.
+ *
+ * \returns non-zero if the parameter that this AST node represents was found
+ * in the template parameter list and
+ * \c clang_TParamCommandComment_getDepth and
+ * \c clang_TParamCommandComment_getIndex functions will return a meaningful
+ * value.
+ */
+CINDEX_LINKAGE
+unsigned clang_TParamCommandComment_isParamPositionValid(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_TParamCommand AST node.
+ *
+ * \returns zero-based nesting depth of this parameter in the template parameter list.
+ *
+ * For example,
+ * \verbatim
+ *     template<typename C, template<typename T> class TT>
+ *     void test(TT<int> aaa);
+ * \endverbatim
+ * for C and TT nesting depth is 0,
+ * for T nesting depth is 1.
+ */
+CINDEX_LINKAGE
+unsigned clang_TParamCommandComment_getDepth(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_TParamCommand AST node.
+ *
+ * \returns zero-based parameter index in the template parameter list at a
+ * given nesting depth.
+ *
+ * For example,
+ * \verbatim
+ *     template<typename C, template<typename T> class TT>
+ *     void test(TT<int> aaa);
+ * \endverbatim
+ * for C and TT nesting depth is 0, so we can ask for index at depth 0:
+ * at depth 0 C's index is 0, TT's index is 1.
+ *
+ * For T nesting depth is 1, so we can ask for index at depth 0 and 1:
+ * at depth 0 T's index is 1 (same as TT's),
+ * at depth 1 T's index is 0.
+ */
+CINDEX_LINKAGE
+unsigned clang_TParamCommandComment_getIndex(CXComment Comment, unsigned Depth);
+
+/**
+ * \param Comment a \c CXComment_VerbatimBlockLine AST node.
+ *
+ * \returns text contained in the AST node.
+ */
+CINDEX_LINKAGE
+CXString clang_VerbatimBlockLineComment_getText(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_VerbatimLine AST node.
+ *
+ * \returns text contained in the AST node.
+ */
+CINDEX_LINKAGE CXString clang_VerbatimLineComment_getText(CXComment Comment);
+
+/**
+ * \brief Convert an HTML tag AST node to string.
+ *
+ * \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST
+ * node.
+ *
+ * \returns string containing an HTML tag.
+ */
+CINDEX_LINKAGE CXString clang_HTMLTagComment_getAsString(CXComment Comment);
+
+/**
+ * \brief Convert a given full parsed comment to an HTML fragment.
+ *
+ * Specific details of HTML layout are subject to change.  Don't try to parse
+ * this HTML back into an AST, use other APIs instead.
+ *
+ * Currently the following CSS classes are used:
+ * \li "para-brief" for \\brief paragraph and equivalent commands;
+ * \li "para-returns" for \\returns paragraph and equivalent commands;
+ * \li "word-returns" for the "Returns" word in \\returns paragraph.
+ *
+ * Function argument documentation is rendered as a \<dl\> list with arguments
+ * sorted in function prototype order.  CSS classes used:
+ * \li "param-name-index-NUMBER" for parameter name (\<dt\>);
+ * \li "param-descr-index-NUMBER" for parameter description (\<dd\>);
+ * \li "param-name-index-invalid" and "param-descr-index-invalid" are used if
+ * parameter index is invalid.
+ *
+ * Template parameter documentation is rendered as a \<dl\> list with
+ * parameters sorted in template parameter list order.  CSS classes used:
+ * \li "tparam-name-index-NUMBER" for parameter name (\<dt\>);
+ * \li "tparam-descr-index-NUMBER" for parameter description (\<dd\>);
+ * \li "tparam-name-index-other" and "tparam-descr-index-other" are used for
+ * names inside template template parameters;
+ * \li "tparam-name-index-invalid" and "tparam-descr-index-invalid" are used if
+ * parameter position is invalid.
+ *
+ * \param Comment a \c CXComment_FullComment AST node.
+ *
+ * \returns string containing an HTML fragment.
+ */
+CINDEX_LINKAGE CXString clang_FullComment_getAsHTML(CXComment Comment);
+
+/**
+ * \brief Convert a given full parsed comment to an XML document.
+ *
+ * A Relax NG schema for the XML can be found in comment-xml-schema.rng file
+ * inside clang source tree.
+ *
+ * \param Comment a \c CXComment_FullComment AST node.
+ *
+ * \returns string containing an XML document.
+ */
+CINDEX_LINKAGE CXString clang_FullComment_getAsXML(CXComment Comment);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index 386e0ff..fd97fff 100644
--- a/include/clang-c/Index.h
+++ b/include/clang-c/Index.h
@@ -2216,14 +2216,6 @@ typedef struct {
 } CXCursor;
 
 /**
- * \brief A comment AST node.
- */
-typedef struct {
-  const void *ASTNode;
-  CXTranslationUnit TranslationUnit;
-} CXComment;
-
-/**
  * \defgroup CINDEX_CURSOR_MANIP Cursor manipulations
  *
  * @{
@@ -3571,20 +3563,6 @@ CINDEX_LINKAGE CXSourceRange clang_Cursor_getCommentRange(CXCursor C);
 CINDEX_LINKAGE CXString clang_Cursor_getRawCommentText(CXCursor C);
 
 /**
- * \brief Given a cursor that represents a documentable entity (e.g.,
- * declaration), return the associated \\brief paragraph; otherwise return the
- * first paragraph.
- */
-CINDEX_LINKAGE CXString clang_Cursor_getBriefCommentText(CXCursor C);
-
-/**
- * \brief Given a cursor that represents a documentable entity (e.g.,
- * declaration), return the associated parsed comment as a
- * \c CXComment_FullComment AST node.
- */
-CINDEX_LINKAGE CXComment clang_Cursor_getParsedComment(CXCursor C);
-
-/**
  * @}
  */
 
@@ -3653,518 +3631,6 @@ CXFile clang_Module_getTopLevelHeader(CXTranslationUnit,
                                       CXModule Module, unsigned Index);
 
 /**
- * @}
- */
-
-/**
- * \defgroup CINDEX_COMMENT Comment AST introspection
- *
- * The routines in this group provide access to information in the
- * documentation comment ASTs.
- *
- * @{
- */
-
-/**
- * \brief Describes the type of the comment AST node (\c CXComment).  A comment
- * node can be considered block content (e. g., paragraph), inline content
- * (plain text) or neither (the root AST node).
- */
-enum CXCommentKind {
-  /**
-   * \brief Null comment.  No AST node is constructed at the requested location
-   * because there is no text or a syntax error.
-   */
-  CXComment_Null = 0,
-
-  /**
-   * \brief Plain text.  Inline content.
-   */
-  CXComment_Text = 1,
-
-  /**
-   * \brief A command with word-like arguments that is considered inline content.
-   *
-   * For example: \\c command.
-   */
-  CXComment_InlineCommand = 2,
-
-  /**
-   * \brief HTML start tag with attributes (name-value pairs).  Considered
-   * inline content.
-   *
-   * For example:
-   * \verbatim
-   * <br> <br /> <a href="http://example.org/">
-   * \endverbatim
-   */
-  CXComment_HTMLStartTag = 3,
-
-  /**
-   * \brief HTML end tag.  Considered inline content.
-   *
-   * For example:
-   * \verbatim
-   * </a>
-   * \endverbatim
-   */
-  CXComment_HTMLEndTag = 4,
-
-  /**
-   * \brief A paragraph, contains inline comment.  The paragraph itself is
-   * block content.
-   */
-  CXComment_Paragraph = 5,
-
-  /**
-   * \brief A command that has zero or more word-like arguments (number of
-   * word-like arguments depends on command name) and a paragraph as an
-   * argument.  Block command is block content.
-   *
-   * Paragraph argument is also a child of the block command.
-   *
-   * For example: \\brief has 0 word-like arguments and a paragraph argument.
-   *
-   * AST nodes of special kinds that parser knows about (e. g., \\param
-   * command) have their own node kinds.
-   */
-  CXComment_BlockCommand = 6,
-
-  /**
-   * \brief A \\param or \\arg command that describes the function parameter
-   * (name, passing direction, description).
-   *
-   * For example: \\param [in] ParamName description.
-   */
-  CXComment_ParamCommand = 7,
-
-  /**
-   * \brief A \\tparam command that describes a template parameter (name and
-   * description).
-   *
-   * For example: \\tparam T description.
-   */
-  CXComment_TParamCommand = 8,
-
-  /**
-   * \brief A verbatim block command (e. g., preformatted code).  Verbatim
-   * block has an opening and a closing command and contains multiple lines of
-   * text (\c CXComment_VerbatimBlockLine child nodes).
-   *
-   * For example:
-   * \\verbatim
-   * aaa
-   * \\endverbatim
-   */
-  CXComment_VerbatimBlockCommand = 9,
-
-  /**
-   * \brief A line of text that is contained within a
-   * CXComment_VerbatimBlockCommand node.
-   */
-  CXComment_VerbatimBlockLine = 10,
-
-  /**
-   * \brief A verbatim line command.  Verbatim line has an opening command,
-   * a single line of text (up to the newline after the opening command) and
-   * has no closing command.
-   */
-  CXComment_VerbatimLine = 11,
-
-  /**
-   * \brief A full comment attached to a declaration, contains block content.
-   */
-  CXComment_FullComment = 12
-};
-
-/**
- * \brief The most appropriate rendering mode for an inline command, chosen on
- * command semantics in Doxygen.
- */
-enum CXCommentInlineCommandRenderKind {
-  /**
-   * \brief Command argument should be rendered in a normal font.
-   */
-  CXCommentInlineCommandRenderKind_Normal,
-
-  /**
-   * \brief Command argument should be rendered in a bold font.
-   */
-  CXCommentInlineCommandRenderKind_Bold,
-
-  /**
-   * \brief Command argument should be rendered in a monospaced font.
-   */
-  CXCommentInlineCommandRenderKind_Monospaced,
-
-  /**
-   * \brief Command argument should be rendered emphasized (typically italic
-   * font).
-   */
-  CXCommentInlineCommandRenderKind_Emphasized
-};
-
-/**
- * \brief Describes parameter passing direction for \\param or \\arg command.
- */
-enum CXCommentParamPassDirection {
-  /**
-   * \brief The parameter is an input parameter.
-   */
-  CXCommentParamPassDirection_In,
-
-  /**
-   * \brief The parameter is an output parameter.
-   */
-  CXCommentParamPassDirection_Out,
-
-  /**
-   * \brief The parameter is an input and output parameter.
-   */
-  CXCommentParamPassDirection_InOut
-};
-
-/**
- * \param Comment AST node of any kind.
- *
- * \returns the type of the AST node.
- */
-CINDEX_LINKAGE enum CXCommentKind clang_Comment_getKind(CXComment Comment);
-
-/**
- * \param Comment AST node of any kind.
- *
- * \returns number of children of the AST node.
- */
-CINDEX_LINKAGE unsigned clang_Comment_getNumChildren(CXComment Comment);
-
-/**
- * \param Comment AST node of any kind.
- *
- * \param ChildIdx child index (zero-based).
- *
- * \returns the specified child of the AST node.
- */
-CINDEX_LINKAGE
-CXComment clang_Comment_getChild(CXComment Comment, unsigned ChildIdx);
-
-/**
- * \brief A \c CXComment_Paragraph node is considered whitespace if it contains
- * only \c CXComment_Text nodes that are empty or whitespace.
- *
- * Other AST nodes (except \c CXComment_Paragraph and \c CXComment_Text) are
- * never considered whitespace.
- *
- * \returns non-zero if \c Comment is whitespace.
- */
-CINDEX_LINKAGE unsigned clang_Comment_isWhitespace(CXComment Comment);
-
-/**
- * \returns non-zero if \c Comment is inline content and has a newline
- * immediately following it in the comment text.  Newlines between paragraphs
- * do not count.
- */
-CINDEX_LINKAGE
-unsigned clang_InlineContentComment_hasTrailingNewline(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_Text AST node.
- *
- * \returns text contained in the AST node.
- */
-CINDEX_LINKAGE CXString clang_TextComment_getText(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_InlineCommand AST node.
- *
- * \returns name of the inline command.
- */
-CINDEX_LINKAGE
-CXString clang_InlineCommandComment_getCommandName(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_InlineCommand AST node.
- *
- * \returns the most appropriate rendering mode, chosen on command
- * semantics in Doxygen.
- */
-CINDEX_LINKAGE enum CXCommentInlineCommandRenderKind
-clang_InlineCommandComment_getRenderKind(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_InlineCommand AST node.
- *
- * \returns number of command arguments.
- */
-CINDEX_LINKAGE
-unsigned clang_InlineCommandComment_getNumArgs(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_InlineCommand AST node.
- *
- * \param ArgIdx argument index (zero-based).
- *
- * \returns text of the specified argument.
- */
-CINDEX_LINKAGE
-CXString clang_InlineCommandComment_getArgText(CXComment Comment,
-                                               unsigned ArgIdx);
-
-/**
- * \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST
- * node.
- *
- * \returns HTML tag name.
- */
-CINDEX_LINKAGE CXString clang_HTMLTagComment_getTagName(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_HTMLStartTag AST node.
- *
- * \returns non-zero if tag is self-closing (for example, <br />).
- */
-CINDEX_LINKAGE
-unsigned clang_HTMLStartTagComment_isSelfClosing(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_HTMLStartTag AST node.
- *
- * \returns number of attributes (name-value pairs) attached to the start tag.
- */
-CINDEX_LINKAGE unsigned clang_HTMLStartTag_getNumAttrs(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_HTMLStartTag AST node.
- *
- * \param AttrIdx attribute index (zero-based).
- *
- * \returns name of the specified attribute.
- */
-CINDEX_LINKAGE
-CXString clang_HTMLStartTag_getAttrName(CXComment Comment, unsigned AttrIdx);
-
-/**
- * \param Comment a \c CXComment_HTMLStartTag AST node.
- *
- * \param AttrIdx attribute index (zero-based).
- *
- * \returns value of the specified attribute.
- */
-CINDEX_LINKAGE
-CXString clang_HTMLStartTag_getAttrValue(CXComment Comment, unsigned AttrIdx);
-
-/**
- * \param Comment a \c CXComment_BlockCommand AST node.
- *
- * \returns name of the block command.
- */
-CINDEX_LINKAGE
-CXString clang_BlockCommandComment_getCommandName(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_BlockCommand AST node.
- *
- * \returns number of word-like arguments.
- */
-CINDEX_LINKAGE
-unsigned clang_BlockCommandComment_getNumArgs(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_BlockCommand AST node.
- *
- * \param ArgIdx argument index (zero-based).
- *
- * \returns text of the specified word-like argument.
- */
-CINDEX_LINKAGE
-CXString clang_BlockCommandComment_getArgText(CXComment Comment,
-                                              unsigned ArgIdx);
-
-/**
- * \param Comment a \c CXComment_BlockCommand or
- * \c CXComment_VerbatimBlockCommand AST node.
- *
- * \returns paragraph argument of the block command.
- */
-CINDEX_LINKAGE
-CXComment clang_BlockCommandComment_getParagraph(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_ParamCommand AST node.
- *
- * \returns parameter name.
- */
-CINDEX_LINKAGE
-CXString clang_ParamCommandComment_getParamName(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_ParamCommand AST node.
- *
- * \returns non-zero if the parameter that this AST node represents was found
- * in the function prototype and \c clang_ParamCommandComment_getParamIndex
- * function will return a meaningful value.
- */
-CINDEX_LINKAGE
-unsigned clang_ParamCommandComment_isParamIndexValid(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_ParamCommand AST node.
- *
- * \returns zero-based parameter index in function prototype.
- */
-CINDEX_LINKAGE
-unsigned clang_ParamCommandComment_getParamIndex(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_ParamCommand AST node.
- *
- * \returns non-zero if parameter passing direction was specified explicitly in
- * the comment.
- */
-CINDEX_LINKAGE
-unsigned clang_ParamCommandComment_isDirectionExplicit(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_ParamCommand AST node.
- *
- * \returns parameter passing direction.
- */
-CINDEX_LINKAGE
-enum CXCommentParamPassDirection clang_ParamCommandComment_getDirection(
-                                                            CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_TParamCommand AST node.
- *
- * \returns template parameter name.
- */
-CINDEX_LINKAGE
-CXString clang_TParamCommandComment_getParamName(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_TParamCommand AST node.
- *
- * \returns non-zero if the parameter that this AST node represents was found
- * in the template parameter list and
- * \c clang_TParamCommandComment_getDepth and
- * \c clang_TParamCommandComment_getIndex functions will return a meaningful
- * value.
- */
-CINDEX_LINKAGE
-unsigned clang_TParamCommandComment_isParamPositionValid(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_TParamCommand AST node.
- *
- * \returns zero-based nesting depth of this parameter in the template parameter list.
- *
- * For example,
- * \verbatim
- *     template<typename C, template<typename T> class TT>
- *     void test(TT<int> aaa);
- * \endverbatim
- * for C and TT nesting depth is 0,
- * for T nesting depth is 1.
- */
-CINDEX_LINKAGE
-unsigned clang_TParamCommandComment_getDepth(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_TParamCommand AST node.
- *
- * \returns zero-based parameter index in the template parameter list at a
- * given nesting depth.
- *
- * For example,
- * \verbatim
- *     template<typename C, template<typename T> class TT>
- *     void test(TT<int> aaa);
- * \endverbatim
- * for C and TT nesting depth is 0, so we can ask for index at depth 0:
- * at depth 0 C's index is 0, TT's index is 1.
- *
- * For T nesting depth is 1, so we can ask for index at depth 0 and 1:
- * at depth 0 T's index is 1 (same as TT's),
- * at depth 1 T's index is 0.
- */
-CINDEX_LINKAGE
-unsigned clang_TParamCommandComment_getIndex(CXComment Comment, unsigned Depth);
-
-/**
- * \param Comment a \c CXComment_VerbatimBlockLine AST node.
- *
- * \returns text contained in the AST node.
- */
-CINDEX_LINKAGE
-CXString clang_VerbatimBlockLineComment_getText(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_VerbatimLine AST node.
- *
- * \returns text contained in the AST node.
- */
-CINDEX_LINKAGE CXString clang_VerbatimLineComment_getText(CXComment Comment);
-
-/**
- * \brief Convert an HTML tag AST node to string.
- *
- * \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST
- * node.
- *
- * \returns string containing an HTML tag.
- */
-CINDEX_LINKAGE CXString clang_HTMLTagComment_getAsString(CXComment Comment);
-
-/**
- * \brief Convert a given full parsed comment to an HTML fragment.
- *
- * Specific details of HTML layout are subject to change.  Don't try to parse
- * this HTML back into an AST, use other APIs instead.
- *
- * Currently the following CSS classes are used:
- * \li "para-brief" for \\brief paragraph and equivalent commands;
- * \li "para-returns" for \\returns paragraph and equivalent commands;
- * \li "word-returns" for the "Returns" word in \\returns paragraph.
- *
- * Function argument documentation is rendered as a \<dl\> list with arguments
- * sorted in function prototype order.  CSS classes used:
- * \li "param-name-index-NUMBER" for parameter name (\<dt\>);
- * \li "param-descr-index-NUMBER" for parameter description (\<dd\>);
- * \li "param-name-index-invalid" and "param-descr-index-invalid" are used if
- * parameter index is invalid.
- *
- * Template parameter documentation is rendered as a \<dl\> list with
- * parameters sorted in template parameter list order.  CSS classes used:
- * \li "tparam-name-index-NUMBER" for parameter name (\<dt\>);
- * \li "tparam-descr-index-NUMBER" for parameter description (\<dd\>);
- * \li "tparam-name-index-other" and "tparam-descr-index-other" are used for
- * names inside template template parameters;
- * \li "tparam-name-index-invalid" and "tparam-descr-index-invalid" are used if
- * parameter position is invalid.
- *
- * \param Comment a \c CXComment_FullComment AST node.
- *
- * \returns string containing an HTML fragment.
- */
-CINDEX_LINKAGE CXString clang_FullComment_getAsHTML(CXComment Comment);
-
-/**
- * \brief Convert a given full parsed comment to an XML document.
- *
- * A Relax NG schema for the XML can be found in comment-xml-schema.rng file
- * inside clang source tree.
- *
- * \param Comment a \c CXComment_FullComment AST node.
- *
- * \returns string containing an XML document.
- */
-CINDEX_LINKAGE CXString clang_FullComment_getAsXML(CXComment Comment);
-
-/**
- * @}
- */
-
-/**
  * \defgroup CINDEX_CPP C++ AST introspection
  *
  * The routines in this group provide access information in the ASTs specific
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index ca1a906..cc578ca 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -17,7 +17,6 @@
 
 #include "clang/AST/ASTTypeTraits.h"
 #include "clang/AST/CanonicalType.h"
-#include "clang/AST/CommentCommandTraits.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/NestedNameSpecifier.h"
 #include "clang/AST/PrettyPrinter.h"
@@ -70,10 +69,6 @@ namespace clang {
 
   namespace Builtin { class Context; }
 
-  namespace comments {
-    class FullComment;
-  }
-
 /// \brief Holds long-lived AST nodes (such as types and decls) that can be
 /// referred to throughout the semantic analysis of a file.
 class ASTContext : public RefCountedBase<ASTContext> {
@@ -607,25 +602,7 @@ public:
                                       const Decl *D,
                                       const Decl **OriginalDecl = NULL) const;
 
-  /// Return parsed documentation comment attached to a given declaration.
-  /// Returns NULL if no comment is attached.
-  ///
-  /// \param PP the Preprocessor used with this TU.  Could be NULL if
-  /// preprocessor is not available.
-  comments::FullComment *getCommentForDecl(const Decl *D,
-                                           const Preprocessor *PP) const;
-
-  /// Return parsed documentation comment attached to a given declaration.
-  /// Returns NULL if no comment is attached. Does not look at any
-  /// redeclarations of the declaration.
-  comments::FullComment *getLocalCommentForDeclUncached(const Decl *D) const;
-
-  comments::FullComment *cloneFullComment(comments::FullComment *FC,
-                                         const Decl *D) const;
-
 private:
-  mutable comments::CommandTraits CommentCommandTraits;
-
   /// \brief Iterator that visits import declarations.
   class import_iterator {
     ImportDecl *Import;
@@ -664,10 +641,6 @@ private:
   };
 
 public:
-  comments::CommandTraits &getCommentCommandTraits() const {
-    return CommentCommandTraits;
-  }
-
   /// \brief Retrieve the attributes for the given declaration.
   AttrVec& getDeclAttrs(const Decl *D);
 
diff --git a/include/clang/AST/CMakeLists.txt b/include/clang/AST/CMakeLists.txt
index 260734f..a4c3c4e 100644
--- a/include/clang/AST/CMakeLists.txt
+++ b/include/clang/AST/CMakeLists.txt
@@ -25,28 +25,3 @@ clang_tablegen(StmtNodes.inc -gen-clang-stmt-nodes
 clang_tablegen(DeclNodes.inc -gen-clang-decl-nodes
   SOURCE ../Basic/DeclNodes.td
   TARGET ClangDeclNodes)
-
-clang_tablegen(CommentNodes.inc -gen-clang-comment-nodes
-  SOURCE ../Basic/CommentNodes.td
-  TARGET ClangCommentNodes)
-
-clang_tablegen(CommentHTMLTags.inc -gen-clang-comment-html-tags
-  SOURCE CommentHTMLTags.td
-  TARGET ClangCommentHTMLTags)
-
-clang_tablegen(CommentHTMLTagsProperties.inc -gen-clang-comment-html-tags-properties
-  SOURCE CommentHTMLTags.td
-  TARGET ClangCommentHTMLTagsProperties)
-
-clang_tablegen(CommentHTMLNamedCharacterReferences.inc -gen-clang-comment-html-named-character-references
-  SOURCE CommentHTMLNamedCharacterReferences.td
-  TARGET ClangCommentHTMLNamedCharacterReferences)
-
-clang_tablegen(CommentCommandInfo.inc -gen-clang-comment-command-info
-  SOURCE CommentCommands.td
-  TARGET ClangCommentCommandInfo)
-
-clang_tablegen(CommentCommandList.inc -gen-clang-comment-command-list
-  SOURCE CommentCommands.td
-  TARGET ClangCommentCommandList)
-
diff --git a/include/clang/AST/Comment.h b/include/clang/AST/Comment.h
deleted file mode 100644
index 90dfb25..0000000
--- a/include/clang/AST/Comment.h
+++ /dev/null
@@ -1,1141 +0,0 @@
-//===--- Comment.h - Comment AST nodes --------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines comment AST nodes.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_AST_COMMENT_H
-#define LLVM_CLANG_AST_COMMENT_H
-
-#include "clang/AST/CommentCommandTraits.h"
-#include "clang/AST/DeclObjC.h"
-#include "clang/AST/Type.h"
-#include "clang/Basic/SourceLocation.h"
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/StringRef.h"
-
-namespace clang {
-class Decl;
-class ParmVarDecl;
-class TemplateParameterList;
-
-namespace comments {
-class FullComment;
-
-/// Describes the syntax that was used in a documentation command.
-///
-/// Exact values of this enumeration are important because they used to select
-/// parts of diagnostic messages.  Audit diagnostics before changing or adding
-/// a new value.
-enum CommandMarkerKind {
-  /// Command started with a backslash character:
-  /// \code
-  ///   \foo
-  /// \endcode
-  CMK_Backslash = 0,
-
-  /// Command started with an 'at' character:
-  /// \code
-  ///   @foo
-  /// \endcode
-  CMK_At = 1
-};
-
-/// Any part of the comment.
-/// Abstract class.
-class Comment {
-protected:
-  /// Preferred location to show caret.
-  SourceLocation Loc;
-
-  /// Source range of this AST node.
-  SourceRange Range;
-
-  class CommentBitfields {
-    friend class Comment;
-
-    /// Type of this AST node.
-    unsigned Kind : 8;
-  };
-  enum { NumCommentBits = 8 };
-
-  class InlineContentCommentBitfields {
-    friend class InlineContentComment;
-
-    unsigned : NumCommentBits;
-
-    /// True if there is a newline after this inline content node.
-    /// (There is no separate AST node for a newline.)
-    unsigned HasTrailingNewline : 1;
-  };
-  enum { NumInlineContentCommentBits = NumCommentBits + 1 };
-
-  class TextCommentBitfields {
-    friend class TextComment;
-
-    unsigned : NumInlineContentCommentBits;
-
-    /// True if \c IsWhitespace field contains a valid value.
-    mutable unsigned IsWhitespaceValid : 1;
-
-    /// True if this comment AST node contains only whitespace.
-    mutable unsigned IsWhitespace : 1;
-  };
-  enum { NumTextCommentBits = NumInlineContentCommentBits + 2 };
-
-  class InlineCommandCommentBitfields {
-    friend class InlineCommandComment;
-
-    unsigned : NumInlineContentCommentBits;
-
-    unsigned RenderKind : 2;
-    unsigned CommandID : 8;
-  };
-  enum { NumInlineCommandCommentBits = NumInlineContentCommentBits + 10 };
-
-  class HTMLTagCommentBitfields {
-    friend class HTMLTagComment;
-
-    unsigned : NumInlineContentCommentBits;
-
-    /// True if this tag is safe to pass through to HTML output even if the
-    /// comment comes from an untrusted source.
-    unsigned IsSafeToPassThrough : 1;
-  };
-  enum { NumHTMLTagCommentBits = NumInlineContentCommentBits + 1 };
-
-  class HTMLStartTagCommentBitfields {
-    friend class HTMLStartTagComment;
-
-    unsigned : NumHTMLTagCommentBits;
-
-    /// True if this tag is self-closing (e. g., <br />).  This is based on tag
-    /// spelling in comment (plain <br> would not set this flag).
-    unsigned IsSelfClosing : 1;
-  };
-  enum { NumHTMLStartTagCommentBits = NumHTMLTagCommentBits + 1 };
-
-  class ParagraphCommentBitfields {
-    friend class ParagraphComment;
-
-    unsigned : NumCommentBits;
-
-    /// True if \c IsWhitespace field contains a valid value.
-    mutable unsigned IsWhitespaceValid : 1;
-
-    /// True if this comment AST node contains only whitespace.
-    mutable unsigned IsWhitespace : 1;
-  };
-  enum { NumParagraphCommentBits = NumCommentBits + 2 };
-
-  class BlockCommandCommentBitfields {
-    friend class BlockCommandComment;
-
-    unsigned : NumCommentBits;
-
-    unsigned CommandID : 8;
-
-    /// Describes the syntax that was used in a documentation command.
-    /// Contains values from CommandMarkerKind enum.
-    unsigned CommandMarker : 1;
-  };
-  enum { NumBlockCommandCommentBits = NumCommentBits + 9 };
-
-  class ParamCommandCommentBitfields {
-    friend class ParamCommandComment;
-
-    unsigned : NumBlockCommandCommentBits;
-
-    /// Parameter passing direction, see ParamCommandComment::PassDirection.
-    unsigned Direction : 2;
-
-    /// True if direction was specified explicitly in the comment.
-    unsigned IsDirectionExplicit : 1;
-  };
-  enum { NumParamCommandCommentBits = NumBlockCommandCommentBits + 3 };
-
-  union {
-    CommentBitfields CommentBits;
-    InlineContentCommentBitfields InlineContentCommentBits;
-    TextCommentBitfields TextCommentBits;
-    InlineCommandCommentBitfields InlineCommandCommentBits;
-    HTMLTagCommentBitfields HTMLTagCommentBits;
-    HTMLStartTagCommentBitfields HTMLStartTagCommentBits;
-    ParagraphCommentBitfields ParagraphCommentBits;
-    BlockCommandCommentBitfields BlockCommandCommentBits;
-    ParamCommandCommentBitfields ParamCommandCommentBits;
-  };
-
-  void setSourceRange(SourceRange SR) {
-    Range = SR;
-  }
-
-  void setLocation(SourceLocation L) {
-    Loc = L;
-  }
-
-public:
-  enum CommentKind {
-    NoCommentKind = 0,
-#define COMMENT(CLASS, PARENT) CLASS##Kind,
-#define COMMENT_RANGE(BASE, FIRST, LAST) \
-    First##BASE##Constant=FIRST##Kind, Last##BASE##Constant=LAST##Kind,
-#define LAST_COMMENT_RANGE(BASE, FIRST, LAST) \
-    First##BASE##Constant=FIRST##Kind, Last##BASE##Constant=LAST##Kind
-#define ABSTRACT_COMMENT(COMMENT)
-#include "clang/AST/CommentNodes.inc"
-  };
-
-  Comment(CommentKind K,
-          SourceLocation LocBegin,
-          SourceLocation LocEnd) :
-      Loc(LocBegin), Range(SourceRange(LocBegin, LocEnd)) {
-    CommentBits.Kind = K;
-  }
-
-  CommentKind getCommentKind() const {
-    return static_cast<CommentKind>(CommentBits.Kind);
-  }
-
-  const char *getCommentKindName() const;
-
-  void dump() const;
-  void dumpColor() const;
-  void dump(const ASTContext &Context) const;
-  void dump(raw_ostream &OS, const CommandTraits *Traits,
-            const SourceManager *SM) const;
-
-  SourceRange getSourceRange() const LLVM_READONLY { return Range; }
-
-  SourceLocation getLocStart() const LLVM_READONLY {
-    return Range.getBegin();
-  }
-
-  SourceLocation getLocEnd() const LLVM_READONLY {
-    return Range.getEnd();
-  }
-
-  SourceLocation getLocation() const LLVM_READONLY { return Loc; }
-
-  typedef Comment * const *child_iterator;
-
-  child_iterator child_begin() const;
-  child_iterator child_end() const;
-
-  // TODO: const child iterator
-
-  unsigned child_count() const {
-    return child_end() - child_begin();
-  }
-};
-
-/// Inline content (contained within a block).
-/// Abstract class.
-class InlineContentComment : public Comment {
-protected:
-  InlineContentComment(CommentKind K,
-                       SourceLocation LocBegin,
-                       SourceLocation LocEnd) :
-      Comment(K, LocBegin, LocEnd) {
-    InlineContentCommentBits.HasTrailingNewline = 0;
-  }
-
-public:
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() >= FirstInlineContentCommentConstant &&
-           C->getCommentKind() <= LastInlineContentCommentConstant;
-  }
-
-  void addTrailingNewline() {
-    InlineContentCommentBits.HasTrailingNewline = 1;
-  }
-
-  bool hasTrailingNewline() const {
-    return InlineContentCommentBits.HasTrailingNewline;
-  }
-};
-
-/// Plain text.
-class TextComment : public InlineContentComment {
-  StringRef Text;
-
-public:
-  TextComment(SourceLocation LocBegin,
-              SourceLocation LocEnd,
-              StringRef Text) :
-      InlineContentComment(TextCommentKind, LocBegin, LocEnd),
-      Text(Text) {
-    TextCommentBits.IsWhitespaceValid = false;
-  }
-
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() == TextCommentKind;
-  }
-
-  child_iterator child_begin() const { return NULL; }
-
-  child_iterator child_end() const { return NULL; }
-
-  StringRef getText() const LLVM_READONLY { return Text; }
-
-  bool isWhitespace() const {
-    if (TextCommentBits.IsWhitespaceValid)
-      return TextCommentBits.IsWhitespace;
-
-    TextCommentBits.IsWhitespace = isWhitespaceNoCache();
-    TextCommentBits.IsWhitespaceValid = true;
-    return TextCommentBits.IsWhitespace;
-  }
-
-private:
-  bool isWhitespaceNoCache() const;
-};
-
-/// A command with word-like arguments that is considered inline content.
-class InlineCommandComment : public InlineContentComment {
-public:
-  struct Argument {
-    SourceRange Range;
-    StringRef Text;
-
-    Argument(SourceRange Range, StringRef Text) : Range(Range), Text(Text) { }
-  };
-
-  /// The most appropriate rendering mode for this command, chosen on command
-  /// semantics in Doxygen.
-  enum RenderKind {
-    RenderNormal,
-    RenderBold,
-    RenderMonospaced,
-    RenderEmphasized
-  };
-
-protected:
-  /// Command arguments.
-  ArrayRef<Argument> Args;
-
-public:
-  InlineCommandComment(SourceLocation LocBegin,
-                       SourceLocation LocEnd,
-                       unsigned CommandID,
-                       RenderKind RK,
-                       ArrayRef<Argument> Args) :
-      InlineContentComment(InlineCommandCommentKind, LocBegin, LocEnd),
-      Args(Args) {
-    InlineCommandCommentBits.RenderKind = RK;
-    InlineCommandCommentBits.CommandID = CommandID;
-  }
-
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() == InlineCommandCommentKind;
-  }
-
-  child_iterator child_begin() const { return NULL; }
-
-  child_iterator child_end() const { return NULL; }
-
-  unsigned getCommandID() const {
-    return InlineCommandCommentBits.CommandID;
-  }
-
-  StringRef getCommandName(const CommandTraits &Traits) const {
-    return Traits.getCommandInfo(getCommandID())->Name;
-  }
-
-  SourceRange getCommandNameRange() const {
-    return SourceRange(getLocStart().getLocWithOffset(-1),
-                       getLocEnd());
-  }
-
-  RenderKind getRenderKind() const {
-    return static_cast<RenderKind>(InlineCommandCommentBits.RenderKind);
-  }
-
-  unsigned getNumArgs() const {
-    return Args.size();
-  }
-
-  StringRef getArgText(unsigned Idx) const {
-    return Args[Idx].Text;
-  }
-
-  SourceRange getArgRange(unsigned Idx) const {
-    return Args[Idx].Range;
-  }
-};
-
-/// Abstract class for opening and closing HTML tags.  HTML tags are always
-/// treated as inline content (regardless HTML semantics).
-class HTMLTagComment : public InlineContentComment {
-protected:
-  StringRef TagName;
-  SourceRange TagNameRange;
-
-  HTMLTagComment(CommentKind K,
-                 SourceLocation LocBegin,
-                 SourceLocation LocEnd,
-                 StringRef TagName,
-                 SourceLocation TagNameBegin,
-                 SourceLocation TagNameEnd) :
-      InlineContentComment(K, LocBegin, LocEnd),
-      TagName(TagName),
-      TagNameRange(TagNameBegin, TagNameEnd) {
-    setLocation(TagNameBegin);
-    HTMLTagCommentBits.IsSafeToPassThrough = 1;
-  }
-
-public:
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() >= FirstHTMLTagCommentConstant &&
-           C->getCommentKind() <= LastHTMLTagCommentConstant;
-  }
-
-  StringRef getTagName() const LLVM_READONLY { return TagName; }
-
-  SourceRange getTagNameSourceRange() const LLVM_READONLY {
-    SourceLocation L = getLocation();
-    return SourceRange(L.getLocWithOffset(1),
-                       L.getLocWithOffset(1 + TagName.size()));
-  }
-
-  bool isSafeToPassThrough() const {
-    return HTMLTagCommentBits.IsSafeToPassThrough;
-  }
-
-  void setUnsafeToPassThrough() {
-    HTMLTagCommentBits.IsSafeToPassThrough = 0;
-  }
-};
-
-/// An opening HTML tag with attributes.
-class HTMLStartTagComment : public HTMLTagComment {
-public:
-  class Attribute {
-  public:
-    SourceLocation NameLocBegin;
-    StringRef Name;
-
-    SourceLocation EqualsLoc;
-
-    SourceRange ValueRange;
-    StringRef Value;
-
-    Attribute() { }
-
-    Attribute(SourceLocation NameLocBegin, StringRef Name) :
-        NameLocBegin(NameLocBegin), Name(Name),
-        EqualsLoc(SourceLocation()),
-        ValueRange(SourceRange()), Value(StringRef())
-    { }
-
-    Attribute(SourceLocation NameLocBegin, StringRef Name,
-              SourceLocation EqualsLoc,
-              SourceRange ValueRange, StringRef Value) :
-        NameLocBegin(NameLocBegin), Name(Name),
-        EqualsLoc(EqualsLoc),
-        ValueRange(ValueRange), Value(Value)
-    { }
-
-    SourceLocation getNameLocEnd() const {
-      return NameLocBegin.getLocWithOffset(Name.size());
-    }
-
-    SourceRange getNameRange() const {
-      return SourceRange(NameLocBegin, getNameLocEnd());
-    }
-  };
-
-private:
-  ArrayRef<Attribute> Attributes;
-
-public:
-  HTMLStartTagComment(SourceLocation LocBegin,
-                      StringRef TagName) :
-      HTMLTagComment(HTMLStartTagCommentKind,
-                     LocBegin, LocBegin.getLocWithOffset(1 + TagName.size()),
-                     TagName,
-                     LocBegin.getLocWithOffset(1),
-                     LocBegin.getLocWithOffset(1 + TagName.size())) {
-    HTMLStartTagCommentBits.IsSelfClosing = false;
-  }
-
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() == HTMLStartTagCommentKind;
-  }
-
-  child_iterator child_begin() const { return NULL; }
-
-  child_iterator child_end() const { return NULL; }
-
-  unsigned getNumAttrs() const {
-    return Attributes.size();
-  }
-
-  const Attribute &getAttr(unsigned Idx) const {
-    return Attributes[Idx];
-  }
-
-  void setAttrs(ArrayRef<Attribute> Attrs) {
-    Attributes = Attrs;
-    if (!Attrs.empty()) {
-      const Attribute &Attr = Attrs.back();
-      SourceLocation L = Attr.ValueRange.getEnd();
-      if (L.isValid())
-        Range.setEnd(L);
-      else {
-        Range.setEnd(Attr.getNameLocEnd());
-      }
-    }
-  }
-
-  void setGreaterLoc(SourceLocation GreaterLoc) {
-    Range.setEnd(GreaterLoc);
-  }
-
-  bool isSelfClosing() const {
-    return HTMLStartTagCommentBits.IsSelfClosing;
-  }
-
-  void setSelfClosing() {
-    HTMLStartTagCommentBits.IsSelfClosing = true;
-  }
-};
-
-/// A closing HTML tag.
-class HTMLEndTagComment : public HTMLTagComment {
-public:
-  HTMLEndTagComment(SourceLocation LocBegin,
-                    SourceLocation LocEnd,
-                    StringRef TagName) :
-      HTMLTagComment(HTMLEndTagCommentKind,
-                     LocBegin, LocEnd,
-                     TagName,
-                     LocBegin.getLocWithOffset(2),
-                     LocBegin.getLocWithOffset(2 + TagName.size()))
-  { }
-
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() == HTMLEndTagCommentKind;
-  }
-
-  child_iterator child_begin() const { return NULL; }
-
-  child_iterator child_end() const { return NULL; }
-};
-
-/// Block content (contains inline content).
-/// Abstract class.
-class BlockContentComment : public Comment {
-protected:
-  BlockContentComment(CommentKind K,
-                      SourceLocation LocBegin,
-                      SourceLocation LocEnd) :
-      Comment(K, LocBegin, LocEnd)
-  { }
-
-public:
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() >= FirstBlockContentCommentConstant &&
-           C->getCommentKind() <= LastBlockContentCommentConstant;
-  }
-};
-
-/// A single paragraph that contains inline content.
-class ParagraphComment : public BlockContentComment {
-  ArrayRef<InlineContentComment *> Content;
-
-public:
-  ParagraphComment(ArrayRef<InlineContentComment *> Content) :
-      BlockContentComment(ParagraphCommentKind,
-                          SourceLocation(),
-                          SourceLocation()),
-      Content(Content) {
-    if (Content.empty()) {
-      ParagraphCommentBits.IsWhitespace = true;
-      ParagraphCommentBits.IsWhitespaceValid = true;
-      return;
-    }
-
-    ParagraphCommentBits.IsWhitespaceValid = false;
-
-    setSourceRange(SourceRange(Content.front()->getLocStart(),
-                               Content.back()->getLocEnd()));
-    setLocation(Content.front()->getLocStart());
-  }
-
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() == ParagraphCommentKind;
-  }
-
-  child_iterator child_begin() const {
-    return reinterpret_cast<child_iterator>(Content.begin());
-  }
-
-  child_iterator child_end() const {
-    return reinterpret_cast<child_iterator>(Content.end());
-  }
-
-  bool isWhitespace() const {
-    if (ParagraphCommentBits.IsWhitespaceValid)
-      return ParagraphCommentBits.IsWhitespace;
-
-    ParagraphCommentBits.IsWhitespace = isWhitespaceNoCache();
-    ParagraphCommentBits.IsWhitespaceValid = true;
-    return ParagraphCommentBits.IsWhitespace;
-  }
-
-private:
-  bool isWhitespaceNoCache() const;
-};
-
-/// A command that has zero or more word-like arguments (number of word-like
-/// arguments depends on command name) and a paragraph as an argument
-/// (e. g., \\brief).
-class BlockCommandComment : public BlockContentComment {
-public:
-  struct Argument {
-    SourceRange Range;
-    StringRef Text;
-
-    Argument() { }
-    Argument(SourceRange Range, StringRef Text) : Range(Range), Text(Text) { }
-  };
-
-protected:
-  /// Word-like arguments.
-  ArrayRef<Argument> Args;
-
-  /// Paragraph argument.
-  ParagraphComment *Paragraph;
-
-  BlockCommandComment(CommentKind K,
-                      SourceLocation LocBegin,
-                      SourceLocation LocEnd,
-                      unsigned CommandID,
-                      CommandMarkerKind CommandMarker) :
-      BlockContentComment(K, LocBegin, LocEnd),
-      Paragraph(NULL) {
-    setLocation(getCommandNameBeginLoc());
-    BlockCommandCommentBits.CommandID = CommandID;
-    BlockCommandCommentBits.CommandMarker = CommandMarker;
-  }
-
-public:
-  BlockCommandComment(SourceLocation LocBegin,
-                      SourceLocation LocEnd,
-                      unsigned CommandID,
-                      CommandMarkerKind CommandMarker) :
-      BlockContentComment(BlockCommandCommentKind, LocBegin, LocEnd),
-      Paragraph(NULL) {
-    setLocation(getCommandNameBeginLoc());
-    BlockCommandCommentBits.CommandID = CommandID;
-    BlockCommandCommentBits.CommandMarker = CommandMarker;
-  }
-
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() >= FirstBlockCommandCommentConstant &&
-           C->getCommentKind() <= LastBlockCommandCommentConstant;
-  }
-
-  child_iterator child_begin() const {
-    return reinterpret_cast<child_iterator>(&Paragraph);
-  }
-
-  child_iterator child_end() const {
-    return reinterpret_cast<child_iterator>(&Paragraph + 1);
-  }
-
-  unsigned getCommandID() const {
-    return BlockCommandCommentBits.CommandID;
-  }
-
-  StringRef getCommandName(const CommandTraits &Traits) const {
-    return Traits.getCommandInfo(getCommandID())->Name;
-  }
-
-  SourceLocation getCommandNameBeginLoc() const {
-    return getLocStart().getLocWithOffset(1);
-  }
-
-  SourceRange getCommandNameRange(const CommandTraits &Traits) const {
-    StringRef Name = getCommandName(Traits);
-    return SourceRange(getCommandNameBeginLoc(),
-                       getLocStart().getLocWithOffset(1 + Name.size()));
-  }
-
-  unsigned getNumArgs() const {
-    return Args.size();
-  }
-
-  StringRef getArgText(unsigned Idx) const {
-    return Args[Idx].Text;
-  }
-
-  SourceRange getArgRange(unsigned Idx) const {
-    return Args[Idx].Range;
-  }
-
-  void setArgs(ArrayRef<Argument> A) {
-    Args = A;
-    if (Args.size() > 0) {
-      SourceLocation NewLocEnd = Args.back().Range.getEnd();
-      if (NewLocEnd.isValid())
-        setSourceRange(SourceRange(getLocStart(), NewLocEnd));
-    }
-  }
-
-  ParagraphComment *getParagraph() const LLVM_READONLY {
-    return Paragraph;
-  }
-
-  bool hasNonWhitespaceParagraph() const {
-    return Paragraph && !Paragraph->isWhitespace();
-  }
-
-  void setParagraph(ParagraphComment *PC) {
-    Paragraph = PC;
-    SourceLocation NewLocEnd = PC->getLocEnd();
-    if (NewLocEnd.isValid())
-      setSourceRange(SourceRange(getLocStart(), NewLocEnd));
-  }
-
-  CommandMarkerKind getCommandMarker() const LLVM_READONLY {
-    return static_cast<CommandMarkerKind>(
-        BlockCommandCommentBits.CommandMarker);
-  }
-};
-
-/// Doxygen \\param command.
-class ParamCommandComment : public BlockCommandComment {
-private:
-  /// Parameter index in the function declaration.
-  unsigned ParamIndex;
-
-public:
-  enum : unsigned {
-    InvalidParamIndex = ~0U,
-    VarArgParamIndex = ~0U/*InvalidParamIndex*/ - 1U
-  };
-
-  ParamCommandComment(SourceLocation LocBegin,
-                      SourceLocation LocEnd,
-                      unsigned CommandID,
-                      CommandMarkerKind CommandMarker) :
-      BlockCommandComment(ParamCommandCommentKind, LocBegin, LocEnd,
-                          CommandID, CommandMarker),
-      ParamIndex(InvalidParamIndex) {
-    ParamCommandCommentBits.Direction = In;
-    ParamCommandCommentBits.IsDirectionExplicit = false;
-  }
-
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() == ParamCommandCommentKind;
-  }
-
-  enum PassDirection {
-    In,
-    Out,
-    InOut
-  };
-
-  static const char *getDirectionAsString(PassDirection D);
-
-  PassDirection getDirection() const LLVM_READONLY {
-    return static_cast<PassDirection>(ParamCommandCommentBits.Direction);
-  }
-
-  bool isDirectionExplicit() const LLVM_READONLY {
-    return ParamCommandCommentBits.IsDirectionExplicit;
-  }
-
-  void setDirection(PassDirection Direction, bool Explicit) {
-    ParamCommandCommentBits.Direction = Direction;
-    ParamCommandCommentBits.IsDirectionExplicit = Explicit;
-  }
-
-  bool hasParamName() const {
-    return getNumArgs() > 0;
-  }
-
-  StringRef getParamName(const FullComment *FC) const;
-
-  StringRef getParamNameAsWritten() const {
-    return Args[0].Text;
-  }
-
-  SourceRange getParamNameRange() const {
-    return Args[0].Range;
-  }
-
-  bool isParamIndexValid() const LLVM_READONLY {
-    return ParamIndex != InvalidParamIndex;
-  }
-
-  bool isVarArgParam() const LLVM_READONLY {
-    return ParamIndex == VarArgParamIndex;
-  }
-
-  void setIsVarArgParam() {
-    ParamIndex = VarArgParamIndex;
-    assert(isParamIndexValid());
-  }
-
-  unsigned getParamIndex() const LLVM_READONLY {
-    assert(isParamIndexValid());
-    assert(!isVarArgParam());
-    return ParamIndex;
-  }
-
-  void setParamIndex(unsigned Index) {
-    ParamIndex = Index;
-    assert(isParamIndexValid());
-    assert(!isVarArgParam());
-  }
-};
-
-/// Doxygen \\tparam command, describes a template parameter.
-class TParamCommandComment : public BlockCommandComment {
-private:
-  /// If this template parameter name was resolved (found in template parameter
-  /// list), then this stores a list of position indexes in all template
-  /// parameter lists.
-  ///
-  /// For example:
-  /// \verbatim
-  ///     template<typename C, template<typename T> class TT>
-  ///     void test(TT<int> aaa);
-  /// \endverbatim
-  /// For C:  Position = { 0 }
-  /// For TT: Position = { 1 }
-  /// For T:  Position = { 1, 0 }
-  ArrayRef<unsigned> Position;
-
-public:
-  TParamCommandComment(SourceLocation LocBegin,
-                       SourceLocation LocEnd,
-                       unsigned CommandID,
-                       CommandMarkerKind CommandMarker) :
-      BlockCommandComment(TParamCommandCommentKind, LocBegin, LocEnd, CommandID,
-                          CommandMarker)
-  { }
-
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() == TParamCommandCommentKind;
-  }
-
-  bool hasParamName() const {
-    return getNumArgs() > 0;
-  }
-
-  StringRef getParamName(const FullComment *FC) const;
-
-  StringRef getParamNameAsWritten() const {
-    return Args[0].Text;
-  }
-
-  SourceRange getParamNameRange() const {
-    return Args[0].Range;
-  }
-
-  bool isPositionValid() const LLVM_READONLY {
-    return !Position.empty();
-  }
-
-  unsigned getDepth() const {
-    assert(isPositionValid());
-    return Position.size();
-  }
-
-  unsigned getIndex(unsigned Depth) const {
-    assert(isPositionValid());
-    return Position[Depth];
-  }
-
-  void setPosition(ArrayRef<unsigned> NewPosition) {
-    Position = NewPosition;
-    assert(isPositionValid());
-  }
-};
-
-/// A line of text contained in a verbatim block.
-class VerbatimBlockLineComment : public Comment {
-  StringRef Text;
-
-public:
-  VerbatimBlockLineComment(SourceLocation LocBegin,
-                           StringRef Text) :
-      Comment(VerbatimBlockLineCommentKind,
-              LocBegin,
-              LocBegin.getLocWithOffset(Text.size())),
-      Text(Text)
-  { }
-
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() == VerbatimBlockLineCommentKind;
-  }
-
-  child_iterator child_begin() const { return NULL; }
-
-  child_iterator child_end() const { return NULL; }
-
-  StringRef getText() const LLVM_READONLY {
-    return Text;
-  }
-};
-
-/// A verbatim block command (e. g., preformatted code).  Verbatim block has an
-/// opening and a closing command and contains multiple lines of text
-/// (VerbatimBlockLineComment nodes).
-class VerbatimBlockComment : public BlockCommandComment {
-protected:
-  StringRef CloseName;
-  SourceLocation CloseNameLocBegin;
-  ArrayRef<VerbatimBlockLineComment *> Lines;
-
-public:
-  VerbatimBlockComment(SourceLocation LocBegin,
-                       SourceLocation LocEnd,
-                       unsigned CommandID) :
-      BlockCommandComment(VerbatimBlockCommentKind,
-                          LocBegin, LocEnd, CommandID,
-                          CMK_At) // FIXME: improve source fidelity.
-  { }
-
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() == VerbatimBlockCommentKind;
-  }
-
-  child_iterator child_begin() const {
-    return reinterpret_cast<child_iterator>(Lines.begin());
-  }
-
-  child_iterator child_end() const {
-    return reinterpret_cast<child_iterator>(Lines.end());
-  }
-
-  void setCloseName(StringRef Name, SourceLocation LocBegin) {
-    CloseName = Name;
-    CloseNameLocBegin = LocBegin;
-  }
-
-  void setLines(ArrayRef<VerbatimBlockLineComment *> L) {
-    Lines = L;
-  }
-
-  StringRef getCloseName() const {
-    return CloseName;
-  }
-
-  unsigned getNumLines() const {
-    return Lines.size();
-  }
-
-  StringRef getText(unsigned LineIdx) const {
-    return Lines[LineIdx]->getText();
-  }
-};
-
-/// A verbatim line command.  Verbatim line has an opening command, a single
-/// line of text (up to the newline after the opening command) and has no
-/// closing command.
-class VerbatimLineComment : public BlockCommandComment {
-protected:
-  StringRef Text;
-  SourceLocation TextBegin;
-
-public:
-  VerbatimLineComment(SourceLocation LocBegin,
-                      SourceLocation LocEnd,
-                      unsigned CommandID,
-                      SourceLocation TextBegin,
-                      StringRef Text) :
-      BlockCommandComment(VerbatimLineCommentKind,
-                          LocBegin, LocEnd,
-                          CommandID,
-                          CMK_At), // FIXME: improve source fidelity.
-      Text(Text),
-      TextBegin(TextBegin)
-  { }
-
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() == VerbatimLineCommentKind;
-  }
-
-  child_iterator child_begin() const { return NULL; }
-
-  child_iterator child_end() const { return NULL; }
-
-  StringRef getText() const {
-    return Text;
-  }
-
-  SourceRange getTextRange() const {
-    return SourceRange(TextBegin, getLocEnd());
-  }
-};
-
-/// Information about the declaration, useful to clients of FullComment.
-struct DeclInfo {
-  /// Declaration the comment is actually attached to (in the source).
-  /// Should not be NULL.
-  const Decl *CommentDecl;
-  
-  /// CurrentDecl is the declaration with which the FullComment is associated.
-  ///
-  /// It can be different from \c CommentDecl.  It happens when we we decide
-  /// that the comment originally attached to \c CommentDecl is fine for
-  /// \c CurrentDecl too (for example, for a redeclaration or an overrider of
-  /// \c CommentDecl).
-  ///
-  /// The information in the DeclInfo corresponds to CurrentDecl.
-  const Decl *CurrentDecl;
-  
-  /// Parameters that can be referenced by \\param if \c CommentDecl is something
-  /// that we consider a "function".
-  ArrayRef<const ParmVarDecl *> ParamVars;
-
-  /// Function return type if \c CommentDecl is something that we consider
-  /// a "function".
-  QualType ReturnType;
-
-  /// Template parameters that can be referenced by \\tparam if \c CommentDecl is
-  /// a template (\c IsTemplateDecl or \c IsTemplatePartialSpecialization is
-  /// true).
-  const TemplateParameterList *TemplateParameters;
-
-  /// A simplified description of \c CommentDecl kind that should be good enough
-  /// for documentation rendering purposes.
-  enum DeclKind {
-    /// Everything else not explicitly mentioned below.
-    OtherKind,
-
-    /// Something that we consider a "function":
-    /// \li function,
-    /// \li function template,
-    /// \li function template specialization,
-    /// \li member function,
-    /// \li member function template,
-    /// \li member function template specialization,
-    /// \li ObjC method,
-    /// \li a typedef for a function pointer, member function pointer,
-    ///     ObjC block.
-    FunctionKind,
-
-    /// Something that we consider a "class":
-    /// \li class/struct,
-    /// \li class template,
-    /// \li class template (partial) specialization.
-    ClassKind,
-
-    /// Something that we consider a "variable":
-    /// \li namespace scope variables;
-    /// \li static and non-static class data members;
-    /// \li enumerators.
-    VariableKind,
-
-    /// A C++ namespace.
-    NamespaceKind,
-
-    /// A C++ typedef-name (a 'typedef' decl specifier or alias-declaration),
-    /// see \c TypedefNameDecl.
-    TypedefKind,
-
-    /// An enumeration or scoped enumeration.
-    EnumKind
-  };
-
-  /// What kind of template specialization \c CommentDecl is.
-  enum TemplateDeclKind {
-    NotTemplate,
-    Template,
-    TemplateSpecialization,
-    TemplatePartialSpecialization
-  };
-
-  /// If false, only \c CommentDecl is valid.
-  unsigned IsFilled : 1;
-
-  /// Simplified kind of \c CommentDecl, see \c DeclKind enum.
-  unsigned Kind : 3;
-
-  /// Is \c CommentDecl a template declaration.
-  unsigned TemplateKind : 2;
-
-  /// Is \c CommentDecl an ObjCMethodDecl.
-  unsigned IsObjCMethod : 1;
-
-  /// Is \c CommentDecl a non-static member function of C++ class or
-  /// instance method of ObjC class.
-  /// Can be true only if \c IsFunctionDecl is true.
-  unsigned IsInstanceMethod : 1;
-
-  /// Is \c CommentDecl a static member function of C++ class or
-  /// class method of ObjC class.
-  /// Can be true only if \c IsFunctionDecl is true.
-  unsigned IsClassMethod : 1;
-
-  void fill();
-
-  DeclKind getKind() const LLVM_READONLY {
-    return static_cast<DeclKind>(Kind);
-  }
-
-  TemplateDeclKind getTemplateKind() const LLVM_READONLY {
-    return static_cast<TemplateDeclKind>(TemplateKind);
-  }
-};
-
-/// A full comment attached to a declaration, contains block content.
-class FullComment : public Comment {
-  ArrayRef<BlockContentComment *> Blocks;
-  DeclInfo *ThisDeclInfo;
-
-public:
-  FullComment(ArrayRef<BlockContentComment *> Blocks, DeclInfo *D) :
-      Comment(FullCommentKind, SourceLocation(), SourceLocation()),
-      Blocks(Blocks), ThisDeclInfo(D) {
-    if (Blocks.empty())
-      return;
-
-    setSourceRange(SourceRange(Blocks.front()->getLocStart(),
-                               Blocks.back()->getLocEnd()));
-    setLocation(Blocks.front()->getLocStart());
-  }
-
-  static bool classof(const Comment *C) {
-    return C->getCommentKind() == FullCommentKind;
-  }
-
-  child_iterator child_begin() const {
-    return reinterpret_cast<child_iterator>(Blocks.begin());
-  }
-
-  child_iterator child_end() const {
-    return reinterpret_cast<child_iterator>(Blocks.end()); 
-  }
-
-  const Decl *getDecl() const LLVM_READONLY {
-    return ThisDeclInfo->CommentDecl;
-  }
-  
-  const DeclInfo *getDeclInfo() const LLVM_READONLY {
-    if (!ThisDeclInfo->IsFilled)
-      ThisDeclInfo->fill();
-    return ThisDeclInfo;
-  }
-  
-  ArrayRef<BlockContentComment *> getBlocks() const { return Blocks; }
-  
-};
-} // end namespace comments
-} // end namespace clang
-
-#endif
-
diff --git a/include/clang/AST/CommentBriefParser.h b/include/clang/AST/CommentBriefParser.h
deleted file mode 100644
index 5d50886..0000000
--- a/include/clang/AST/CommentBriefParser.h
+++ /dev/null
@@ -1,55 +0,0 @@
-//===--- CommentBriefParser.h - Dumb comment parser -------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines a very simple Doxygen comment parser.
-//
-//===----------------------------------------------------------------------===//
-
-
-#ifndef LLVM_CLANG_AST_BRIEF_COMMENT_PARSER_H
-#define LLVM_CLANG_AST_BRIEF_COMMENT_PARSER_H
-
-#include "clang/AST/CommentLexer.h"
-
-namespace clang {
-namespace comments {
-
-/// A very simple comment parser that extracts "a brief description".
-///
-/// Due to a variety of comment styles, it considers the following as "a brief
-/// description", in order of priority:
-/// \li a \\brief or \\short command,
-/// \li the first paragraph,
-/// \li a \\result or \\return or \\returns paragraph.
-class BriefParser {
-  Lexer &L;
-
-  const CommandTraits &Traits;
-
-  /// Current lookahead token.
-  Token Tok;
-
-  SourceLocation ConsumeToken() {
-    SourceLocation Loc = Tok.getLocation();
-    L.lex(Tok);
-    return Loc;
-  }
-
-public:
-  BriefParser(Lexer &L, const CommandTraits &Traits);
-
-  /// Return the best "brief description" we can find.
-  std::string Parse();
-};
-
-} // end namespace comments
-} // end namespace clang
-
-#endif
-
diff --git a/include/clang/AST/CommentCommandTraits.h b/include/clang/AST/CommentCommandTraits.h
deleted file mode 100644
index dde7a14..0000000
--- a/include/clang/AST/CommentCommandTraits.h
+++ /dev/null
@@ -1,185 +0,0 @@
-//===--- CommentCommandTraits.h - Comment command properties ----*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines the class that provides information about comment
-//  commands.
-//
-//===----------------------------------------------------------------------===//
-
-
-#ifndef LLVM_CLANG_AST_COMMENT_COMMAND_TRAITS_H
-#define LLVM_CLANG_AST_COMMENT_COMMAND_TRAITS_H
-
-#include "clang/Basic/CommentOptions.h"
-#include "clang/Basic/LLVM.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/Support/Allocator.h"
-#include "llvm/Support/ErrorHandling.h"
-
-namespace clang {
-namespace comments {
-
-/// \brief Information about a single command.
-///
-/// When reordering, adding or removing members please update the corresponding
-/// TableGen backend.
-struct CommandInfo {
-  unsigned getID() const {
-    return ID;
-  }
-
-  const char *Name;
-
-  /// Name of the command that ends the verbatim block.
-  const char *EndCommandName;
-
-  unsigned ID : 8;
-
-  /// Number of word-like arguments for a given block command, except for
-  /// \\param and \\tparam commands -- these have special argument parsers.
-  unsigned NumArgs : 4;
-
-  /// True if this command is a inline command (of any kind).
-  unsigned IsInlineCommand : 1;
-
-  /// True if this command is a block command (of any kind).
-  unsigned IsBlockCommand : 1;
-
-  /// True if this command is introducing a brief documentation
-  /// paragraph (\\brief or an alias).
-  unsigned IsBriefCommand : 1;
-
-  /// True if this command is \\returns or an alias.
-  unsigned IsReturnsCommand : 1;
-
-  /// True if this command is introducing documentation for a function
-  /// parameter (\\param or an alias).
-  unsigned IsParamCommand : 1;
-
-  /// True if this command is introducing documentation for
-  /// a template parameter (\\tparam or an alias).
-  unsigned IsTParamCommand : 1;
-
-  /// True if this command is \\throws or an alias.
-  unsigned IsThrowsCommand : 1;
-
-  /// True if this command is \\deprecated or an alias.
-  unsigned IsDeprecatedCommand : 1;
-
-  /// \brief True if this is a \\headerfile-like command.
-  unsigned IsHeaderfileCommand : 1;
-
-  /// True if we don't want to warn about this command being passed an empty
-  /// paragraph.  Meaningful only for block commands.
-  unsigned IsEmptyParagraphAllowed : 1;
-
-  /// \brief True if this command is a verbatim-like block command.
-  ///
-  /// A verbatim-like block command eats every character (except line starting
-  /// decorations) until matching end command is seen or comment end is hit.
-  unsigned IsVerbatimBlockCommand : 1;
-
-  /// \brief True if this command is an end command for a verbatim-like block.
-  unsigned IsVerbatimBlockEndCommand : 1;
-
-  /// \brief True if this command is a verbatim line command.
-  ///
-  /// A verbatim-like line command eats everything until a newline is seen or
-  /// comment end is hit.
-  unsigned IsVerbatimLineCommand : 1;
-
-  /// \brief True if this command contains a declaration for the entity being
-  /// documented.
-  ///
-  /// For example:
-  /// \code
-  ///   \fn void f(int a);
-  /// \endcode
-  unsigned IsDeclarationCommand : 1;
-  
-  /// \brief True if verbatim-like line command is a function declaration.
-  unsigned IsFunctionDeclarationCommand : 1;
-
-  /// \brief True if block command is further describing a container API; such
-  /// as \@coclass, \@classdesign, etc.
-  unsigned IsRecordLikeDetailCommand : 1;
-  
-  /// \brief True if block command is a container API; such as \@interface.
-  unsigned IsRecordLikeDeclarationCommand : 1;
-  
-  /// \brief True if this command is unknown.  This \c CommandInfo object was
-  /// created during parsing.
-  unsigned IsUnknownCommand : 1;
-};
-
-/// This class provides information about commands that can be used
-/// in comments.
-class CommandTraits {
-public:
-  enum KnownCommandIDs {
-#define COMMENT_COMMAND(NAME) KCI_##NAME,
-#include "clang/AST/CommentCommandList.inc"
-#undef COMMENT_COMMAND
-    KCI_Last
-  };
-
-  CommandTraits(llvm::BumpPtrAllocator &Allocator,
-                const CommentOptions &CommentOptions);
-
-  void registerCommentOptions(const CommentOptions &CommentOptions);
-
-  /// \returns a CommandInfo object for a given command name or
-  /// NULL if no CommandInfo object exists for this command.
-  const CommandInfo *getCommandInfoOrNULL(StringRef Name) const;
-
-  const CommandInfo *getCommandInfo(StringRef Name) const {
-    if (const CommandInfo *Info = getCommandInfoOrNULL(Name))
-      return Info;
-    llvm_unreachable("the command should be known");
-  }
-
-  const CommandInfo *getTypoCorrectCommandInfo(StringRef Typo) const;
-  
-  const CommandInfo *getCommandInfo(unsigned CommandID) const;
-
-  const CommandInfo *registerUnknownCommand(StringRef CommandName);
-
-  const CommandInfo *registerBlockCommand(StringRef CommandName);
-
-  /// \returns a CommandInfo object for a given command name or
-  /// NULL if \c Name is not a builtin command.
-  static const CommandInfo *getBuiltinCommandInfo(StringRef Name);
-
-  /// \returns a CommandInfo object for a given command ID or
-  /// NULL if \c CommandID is not a builtin command.
-  static const CommandInfo *getBuiltinCommandInfo(unsigned CommandID);
-
-private:
-  CommandTraits(const CommandTraits &) LLVM_DELETED_FUNCTION;
-  void operator=(const CommandTraits &) LLVM_DELETED_FUNCTION;
-
-  const CommandInfo *getRegisteredCommandInfo(StringRef Name) const;
-  const CommandInfo *getRegisteredCommandInfo(unsigned CommandID) const;
-
-  CommandInfo *createCommandInfoWithName(StringRef CommandName);
-
-  unsigned NextID;
-
-  /// Allocator for CommandInfo objects.
-  llvm::BumpPtrAllocator &Allocator;
-
-  SmallVector<CommandInfo *, 4> RegisteredCommands;
-};
-
-} // end namespace comments
-} // end namespace clang
-
-#endif
-
diff --git a/include/clang/AST/CommentCommands.td b/include/clang/AST/CommentCommands.td
deleted file mode 100644
index 958ee03..0000000
--- a/include/clang/AST/CommentCommands.td
+++ /dev/null
@@ -1,241 +0,0 @@
-//===----------------------------------------------------------------------===//
-// Define command classes.
-//===----------------------------------------------------------------------===//
-
-class Command<string name> {
-  string Name = name;
-  string EndCommandName = "";
-
-  int NumArgs = 0;
-
-  bit IsInlineCommand = 0;
-
-  bit IsBlockCommand = 0;
-  bit IsBriefCommand = 0;
-  bit IsReturnsCommand = 0;
-  bit IsParamCommand = 0;
-  bit IsTParamCommand = 0;
-  bit IsThrowsCommand = 0;
-  bit IsDeprecatedCommand = 0;
-  bit IsHeaderfileCommand = 0;
-
-  bit IsEmptyParagraphAllowed = 0;
-
-  bit IsVerbatimBlockCommand = 0;
-  bit IsVerbatimBlockEndCommand = 0;
-  bit IsVerbatimLineCommand = 0;
-  bit IsDeclarationCommand = 0;
-  bit IsFunctionDeclarationCommand = 0;
-  bit IsRecordLikeDetailCommand = 0;
-  bit IsRecordLikeDeclarationCommand = 0;
-}
-
-class InlineCommand<string name> : Command<name> {
-  let IsInlineCommand = 1;
-}
-
-class BlockCommand<string name> : Command<name> {
-  let IsBlockCommand = 1;
-}
-
-class RecordLikeDetailCommand<string name> : BlockCommand<name> {
-  let IsRecordLikeDetailCommand = 1;
-}
-
-class VerbatimBlockCommand<string name> : Command<name> {
-  let EndCommandName = name;
-  let IsVerbatimBlockCommand = 1;
-}
-
-multiclass VerbatimBlockCommand<string name, string endCommandName> {
-  def Begin : Command<name> {
-    let EndCommandName = endCommandName;
-    let IsVerbatimBlockCommand = 1;
-  }
-
-  def End : Command<endCommandName> {
-    let IsVerbatimBlockEndCommand = 1;
-  }
-}
-
-class VerbatimLineCommand<string name> : Command<name> {
-  let IsVerbatimLineCommand = 1;
-}
-
-class DeclarationVerbatimLineCommand<string name> :
-      VerbatimLineCommand<name> {
-  let IsDeclarationCommand = 1;
-}
-
-class FunctionDeclarationVerbatimLineCommand<string name> :
-      DeclarationVerbatimLineCommand<name> {
-  let IsFunctionDeclarationCommand = 1;
-}
-
-class RecordLikeDeclarationVerbatimLineCommand<string name> :
-      DeclarationVerbatimLineCommand<name> {
-  let IsRecordLikeDeclarationCommand = 1;
-}
-
-//===----------------------------------------------------------------------===//
-// InlineCommand
-//===----------------------------------------------------------------------===//
-
-def B  : InlineCommand<"b">;
-def C  : InlineCommand<"c">;
-def P  : InlineCommand<"p">;
-def A  : InlineCommand<"a">;
-def E  : InlineCommand<"e">;
-def Em : InlineCommand<"em">;
-
-//===----------------------------------------------------------------------===//
-// BlockCommand
-//===----------------------------------------------------------------------===//
-
-def Brief : BlockCommand<"brief"> { let IsBriefCommand = 1; }
-def Short : BlockCommand<"short"> { let IsBriefCommand = 1; }
-
-// Opposite of \brief, it is the default in our implementation.
-def Details : BlockCommand<"details">;
-
-def Returns : BlockCommand<"returns"> { let IsReturnsCommand = 1; }
-def Return  : BlockCommand<"return"> { let IsReturnsCommand = 1; }
-def Result  : BlockCommand<"result"> { let IsReturnsCommand = 1; }
-
-def Param : BlockCommand<"param"> { let IsParamCommand = 1; }
-
-// Doxygen command for template parameter documentation.
-def Tparam : BlockCommand<"tparam"> { let IsTParamCommand = 1; }
-
-// HeaderDoc command for template parameter documentation.
-def Templatefield : BlockCommand<"templatefield"> { let IsTParamCommand = 1; }
-
-def Throws    : BlockCommand<"throws"> { let IsThrowsCommand = 1; }
-def Throw     : BlockCommand<"throw"> { let IsThrowsCommand = 1; }
-def Exception : BlockCommand<"exception"> { let IsThrowsCommand = 1; }
-
-def Deprecated : BlockCommand<"deprecated"> {
-  let IsEmptyParagraphAllowed = 1;
-  let IsDeprecatedCommand = 1;
-}
-
-def Headerfile : BlockCommand<"headerfile"> { let IsHeaderfileCommand = 1; }
-
-// We don't do any additional semantic analysis for the following
-// BlockCommands.  It might be a good idea to do something extra for them, but
-// for now we model them as plain BlockCommands.
-def Arg        : BlockCommand<"arg">;
-def Attention  : BlockCommand<"attention">;
-def Author     : BlockCommand<"author">;
-def Authors    : BlockCommand<"authors">;
-def Bug        : BlockCommand<"bug">;
-def Copyright  : BlockCommand<"copyright">;
-def Date       : BlockCommand<"date">;
-def Invariant  : BlockCommand<"invariant">;
-def Li         : BlockCommand<"li">;
-def Note       : BlockCommand<"note">;
-def Par        : BlockCommand<"par">;
-def Post       : BlockCommand<"post">;
-def Pre        : BlockCommand<"pre">;
-def Remark     : BlockCommand<"remark">;
-def Remarks    : BlockCommand<"remarks">;
-def Sa         : BlockCommand<"sa">;
-def See        : BlockCommand<"see">;
-def Since      : BlockCommand<"since">;
-def Todo       : BlockCommand<"todo">;
-def Version    : BlockCommand<"version">;
-def Warning    : BlockCommand<"warning">;
-// HeaderDoc commands
-def Abstract      : BlockCommand<"abstract"> { let IsBriefCommand = 1; }
-def ClassDesign   : RecordLikeDetailCommand<"classdesign">;
-def CoClass       : RecordLikeDetailCommand<"coclass">;
-def Dependency    : RecordLikeDetailCommand<"dependency">;
-def Discussion    : BlockCommand<"discussion">;
-def Helper        : RecordLikeDetailCommand<"helper">;
-def HelperClass   : RecordLikeDetailCommand<"helperclass">;
-def Helps         : RecordLikeDetailCommand<"helps">;
-def InstanceSize  : RecordLikeDetailCommand<"instancesize">;
-def Ownership     : RecordLikeDetailCommand<"ownership">;
-def Performance   : RecordLikeDetailCommand<"performance">;
-def Security      : RecordLikeDetailCommand<"security">;
-def SeeAlso       : BlockCommand<"seealso">;
-def SuperClass    : RecordLikeDetailCommand<"superclass">;
-
-//===----------------------------------------------------------------------===//
-// VerbatimBlockCommand
-//===----------------------------------------------------------------------===//
-
-defm Code      : VerbatimBlockCommand<"code", "endcode">;
-defm Verbatim  : VerbatimBlockCommand<"verbatim", "endverbatim">;
-defm Htmlonly  : VerbatimBlockCommand<"htmlonly", "endhtmlonly">;
-defm Latexonly : VerbatimBlockCommand<"latexonly", "endlatexonly">;
-defm Xmlonly   : VerbatimBlockCommand<"xmlonly", "endxmlonly">;
-defm Manonly   : VerbatimBlockCommand<"manonly", "endmanonly">;
-defm Rtfonly   : VerbatimBlockCommand<"rtfonly", "endrtfonly">;
-
-defm Dot : VerbatimBlockCommand<"dot", "enddot">;
-defm Msc : VerbatimBlockCommand<"msc", "endmsc">;
-
-// These three commands have special support in CommentLexer to recognize their
-// names.
-def  FDollar  : VerbatimBlockCommand<"f$">; // Inline LaTeX formula
-defm FBracket : VerbatimBlockCommand<"f[", "f]">; // Displayed LaTeX formula
-defm FBrace   : VerbatimBlockCommand<"f{", "f}">; // LaTeX environment
-
-// HeaderDoc commands
-defm Textblock    : VerbatimBlockCommand<"textblock", "/textblock">;
-defm Link         : VerbatimBlockCommand<"link", "/link">;
-
-//===----------------------------------------------------------------------===//
-// VerbatimLineCommand
-//===----------------------------------------------------------------------===//
-
-def Defgroup   : VerbatimLineCommand<"defgroup">;
-def Ingroup    : VerbatimLineCommand<"ingroup">;
-def Addtogroup : VerbatimLineCommand<"addtogroup">;
-def Weakgroup  : VerbatimLineCommand<"weakgroup">;
-def Name       : VerbatimLineCommand<"name">;
-
-def Section       : VerbatimLineCommand<"section">;
-def Subsection    : VerbatimLineCommand<"subsection">;
-def Subsubsection : VerbatimLineCommand<"subsubsection">;
-def Paragraph     : VerbatimLineCommand<"paragraph">;
-
-def Mainpage : VerbatimLineCommand<"mainpage">;
-def Subpage  : VerbatimLineCommand<"subpage">;
-def Ref      : VerbatimLineCommand<"ref">;
-
-def Relates     : VerbatimLineCommand<"relates">;
-def Related     : VerbatimLineCommand<"related">;
-def RelatesAlso : VerbatimLineCommand<"relatesalso">;
-def RelatedAlso : VerbatimLineCommand<"relatedalso">;
-
-//===----------------------------------------------------------------------===//
-// DeclarationVerbatimLineCommand
-//===----------------------------------------------------------------------===//
-
-// Doxygen commands.
-def Def       : DeclarationVerbatimLineCommand<"def">;
-def Fn        : DeclarationVerbatimLineCommand<"fn">;
-def Namespace : DeclarationVerbatimLineCommand<"namespace">;
-def Overload  : DeclarationVerbatimLineCommand<"overload">;
-def Property  : DeclarationVerbatimLineCommand<"property">;
-def Typedef   : DeclarationVerbatimLineCommand<"typedef">;
-def Var       : DeclarationVerbatimLineCommand<"var">;
-
-// HeaderDoc commands.
-def Class     : RecordLikeDeclarationVerbatimLineCommand<"class">;
-def Interface : RecordLikeDeclarationVerbatimLineCommand<"interface">;
-def Protocol  : RecordLikeDeclarationVerbatimLineCommand<"protocol">;
-def Struct    : RecordLikeDeclarationVerbatimLineCommand<"struct">;
-def Union     : RecordLikeDeclarationVerbatimLineCommand<"union">;
-def Category  : DeclarationVerbatimLineCommand<"category">;
-def Template  : DeclarationVerbatimLineCommand<"template">;
-def Function  : FunctionDeclarationVerbatimLineCommand<"function">;
-def FunctionGroup  : FunctionDeclarationVerbatimLineCommand<"functiongroup">;
-def Method    : FunctionDeclarationVerbatimLineCommand<"method">;
-def MethodGroup    : FunctionDeclarationVerbatimLineCommand<"methodgroup">;
-def Callback  : FunctionDeclarationVerbatimLineCommand<"callback">;
-def Const     : DeclarationVerbatimLineCommand<"const">;
-def Constant  : DeclarationVerbatimLineCommand<"constant">;
-def Enum      : DeclarationVerbatimLineCommand<"enum">;
diff --git a/include/clang/AST/CommentDiagnostic.h b/include/clang/AST/CommentDiagnostic.h
deleted file mode 100644
index 312da06..0000000
--- a/include/clang/AST/CommentDiagnostic.h
+++ /dev/null
@@ -1,29 +0,0 @@
-//===--- CommentDiagnostic.h - Diagnostics for the AST library --*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_COMMENTDIAGNOSTIC_H
-#define LLVM_CLANG_COMMENTDIAGNOSTIC_H
-
-#include "clang/Basic/Diagnostic.h"
-
-namespace clang {
-  namespace diag {
-    enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
-#define COMMENTSTART
-#include "clang/Basic/DiagnosticCommentKinds.inc"
-#undef DIAG
-      NUM_BUILTIN_COMMENT_DIAGNOSTICS
-    };
-  }  // end namespace diag
-}  // end namespace clang
-
-#endif
-
diff --git a/include/clang/AST/CommentHTMLNamedCharacterReferences.td b/include/clang/AST/CommentHTMLNamedCharacterReferences.td
deleted file mode 100644
index 4493108..0000000
--- a/include/clang/AST/CommentHTMLNamedCharacterReferences.td
+++ /dev/null
@@ -1,177 +0,0 @@
-// HTML Named Character Reference
-class NCR<string spelling, int codePoint> {
-  string Spelling = spelling;
-  int CodePoint = codePoint;
-}
-
-// The list below includes named character references supported by Doxygen:
-// http://www.stack.nl/~dimitri/doxygen/manual/htmlcmds.html
-//
-// It does not include all HTML 5 named character references.
-//
-// Corresponding code point values can be found here:
-// http://www.w3.org/TR/2011/WD-html5-20110113/named-character-references.html
-
-def : NCR<"copy",  0x000A9>;
-def : NCR<"COPY",  0x000A9>;
-def : NCR<"trade", 0x02122>;
-def : NCR<"TRADE", 0x02122>;
-def : NCR<"reg",   0x000AE>;
-def : NCR<"REG",   0x000AE>;
-def : NCR<"lt",    0x0003C>;
-def : NCR<"Lt",    0x0003C>;
-def : NCR<"LT",    0x0003C>;
-def : NCR<"gt",    0x0003E>;
-def : NCR<"Gt",    0x0003E>;
-def : NCR<"GT",    0x0003E>;
-def : NCR<"amp",   0x00026>;
-def : NCR<"AMP",   0x00026>;
-def : NCR<"apos",  0x00027>;
-def : NCR<"quot",  0x00022>;
-def : NCR<"QUOT",  0x00022>;
-def : NCR<"lsquo", 0x02018>;
-def : NCR<"rsquo", 0x02019>;
-def : NCR<"ldquo", 0x0201C>;
-def : NCR<"rdquo", 0x0201D>;
-def : NCR<"ndash", 0x02013>;
-def : NCR<"mdash", 0x02014>;
-
-def : NCR<"Auml", 0x000C4>;
-def : NCR<"Euml", 0x000CB>;
-def : NCR<"Iuml", 0x000CF>;
-def : NCR<"Ouml", 0x000D6>;
-def : NCR<"Uuml", 0x000DC>;
-def : NCR<"Yuml", 0x00178>;
-def : NCR<"auml", 0x000E4>;
-def : NCR<"euml", 0x000EB>;
-def : NCR<"iuml", 0x000EF>;
-def : NCR<"ouml", 0x000F6>;
-def : NCR<"uuml", 0x000FC>;
-def : NCR<"yuml", 0x000FF>;
-
-def : NCR<"Aacute", 0x000C1>;
-def : NCR<"Eacute", 0x000C9>;
-def : NCR<"Iacute", 0x000CD>;
-def : NCR<"Oacute", 0x000D3>;
-def : NCR<"Uacute", 0x000DA>;
-def : NCR<"Yacute", 0x000DD>;
-def : NCR<"aacute", 0x000E1>;
-def : NCR<"eacute", 0x000E9>;
-def : NCR<"iacute", 0x000ED>;
-def : NCR<"oacute", 0x000F3>;
-def : NCR<"uacute", 0x000FA>;
-def : NCR<"yacute", 0x000FD>;
-
-def : NCR<"Agrave", 0x000C0>;
-def : NCR<"Egrave", 0x000C8>;
-def : NCR<"Igrave", 0x000CC>;
-def : NCR<"Ograve", 0x000D2>;
-def : NCR<"Ugrave", 0x000D9>;
-// def : NCR<"Ygrave", 0x01EF2>; // Defined neither in Doxygen, nor in HTML5.
-def : NCR<"agrave", 0x000E0>;
-def : NCR<"egrave", 0x000E8>;
-def : NCR<"igrave", 0x000EC>;
-def : NCR<"ograve", 0x000F2>;
-def : NCR<"ugrave", 0x000F9>;
-def : NCR<"ygrave", 0x01EF3>; // Defined in Doxygen, not defined in HTML5.
-
-def : NCR<"Acirc", 0x000C2>;
-def : NCR<"Ecirc", 0x000CA>;
-def : NCR<"Icirc", 0x000CE>;
-def : NCR<"Ocirc", 0x000D4>;
-def : NCR<"Ucirc", 0x000DB>;
-def : NCR<"Ycirc", 0x00176>; // Not defined in Doxygen, defined in HTML5.
-def : NCR<"acirc", 0x000E2>;
-def : NCR<"ecirc", 0x000EA>;
-def : NCR<"icirc", 0x000EE>;
-def : NCR<"ocirc", 0x000F4>;
-def : NCR<"ucirc", 0x000FB>;
-def : NCR<"ycirc", 0x00177>;
-
-def : NCR<"Atilde", 0x000C3>;
-def : NCR<"Ntilde", 0x000D1>;
-def : NCR<"Otilde", 0x000D5>;
-def : NCR<"atilde", 0x000E3>;
-def : NCR<"ntilde", 0x000F1>;
-def : NCR<"otilde", 0x000F5>;
-
-def : NCR<"szlig", 0x000DF>;
-
-def : NCR<"ccedil", 0x000E7>;
-def : NCR<"Ccedil", 0x000C7>;
-
-def : NCR<"aring", 0x000E5>;
-def : NCR<"Aring", 0x000C5>;
-
-def : NCR<"nbsp", 0x000A0>;
-
-def : NCR<"Gamma",   0x00393>;
-def : NCR<"Delta",   0x00394>;
-def : NCR<"Theta",   0x00398>;
-def : NCR<"Lambda",  0x0039B>;
-def : NCR<"Xi",      0x0039E>;
-def : NCR<"Pi",      0x003A0>;
-def : NCR<"Sigma",   0x003A3>;
-def : NCR<"Upsilon", 0x003A5>;
-def : NCR<"Phi",     0x003A6>;
-def : NCR<"Psi",     0x003A8>;
-def : NCR<"Omega",   0x003A9>;
-
-def : NCR<"alpha",   0x003B1>;
-def : NCR<"beta",    0x003B2>;
-def : NCR<"gamma",   0x003B3>;
-def : NCR<"delta",   0x003B4>;
-def : NCR<"epsilon", 0x003B5>;
-def : NCR<"zeta",    0x003B6>;
-def : NCR<"eta",     0x003B7>;
-def : NCR<"theta",   0x003B8>;
-def : NCR<"iota",    0x003B9>;
-def : NCR<"kappa",   0x003BA>;
-def : NCR<"lambda",  0x003BB>;
-def : NCR<"mu",      0x003BC>;
-def : NCR<"nu",      0x003BD>;
-def : NCR<"xi",      0x003BE>;
-def : NCR<"pi",      0x003C0>;
-def : NCR<"rho",     0x003C1>;
-def : NCR<"sigma",   0x003C3>;
-def : NCR<"tau",     0x003C4>;
-def : NCR<"upsilon", 0x003C5>;
-def : NCR<"phi",     0x003C6>;
-def : NCR<"chi",     0x003C7>;
-def : NCR<"psi",     0x003C8>;
-def : NCR<"omega",   0x003C9>;
-def : NCR<"sigmaf",  0x003C2>;
-
-def : NCR<"sect",   0x000A7>;
-def : NCR<"deg",    0x000B0>;
-def : NCR<"prime",  0x02032>;
-def : NCR<"Prime",  0x02033>;
-def : NCR<"infin",  0x0221E>;
-def : NCR<"empty",  0x02205>;
-def : NCR<"plusmn", 0x000B1>;
-def : NCR<"times",  0x000D7>;
-def : NCR<"minus",  0x02212>;
-def : NCR<"sdot",   0x022C5>;
-def : NCR<"part",   0x02202>;
-def : NCR<"nabla",  0x02207>;
-def : NCR<"radic",  0x0221A>;
-def : NCR<"perp",   0x022A5>;
-def : NCR<"sum",    0x02211>;
-def : NCR<"int",    0x0222B>;
-def : NCR<"prod",   0x0220F>;
-def : NCR<"sim",    0x0223C>;
-def : NCR<"asymp",  0x02248>;
-def : NCR<"ne",     0x02260>;
-def : NCR<"equiv",  0x02261>;
-def : NCR<"prop",   0x0221D>;
-def : NCR<"le",     0x02264>;
-def : NCR<"ge",     0x02265>;
-def : NCR<"larr",   0x02190>;
-def : NCR<"rarr",   0x02192>;
-def : NCR<"isin",   0x02208>;
-def : NCR<"notin",  0x02209>;
-def : NCR<"lceil",  0x02308>;
-def : NCR<"rceil",  0x02309>;
-def : NCR<"lfloor", 0x0230A>;
-def : NCR<"rfloor", 0x0230B>;
-
diff --git a/include/clang/AST/CommentHTMLTags.td b/include/clang/AST/CommentHTMLTags.td
deleted file mode 100644
index 79951b8..0000000
--- a/include/clang/AST/CommentHTMLTags.td
+++ /dev/null
@@ -1,134 +0,0 @@
-class Tag<string spelling> {
-  string Spelling = spelling;
-  bit EndTagOptional = 0;
-  bit EndTagForbidden = 0;
-}
-
-def Em      : Tag<"em">;
-def Strong  : Tag<"strong">;
-def Tt      : Tag<"tt">;
-def I       : Tag<"i">;
-def B       : Tag<"b">;
-def Big     : Tag<"big">;
-def Small   : Tag<"small">;
-def Strike  : Tag<"strike">;
-def S       : Tag<"s">;
-def U       : Tag<"u">;
-def Font    : Tag<"font">;
-def A       : Tag<"a">;
-def Hr      : Tag<"hr"> { let EndTagForbidden = 1; }
-def Div     : Tag<"div">;
-def Span    : Tag<"span">;
-def H1      : Tag<"h1">;
-def H2      : Tag<"h2">;
-def H3      : Tag<"h3">;
-def H4      : Tag<"h4">;
-def H5      : Tag<"h5">;
-def H6      : Tag<"h6">;
-def Code    : Tag<"code">;
-def Blockquote : Tag<"blockquote">;
-def Sub     : Tag<"sub">;
-def Sup     : Tag<"sup">;
-def Img     : Tag<"img"> { let EndTagForbidden = 1; }
-def P       : Tag<"p"> { let EndTagOptional = 1; }
-def Br      : Tag<"br"> { let EndTagForbidden = 1; }
-def Pre     : Tag<"pre">;
-def Ins     : Tag<"ins">;
-def Del     : Tag<"del">;
-def Ul      : Tag<"ul">;
-def Ol      : Tag<"ol">;
-def Li      : Tag<"li"> { let EndTagOptional = 1; }
-def Dl      : Tag<"dl">;
-def Dt      : Tag<"dt"> { let EndTagOptional = 1; }
-def Dd      : Tag<"dd"> { let EndTagOptional = 1; }
-def Table   : Tag<"table">;
-def Caption : Tag<"caption">;
-def Thead   : Tag<"thead"> { let EndTagOptional = 1; }
-def Tfoot   : Tag<"tfoot"> { let EndTagOptional = 1; }
-def Tbody   : Tag<"tbody"> { let EndTagOptional = 1; }
-def Colgroup : Tag<"colgroup"> { let EndTagOptional = 1; }
-def Col     : Tag<"col"> { let EndTagForbidden = 1; }
-def Tr      : Tag<"tr"> { let EndTagOptional = 1; }
-def Th      : Tag<"th"> { let EndTagOptional = 1; }
-def Td      : Tag<"td"> { let EndTagOptional = 1; }
-
-// Define a blacklist of attributes that are not safe to pass through to HTML
-// output if the input is untrusted.
-//
-// FIXME: this should be a whitelist.  When changing this to a whitelist, don't
-// forget to change the default in the TableGen backend.
-class Attribute<string spelling> {
-  string Spelling = spelling;
-  bit IsSafeToPassThrough = 1;
-}
-class EventHandlerContentAttribute<string spelling> : Attribute<spelling> {
-  let IsSafeToPassThrough = 0;
-}
-
-// This list is based on HTML5 draft as of 04 February 2014.
-//
-// The list is intentionally organized as one item per line to make it easier
-// to compare with the HTML spec.
-foreach AttrName = [
-    "onabort",
-    "onblur",
-    "oncancel",
-    "oncanplay",
-    "oncanplaythrough",
-    "onchange",
-    "onclick",
-    "onclose",
-    "oncuechange",
-    "ondblclick",
-    "ondrag",
-    "ondragend",
-    "ondragenter",
-    "ondragexit",
-    "ondragleave",
-    "ondragover",
-    "ondragstart",
-    "ondrop",
-    "ondurationchange",
-    "onemptied",
-    "onended",
-    "onerror",
-    "onfocus",
-    "oninput",
-    "oninvalid",
-    "onkeydown",
-    "onkeypress",
-    "onkeyup",
-    "onload",
-    "onloadeddata",
-    "onloadedmetadata",
-    "onloadstart",
-    "onmousedown",
-    "onmouseenter",
-    "onmouseleave",
-    "onmousemove",
-    "onmouseout",
-    "onmouseover",
-    "onmouseup",
-    "onmousewheel",
-    "onpause",
-    "onplay",
-    "onplaying",
-    "onprogress",
-    "onratechange",
-    "onreset",
-    "onresize",
-    "onscroll",
-    "onseeked",
-    "onseeking",
-    "onselect",
-    "onshow",
-    "onstalled",
-    "onsubmit",
-    "onsuspend",
-    "ontimeupdate",
-    "ontoggle",
-    "onvolumechange",
-    "onwaiting"
-  ] in {
-  def Attr#AttrName : EventHandlerContentAttribute<AttrName>;
-}
diff --git a/include/clang/AST/CommentLexer.h b/include/clang/AST/CommentLexer.h
deleted file mode 100644
index 8070615..0000000
--- a/include/clang/AST/CommentLexer.h
+++ /dev/null
@@ -1,362 +0,0 @@
-//===--- CommentLexer.h - Lexer for structured comments ---------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines lexer for structured comments and supporting token class.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_AST_COMMENT_LEXER_H
-#define LLVM_CLANG_AST_COMMENT_LEXER_H
-
-#include "clang/Basic/Diagnostic.h"
-#include "clang/Basic/SourceManager.h"
-#include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/Support/Allocator.h"
-#include "llvm/Support/raw_ostream.h"
-
-namespace clang {
-namespace comments {
-
-class Lexer;
-class TextTokenRetokenizer;
-struct CommandInfo;
-class CommandTraits;
-
-namespace tok {
-enum TokenKind {
-  eof,
-  newline,
-  text,
-  unknown_command,   // Command that does not have an ID.
-  backslash_command, // Command with an ID, that used backslash marker.
-  at_command,        // Command with an ID, that used 'at' marker.
-  verbatim_block_begin,
-  verbatim_block_line,
-  verbatim_block_end,
-  verbatim_line_name,
-  verbatim_line_text,
-  html_start_tag,     // <tag
-  html_ident,         // attr
-  html_equals,        // =
-  html_quoted_string, // "blah\"blah" or 'blah\'blah'
-  html_greater,       // >
-  html_slash_greater, // />
-  html_end_tag        // </tag
-};
-} // end namespace tok
-
-/// \brief Comment token.
-class Token {
-  friend class Lexer;
-  friend class TextTokenRetokenizer;
-
-  /// The location of the token.
-  SourceLocation Loc;
-
-  /// The actual kind of the token.
-  tok::TokenKind Kind;
-
-  /// Length of the token spelling in comment.  Can be 0 for synthenized
-  /// tokens.
-  unsigned Length;
-
-  /// Contains text value associated with a token.
-  const char *TextPtr;
-
-  /// Integer value associated with a token.
-  ///
-  /// If the token is a konwn command, contains command ID and TextPtr is
-  /// unused (command spelling can be found with CommandTraits).  Otherwise,
-  /// contains the length of the string that starts at TextPtr.
-  unsigned IntVal;
-  
-public:
-  SourceLocation getLocation() const LLVM_READONLY { return Loc; }
-  void setLocation(SourceLocation SL) { Loc = SL; }
-
-  SourceLocation getEndLocation() const LLVM_READONLY {
-    if (Length == 0 || Length == 1)
-      return Loc;
-    return Loc.getLocWithOffset(Length - 1);
-  }
-
-  tok::TokenKind getKind() const LLVM_READONLY { return Kind; }
-  void setKind(tok::TokenKind K) { Kind = K; }
-
-  bool is(tok::TokenKind K) const LLVM_READONLY { return Kind == K; }
-  bool isNot(tok::TokenKind K) const LLVM_READONLY { return Kind != K; }
-
-  unsigned getLength() const LLVM_READONLY { return Length; }
-  void setLength(unsigned L) { Length = L; }
-
-  StringRef getText() const LLVM_READONLY {
-    assert(is(tok::text));
-    return StringRef(TextPtr, IntVal);
-  }
-
-  void setText(StringRef Text) {
-    assert(is(tok::text));
-    TextPtr = Text.data();
-    IntVal = Text.size();
-  }
-
-  StringRef getUnknownCommandName() const LLVM_READONLY {
-    assert(is(tok::unknown_command));
-    return StringRef(TextPtr, IntVal);
-  }
-
-  void setUnknownCommandName(StringRef Name) {
-    assert(is(tok::unknown_command));
-    TextPtr = Name.data();
-    IntVal = Name.size();
-  }
-
-  unsigned getCommandID() const LLVM_READONLY {
-    assert(is(tok::backslash_command) || is(tok::at_command));
-    return IntVal;
-  }
-
-  void setCommandID(unsigned ID) {
-    assert(is(tok::backslash_command) || is(tok::at_command));
-    IntVal = ID;
-  }
-
-  unsigned getVerbatimBlockID() const LLVM_READONLY {
-    assert(is(tok::verbatim_block_begin) || is(tok::verbatim_block_end));
-    return IntVal;
-  }
-
-  void setVerbatimBlockID(unsigned ID) {
-    assert(is(tok::verbatim_block_begin) || is(tok::verbatim_block_end));
-    IntVal = ID;
-  }
-
-  StringRef getVerbatimBlockText() const LLVM_READONLY {
-    assert(is(tok::verbatim_block_line));
-    return StringRef(TextPtr, IntVal);
-  }
-
-  void setVerbatimBlockText(StringRef Text) {
-    assert(is(tok::verbatim_block_line));
-    TextPtr = Text.data();
-    IntVal = Text.size();
-  }
-
-  unsigned getVerbatimLineID() const LLVM_READONLY {
-    assert(is(tok::verbatim_line_name));
-    return IntVal;
-  }
-
-  void setVerbatimLineID(unsigned ID) {
-    assert(is(tok::verbatim_line_name));
-    IntVal = ID;
-  }
-
-  StringRef getVerbatimLineText() const LLVM_READONLY {
-    assert(is(tok::verbatim_line_text));
-    return StringRef(TextPtr, IntVal);
-  }
-
-  void setVerbatimLineText(StringRef Text) {
-    assert(is(tok::verbatim_line_text));
-    TextPtr = Text.data();
-    IntVal = Text.size();
-  }
-
-  StringRef getHTMLTagStartName() const LLVM_READONLY {
-    assert(is(tok::html_start_tag));
-    return StringRef(TextPtr, IntVal);
-  }
-
-  void setHTMLTagStartName(StringRef Name) {
-    assert(is(tok::html_start_tag));
-    TextPtr = Name.data();
-    IntVal = Name.size();
-  }
-
-  StringRef getHTMLIdent() const LLVM_READONLY {
-    assert(is(tok::html_ident));
-    return StringRef(TextPtr, IntVal);
-  }
-
-  void setHTMLIdent(StringRef Name) {
-    assert(is(tok::html_ident));
-    TextPtr = Name.data();
-    IntVal = Name.size();
-  }
-
-  StringRef getHTMLQuotedString() const LLVM_READONLY {
-    assert(is(tok::html_quoted_string));
-    return StringRef(TextPtr, IntVal);
-  }
-
-  void setHTMLQuotedString(StringRef Str) {
-    assert(is(tok::html_quoted_string));
-    TextPtr = Str.data();
-    IntVal = Str.size();
-  }
-
-  StringRef getHTMLTagEndName() const LLVM_READONLY {
-    assert(is(tok::html_end_tag));
-    return StringRef(TextPtr, IntVal);
-  }
-
-  void setHTMLTagEndName(StringRef Name) {
-    assert(is(tok::html_end_tag));
-    TextPtr = Name.data();
-    IntVal = Name.size();
-  }
-
-  void dump(const Lexer &L, const SourceManager &SM) const;
-};
-
-/// \brief Comment lexer.
-class Lexer {
-private:
-  Lexer(const Lexer &) LLVM_DELETED_FUNCTION;
-  void operator=(const Lexer &) LLVM_DELETED_FUNCTION;
-
-  /// Allocator for strings that are semantic values of tokens and have to be
-  /// computed (for example, resolved decimal character references).
-  llvm::BumpPtrAllocator &Allocator;
-
-  DiagnosticsEngine &Diags;
-  
-  const CommandTraits &Traits;
-
-  const char *const BufferStart;
-  const char *const BufferEnd;
-  SourceLocation FileLoc;
-
-  const char *BufferPtr;
-
-  /// One past end pointer for the current comment.  For BCPL comments points
-  /// to newline or BufferEnd, for C comments points to star in '*/'.
-  const char *CommentEnd;
-
-  enum LexerCommentState {
-    LCS_BeforeComment,
-    LCS_InsideBCPLComment,
-    LCS_InsideCComment,
-    LCS_BetweenComments
-  };
-
-  /// Low-level lexer state, track if we are inside or outside of comment.
-  LexerCommentState CommentState;
-
-  enum LexerState {
-    /// Lexing normal comment text
-    LS_Normal,
-
-    /// Finished lexing verbatim block beginning command, will lex first body
-    /// line.
-    LS_VerbatimBlockFirstLine,
-
-    /// Lexing verbatim block body line-by-line, skipping line-starting
-    /// decorations.
-    LS_VerbatimBlockBody,
-
-    /// Finished lexing verbatim line beginning command, will lex text (one
-    /// line).
-    LS_VerbatimLineText,
-
-    /// Finished lexing \verbatim <TAG \endverbatim part, lexing tag attributes.
-    LS_HTMLStartTag,
-
-    /// Finished lexing \verbatim </TAG \endverbatim part, lexing '>'.
-    LS_HTMLEndTag
-  };
-
-  /// Current lexing mode.
-  LexerState State;
-
-  /// If State is LS_VerbatimBlock, contains the name of verbatim end
-  /// command, including command marker.
-  SmallString<16> VerbatimBlockEndCommandName;
-
-  /// Given a character reference name (e.g., "lt"), return the character that
-  /// it stands for (e.g., "<").
-  StringRef resolveHTMLNamedCharacterReference(StringRef Name) const;
-
-  /// Given a Unicode codepoint as base-10 integer, return the character.
-  StringRef resolveHTMLDecimalCharacterReference(StringRef Name) const;
-
-  /// Given a Unicode codepoint as base-16 integer, return the character.
-  StringRef resolveHTMLHexCharacterReference(StringRef Name) const;
-
-  void formTokenWithChars(Token &Result, const char *TokEnd,
-                          tok::TokenKind Kind);
-
-  void formTextToken(Token &Result, const char *TokEnd) {
-    StringRef Text(BufferPtr, TokEnd - BufferPtr);
-    formTokenWithChars(Result, TokEnd, tok::text);
-    Result.setText(Text);
-  }
-
-  SourceLocation getSourceLocation(const char *Loc) const {
-    assert(Loc >= BufferStart && Loc <= BufferEnd &&
-           "Location out of range for this buffer!");
-
-    const unsigned CharNo = Loc - BufferStart;
-    return FileLoc.getLocWithOffset(CharNo);
-  }
-
-  DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID) {
-    return Diags.Report(Loc, DiagID);
-  }
-
-  /// Eat string matching regexp \code \s*\* \endcode.
-  void skipLineStartingDecorations();
-
-  /// Lex stuff inside comments.  CommentEnd should be set correctly.
-  void lexCommentText(Token &T);
-
-  void setupAndLexVerbatimBlock(Token &T,
-                                const char *TextBegin,
-                                char Marker, const CommandInfo *Info);
-
-  void lexVerbatimBlockFirstLine(Token &T);
-
-  void lexVerbatimBlockBody(Token &T);
-
-  void setupAndLexVerbatimLine(Token &T, const char *TextBegin,
-                               const CommandInfo *Info);
-
-  void lexVerbatimLineText(Token &T);
-
-  void lexHTMLCharacterReference(Token &T);
-
-  void setupAndLexHTMLStartTag(Token &T);
-
-  void lexHTMLStartTag(Token &T);
-
-  void setupAndLexHTMLEndTag(Token &T);
-
-  void lexHTMLEndTag(Token &T);
-
-public:
-  Lexer(llvm::BumpPtrAllocator &Allocator, DiagnosticsEngine &Diags,
-        const CommandTraits &Traits,
-        SourceLocation FileLoc,
-        const char *BufferStart, const char *BufferEnd);
-
-  void lex(Token &T);
-
-  StringRef getSpelling(const Token &Tok,
-                        const SourceManager &SourceMgr,
-                        bool *Invalid = NULL) const;
-};
-
-} // end namespace comments
-} // end namespace clang
-
-#endif
-
diff --git a/include/clang/AST/CommentParser.h b/include/clang/AST/CommentParser.h
deleted file mode 100644
index 7e00813..0000000
--- a/include/clang/AST/CommentParser.h
+++ /dev/null
@@ -1,127 +0,0 @@
-//===--- CommentParser.h - Doxygen comment parser ---------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines the Doxygen comment parser.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_AST_COMMENT_PARSER_H
-#define LLVM_CLANG_AST_COMMENT_PARSER_H
-
-#include "clang/AST/Comment.h"
-#include "clang/AST/CommentLexer.h"
-#include "clang/AST/CommentSema.h"
-#include "clang/Basic/Diagnostic.h"
-#include "llvm/Support/Allocator.h"
-
-namespace clang {
-class SourceManager;
-
-namespace comments {
-class CommandTraits;
-
-/// Doxygen comment parser.
-class Parser {
-  Parser(const Parser &) LLVM_DELETED_FUNCTION;
-  void operator=(const Parser &) LLVM_DELETED_FUNCTION;
-
-  friend class TextTokenRetokenizer;
-
-  Lexer &L;
-
-  Sema &S;
-
-  /// Allocator for anything that goes into AST nodes.
-  llvm::BumpPtrAllocator &Allocator;
-
-  /// Source manager for the comment being parsed.
-  const SourceManager &SourceMgr;
-
-  DiagnosticsEngine &Diags;
-
-  DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID) {
-    return Diags.Report(Loc, DiagID);
-  }
-
-  const CommandTraits &Traits;
-
-  /// Current lookahead token.  We can safely assume that all tokens are from
-  /// a single source file.
-  Token Tok;
-
-  /// A stack of additional lookahead tokens.
-  SmallVector<Token, 8> MoreLATokens;
-
-  void consumeToken() {
-    if (MoreLATokens.empty())
-      L.lex(Tok);
-    else
-      Tok = MoreLATokens.pop_back_val();
-  }
-
-  void putBack(const Token &OldTok) {
-    MoreLATokens.push_back(Tok);
-    Tok = OldTok;
-  }
-
-  void putBack(ArrayRef<Token> Toks) {
-    if (Toks.empty())
-      return;
-
-    MoreLATokens.push_back(Tok);
-    for (const Token *I = &Toks.back(),
-         *B = &Toks.front();
-         I != B; --I) {
-      MoreLATokens.push_back(*I);
-    }
-
-    Tok = Toks[0];
-  }
-
-  bool isTokBlockCommand() {
-    return (Tok.is(tok::backslash_command) || Tok.is(tok::at_command)) &&
-           Traits.getCommandInfo(Tok.getCommandID())->IsBlockCommand;
-  }
-
-public:
-  Parser(Lexer &L, Sema &S, llvm::BumpPtrAllocator &Allocator,
-         const SourceManager &SourceMgr, DiagnosticsEngine &Diags,
-         const CommandTraits &Traits);
-
-  /// Parse arguments for \\param command.
-  void parseParamCommandArgs(ParamCommandComment *PC,
-                             TextTokenRetokenizer &Retokenizer);
-
-  /// Parse arguments for \\tparam command.
-  void parseTParamCommandArgs(TParamCommandComment *TPC,
-                              TextTokenRetokenizer &Retokenizer);
-
-  void parseBlockCommandArgs(BlockCommandComment *BC,
-                             TextTokenRetokenizer &Retokenizer,
-                             unsigned NumArgs);
-
-  BlockCommandComment *parseBlockCommand();
-  InlineCommandComment *parseInlineCommand();
-
-  HTMLStartTagComment *parseHTMLStartTag();
-  HTMLEndTagComment *parseHTMLEndTag();
-
-  BlockContentComment *parseParagraphOrBlockCommand();
-
-  VerbatimBlockComment *parseVerbatimBlock();
-  VerbatimLineComment *parseVerbatimLine();
-  BlockContentComment *parseBlockContent();
-  FullComment *parseFullComment();
-};
-
-} // end namespace comments
-} // end namespace clang
-
-#endif
-
diff --git a/include/clang/AST/CommentSema.h b/include/clang/AST/CommentSema.h
deleted file mode 100644
index 3910960..0000000
--- a/include/clang/AST/CommentSema.h
+++ /dev/null
@@ -1,258 +0,0 @@
-//===--- CommentSema.h - Doxygen comment semantic analysis ------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines the semantic analysis class for Doxygen comments.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_AST_COMMENT_SEMA_H
-#define LLVM_CLANG_AST_COMMENT_SEMA_H
-
-#include "clang/AST/Comment.h"
-#include "clang/Basic/Diagnostic.h"
-#include "clang/Basic/SourceLocation.h"
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/StringMap.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/Support/Allocator.h"
-
-namespace clang {
-class Decl;
-class SourceMgr;
-class Preprocessor;
-
-namespace comments {
-class CommandTraits;
-
-class Sema {
-  Sema(const Sema &) LLVM_DELETED_FUNCTION;
-  void operator=(const Sema &) LLVM_DELETED_FUNCTION;
-
-  /// Allocator for AST nodes.
-  llvm::BumpPtrAllocator &Allocator;
-
-  /// Source manager for the comment being parsed.
-  const SourceManager &SourceMgr;
-
-  DiagnosticsEngine &Diags;
-
-  CommandTraits &Traits;
-
-  const Preprocessor *PP;
-
-  /// Information about the declaration this comment is attached to.
-  DeclInfo *ThisDeclInfo;
-
-  /// Comment AST nodes that correspond to parameter names in
-  /// \c TemplateParameters.
-  ///
-  /// Contains a valid value if \c DeclInfo->IsFilled is true.
-  llvm::StringMap<TParamCommandComment *> TemplateParameterDocs;
-
-  /// AST node for the \\brief command and its aliases.
-  const BlockCommandComment *BriefCommand;
-
-  /// AST node for the \\headerfile command.
-  const BlockCommandComment *HeaderfileCommand;
-
-  DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID) {
-    return Diags.Report(Loc, DiagID);
-  }
-
-  /// A stack of HTML tags that are currently open (not matched with closing
-  /// tags).
-  SmallVector<HTMLStartTagComment *, 8> HTMLOpenTags;
-
-public:
-  Sema(llvm::BumpPtrAllocator &Allocator, const SourceManager &SourceMgr,
-       DiagnosticsEngine &Diags, CommandTraits &Traits,
-       const Preprocessor *PP);
-
-  void setDecl(const Decl *D);
-
-  /// Returns a copy of array, owned by Sema's allocator.
-  template<typename T>
-  ArrayRef<T> copyArray(ArrayRef<T> Source) {
-    size_t Size = Source.size();
-    if (Size != 0) {
-      T *Mem = Allocator.Allocate<T>(Size);
-      std::uninitialized_copy(Source.begin(), Source.end(), Mem);
-      return llvm::makeArrayRef(Mem, Size);
-    } else
-      return llvm::makeArrayRef(static_cast<T *>(NULL), 0);
-  }
-
-  ParagraphComment *actOnParagraphComment(
-      ArrayRef<InlineContentComment *> Content);
-
-  BlockCommandComment *actOnBlockCommandStart(SourceLocation LocBegin,
-                                              SourceLocation LocEnd,
-                                              unsigned CommandID,
-                                              CommandMarkerKind CommandMarker);
-
-  void actOnBlockCommandArgs(BlockCommandComment *Command,
-                             ArrayRef<BlockCommandComment::Argument> Args);
-
-  void actOnBlockCommandFinish(BlockCommandComment *Command,
-                               ParagraphComment *Paragraph);
-
-  ParamCommandComment *actOnParamCommandStart(SourceLocation LocBegin,
-                                              SourceLocation LocEnd,
-                                              unsigned CommandID,
-                                              CommandMarkerKind CommandMarker);
-
-  void actOnParamCommandDirectionArg(ParamCommandComment *Command,
-                                     SourceLocation ArgLocBegin,
-                                     SourceLocation ArgLocEnd,
-                                     StringRef Arg);
-
-  void actOnParamCommandParamNameArg(ParamCommandComment *Command,
-                                     SourceLocation ArgLocBegin,
-                                     SourceLocation ArgLocEnd,
-                                     StringRef Arg);
-
-  void actOnParamCommandFinish(ParamCommandComment *Command,
-                               ParagraphComment *Paragraph);
-
-  TParamCommandComment *actOnTParamCommandStart(SourceLocation LocBegin,
-                                                SourceLocation LocEnd,
-                                                unsigned CommandID,
-                                                CommandMarkerKind CommandMarker);
-
-  void actOnTParamCommandParamNameArg(TParamCommandComment *Command,
-                                      SourceLocation ArgLocBegin,
-                                      SourceLocation ArgLocEnd,
-                                      StringRef Arg);
-
-  void actOnTParamCommandFinish(TParamCommandComment *Command,
-                                ParagraphComment *Paragraph);
-
-  InlineCommandComment *actOnInlineCommand(SourceLocation CommandLocBegin,
-                                           SourceLocation CommandLocEnd,
-                                           unsigned CommandID);
-
-  InlineCommandComment *actOnInlineCommand(SourceLocation CommandLocBegin,
-                                           SourceLocation CommandLocEnd,
-                                           unsigned CommandID,
-                                           SourceLocation ArgLocBegin,
-                                           SourceLocation ArgLocEnd,
-                                           StringRef Arg);
-
-  InlineContentComment *actOnUnknownCommand(SourceLocation LocBegin,
-                                            SourceLocation LocEnd,
-                                            StringRef CommandName);
-
-  InlineContentComment *actOnUnknownCommand(SourceLocation LocBegin,
-                                            SourceLocation LocEnd,
-                                            unsigned CommandID);
-
-  TextComment *actOnText(SourceLocation LocBegin,
-                         SourceLocation LocEnd,
-                         StringRef Text);
-
-  VerbatimBlockComment *actOnVerbatimBlockStart(SourceLocation Loc,
-                                                unsigned CommandID);
-
-  VerbatimBlockLineComment *actOnVerbatimBlockLine(SourceLocation Loc,
-                                                   StringRef Text);
-
-  void actOnVerbatimBlockFinish(VerbatimBlockComment *Block,
-                                SourceLocation CloseNameLocBegin,
-                                StringRef CloseName,
-                                ArrayRef<VerbatimBlockLineComment *> Lines);
-
-  VerbatimLineComment *actOnVerbatimLine(SourceLocation LocBegin,
-                                         unsigned CommandID,
-                                         SourceLocation TextBegin,
-                                         StringRef Text);
-
-  HTMLStartTagComment *actOnHTMLStartTagStart(SourceLocation LocBegin,
-                                              StringRef TagName);
-
-  void actOnHTMLStartTagFinish(HTMLStartTagComment *Tag,
-                               ArrayRef<HTMLStartTagComment::Attribute> Attrs,
-                               SourceLocation GreaterLoc,
-                               bool IsSelfClosing);
-
-  HTMLEndTagComment *actOnHTMLEndTag(SourceLocation LocBegin,
-                                     SourceLocation LocEnd,
-                                     StringRef TagName);
-
-  FullComment *actOnFullComment(ArrayRef<BlockContentComment *> Blocks);
-
-  void checkBlockCommandEmptyParagraph(BlockCommandComment *Command);
-
-  void checkReturnsCommand(const BlockCommandComment *Command);
-
-  /// Emit diagnostics about duplicate block commands that should be
-  /// used only once per comment, e.g., \\brief and \\returns.
-  void checkBlockCommandDuplicate(const BlockCommandComment *Command);
-
-  void checkDeprecatedCommand(const BlockCommandComment *Comment);
-  
-  void checkFunctionDeclVerbatimLine(const BlockCommandComment *Comment);
-  
-  void checkContainerDeclVerbatimLine(const BlockCommandComment *Comment);
-  
-  void checkContainerDecl(const BlockCommandComment *Comment);
-
-  /// Resolve parameter names to parameter indexes in function declaration.
-  /// Emit diagnostics about unknown parametrs.
-  void resolveParamCommandIndexes(const FullComment *FC);
-
-  bool isFunctionDecl();
-  bool isAnyFunctionDecl();
-
-  /// \returns \c true if declaration that this comment is attached to declares
-  /// a function pointer.
-  bool isFunctionPointerVarDecl();
-  bool isFunctionOrMethodVariadic();
-  bool isObjCMethodDecl();
-  bool isObjCPropertyDecl();
-  bool isTemplateOrSpecialization();
-  bool isRecordLikeDecl();
-  bool isClassOrStructDecl();
-  bool isUnionDecl();
-  bool isObjCInterfaceDecl();
-  bool isObjCProtocolDecl();
-  bool isClassTemplateDecl();
-  bool isFunctionTemplateDecl();
-
-  ArrayRef<const ParmVarDecl *> getParamVars();
-
-  /// Extract all important semantic information from
-  /// \c ThisDeclInfo->ThisDecl into \c ThisDeclInfo members.
-  void inspectThisDecl();
-
-  /// Returns index of a function parameter with a given name.
-  unsigned resolveParmVarReference(StringRef Name,
-                                   ArrayRef<const ParmVarDecl *> ParamVars);
-
-  /// Returns index of a function parameter with the name closest to a given
-  /// typo.
-  unsigned correctTypoInParmVarReference(StringRef Typo,
-                                         ArrayRef<const ParmVarDecl *> ParamVars);
-
-  bool resolveTParamReference(StringRef Name,
-                              const TemplateParameterList *TemplateParameters,
-                              SmallVectorImpl<unsigned> *Position);
-
-  StringRef correctTypoInTParamReference(
-                              StringRef Typo,
-                              const TemplateParameterList *TemplateParameters);
-
-  InlineCommandComment::RenderKind
-  getInlineCommandRenderKind(StringRef Name) const;
-};
-
-} // end namespace comments
-} // end namespace clang
-
-#endif
-
diff --git a/include/clang/AST/CommentVisitor.h b/include/clang/AST/CommentVisitor.h
deleted file mode 100644
index 21641bf..0000000
--- a/include/clang/AST/CommentVisitor.h
+++ /dev/null
@@ -1,70 +0,0 @@
-//===--- CommentVisitor.h - Visitor for Comment subclasses ------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_AST_COMMENTVISITOR_H
-#define LLVM_CLANG_AST_COMMENTVISITOR_H
-
-#include "clang/AST/Comment.h"
-#include "llvm/Support/ErrorHandling.h"
-
-namespace clang {
-namespace comments {
-
-template <typename T> struct make_ptr       { typedef       T *type; };
-template <typename T> struct make_const_ptr { typedef const T *type; };
-
-template<template <typename> class Ptr, typename ImplClass, typename RetTy=void>
-class CommentVisitorBase {
-public:
-#define PTR(CLASS) typename Ptr<CLASS>::type
-#define DISPATCH(NAME, CLASS) \
- return static_cast<ImplClass*>(this)->visit ## NAME(static_cast<PTR(CLASS)>(C))
-
-  RetTy visit(PTR(Comment) C) {
-    if (!C)
-      return RetTy();
-
-    switch (C->getCommentKind()) {
-    default: llvm_unreachable("Unknown comment kind!");
-#define ABSTRACT_COMMENT(COMMENT)
-#define COMMENT(CLASS, PARENT) \
-    case Comment::CLASS##Kind: DISPATCH(CLASS, CLASS);
-#include "clang/AST/CommentNodes.inc"
-#undef ABSTRACT_COMMENT
-#undef COMMENT
-    }
-  }
-
-  // If the derived class does not implement a certain Visit* method, fall back
-  // on Visit* method for the superclass.
-#define ABSTRACT_COMMENT(COMMENT) COMMENT
-#define COMMENT(CLASS, PARENT) \
-  RetTy visit ## CLASS(PTR(CLASS) C) { DISPATCH(PARENT, PARENT); }
-#include "clang/AST/CommentNodes.inc"
-#undef ABSTRACT_COMMENT
-#undef COMMENT
-
-  RetTy visitComment(PTR(Comment) C) { return RetTy(); }
-
-#undef PTR
-#undef DISPATCH
-};
-
-template<typename ImplClass, typename RetTy=void>
-class CommentVisitor :
-    public CommentVisitorBase<make_ptr, ImplClass, RetTy> {};
-
-template<typename ImplClass, typename RetTy=void>
-class ConstCommentVisitor :
-    public CommentVisitorBase<make_const_ptr, ImplClass, RetTy> {};
-
-} // end namespace comments
-} // end namespace clang
-
-#endif
diff --git a/include/clang/AST/RawCommentList.h b/include/clang/AST/RawCommentList.h
index 8ba85c4..2eec0e8 100644
--- a/include/clang/AST/RawCommentList.h
+++ b/include/clang/AST/RawCommentList.h
@@ -10,7 +10,6 @@
 #ifndef LLVM_CLANG_AST_RAW_COMMENT_LIST_H
 #define LLVM_CLANG_AST_RAW_COMMENT_LIST_H
 
-#include "clang/Basic/CommentOptions.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/ADT/ArrayRef.h"
 
diff --git a/include/clang/Basic/AllDiagnostics.h b/include/clang/Basic/AllDiagnostics.h
index 7304c8f..9f4a255 100644
--- a/include/clang/Basic/AllDiagnostics.h
+++ b/include/clang/Basic/AllDiagnostics.h
@@ -16,7 +16,6 @@
 #define LLVM_CLANG_ALL_DIAGNOSTICS_H
 
 #include "clang/AST/ASTDiagnostic.h"
-#include "clang/AST/CommentDiagnostic.h"
 #include "clang/Analysis/AnalysisDiagnostic.h"
 #include "clang/Driver/DriverDiagnostic.h"
 #include "clang/Frontend/FrontendDiagnostic.h"
diff --git a/include/clang/Basic/CommentNodes.td b/include/clang/Basic/CommentNodes.td
deleted file mode 100644
index 7bf32b7..0000000
--- a/include/clang/Basic/CommentNodes.td
+++ /dev/null
@@ -1,27 +0,0 @@
-class Comment<bit abstract = 0> {
-  bit Abstract = abstract;
-}
-
-class DComment<Comment base, bit abstract = 0> : Comment<abstract> {
-  Comment Base = base;
-}
-
-def InlineContentComment : Comment<1>;
-  def TextComment : DComment<InlineContentComment>;
-  def InlineCommandComment : DComment<InlineContentComment>;
-  def HTMLTagComment : DComment<InlineContentComment, 1>;
-    def HTMLStartTagComment : DComment<HTMLTagComment>;
-    def HTMLEndTagComment : DComment<HTMLTagComment>;
-
-def BlockContentComment : Comment<1>;
-  def ParagraphComment : DComment<BlockContentComment>;
-  def BlockCommandComment : DComment<BlockContentComment>;
-    def ParamCommandComment : DComment<BlockCommandComment>;
-    def TParamCommandComment : DComment<BlockCommandComment>;
-    def VerbatimBlockComment : DComment<BlockCommandComment>;
-    def VerbatimLineComment : DComment<BlockCommandComment>;
-
-def VerbatimBlockLineComment : Comment;
-
-def FullComment : Comment;
-
diff --git a/include/clang/Basic/CommentOptions.h b/include/clang/Basic/CommentOptions.h
deleted file mode 100644
index 7991875..0000000
--- a/include/clang/Basic/CommentOptions.h
+++ /dev/null
@@ -1,39 +0,0 @@
-//===--- CommentOptions.h - Options for parsing comments -----*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// \brief Defines the clang::CommentOptions interface.
-///
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_COMMENTOPTIONS_H
-#define LLVM_CLANG_COMMENTOPTIONS_H
-
-#include <string>
-#include <vector>
-
-namespace clang {
-
-/// \brief Options for controlling comment parsing.
-struct CommentOptions {
-  typedef std::vector<std::string> BlockCommandNamesTy;
-
-  /// \brief Command names to treat as block commands in comments.
-  /// Should not include the leading backslash.
-  BlockCommandNamesTy BlockCommandNames;
-
-  /// \brief Treat ordinary comments as documentation comments.
-  bool ParseAllComments;
-
-  CommentOptions() : ParseAllComments(false) { }
-};
-
-}  // end namespace clang
-
-#endif
diff --git a/include/clang/Basic/Diagnostic.td b/include/clang/Basic/Diagnostic.td
index 5bcc2d5..592ab58 100644
--- a/include/clang/Basic/Diagnostic.td
+++ b/include/clang/Basic/Diagnostic.td
@@ -107,7 +107,6 @@ class DefaultRemark { DiagMapping DefaultMapping = MAP_REMARK; }
 // Definitions for Diagnostics.
 include "DiagnosticASTKinds.td"
 include "DiagnosticAnalysisKinds.td"
-include "DiagnosticCommentKinds.td"
 include "DiagnosticCommonKinds.td"
 include "DiagnosticDriverKinds.td"
 include "DiagnosticFrontendKinds.td"
diff --git a/include/clang/Basic/DiagnosticCommentKinds.td b/include/clang/Basic/DiagnosticCommentKinds.td
deleted file mode 100644
index 49296f9..0000000
--- a/include/clang/Basic/DiagnosticCommentKinds.td
+++ /dev/null
@@ -1,172 +0,0 @@
-//==--- DiagnosticCommentKinds.td - diagnostics related to comments -------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-let Component = "Comment" in {
-let CategoryName = "Documentation Issue" in {
-
-// HTML parsing errors.  These are under -Wdocumentation to make sure the user
-// knows that we didn't parse something as he might expect.
-
-def warn_doc_html_start_tag_expected_quoted_string : Warning<
-  "expected quoted string after equals sign">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def warn_doc_html_start_tag_expected_ident_or_greater : Warning<
-  "HTML start tag prematurely ended, expected attribute name or '>'">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def note_doc_html_tag_started_here : Note<
-  "HTML tag started here">;
-
-// HTML semantic errors
-
-def warn_doc_html_end_forbidden : Warning<
-  "HTML end tag '%0' is forbidden">,
-  InGroup<DocumentationHTML>, DefaultIgnore;
-
-def warn_doc_html_end_unbalanced : Warning<
-  "HTML end tag does not match any start tag">,
-  InGroup<DocumentationHTML>, DefaultIgnore;
-
-def warn_doc_html_start_end_mismatch : Warning<
-  "HTML start tag '%0' closed by '%1'">,
-  InGroup<DocumentationHTML>, DefaultIgnore;
-
-def note_doc_html_end_tag : Note<
-  "end tag">;
-
-def warn_doc_html_missing_end_tag : Warning<
-  "HTML tag '%0' requires an end tag">,
-  InGroup<DocumentationHTML>, DefaultIgnore;
-
-// Commands
-
-def warn_doc_block_command_empty_paragraph : Warning<
-  "empty paragraph passed to '%select{\\|@}0%1' command">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def warn_doc_block_command_duplicate : Warning<
-  "duplicated command '%select{\\|@}0%1'">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def note_doc_block_command_previous : Note<
-  "previous command '%select{\\|@}0%1' here">;
-
-def note_doc_block_command_previous_alias : Note<
-  "previous command '%select{\\|@}0%1' (an alias of '\\%2') here">;
-
-// \param command
-
-def warn_doc_param_invalid_direction : Warning<
-  "unrecognized parameter passing direction, "
-  "valid directions are '[in]', '[out]' and '[in,out]'">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def warn_doc_param_spaces_in_direction : Warning<
-  "whitespace is not allowed in parameter passing direction">,
-  InGroup<DocumentationPedantic>, DefaultIgnore;
-
-def warn_doc_param_not_attached_to_a_function_decl : Warning<
-  "'%select{\\|@}0param' command used in a comment that is not attached to "
-  "a function declaration">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def warn_doc_function_method_decl_mismatch : Warning<
-  "'%select{\\|@}0%select{function|functiongroup|method|methodgroup|callback}1' "
-  "command should be used in a comment attached to "
-  "%select{a function|a function|an Objective-C method|an Objective-C method|"
-  "a pointer to function}2 declaration">,
-  InGroup<Documentation>, DefaultIgnore;
-  
-def warn_doc_api_container_decl_mismatch : Warning<
-  "'%select{\\|@}0%select{class|interface|protocol|struct|union}1' "
-  "command should not be used in a comment attached to a "
-  "non-%select{class|interface|protocol|struct|union}2 declaration">,
-  InGroup<Documentation>, DefaultIgnore;
-  
-def warn_doc_container_decl_mismatch : Warning<
-  "'%select{\\|@}0%select{classdesign|coclass|dependency|helper"
-  "|helperclass|helps|instancesize|ownership|performance|security|superclass}1' "
-  "command should not be used in a comment attached to a non-container declaration">,
-  InGroup<Documentation>, DefaultIgnore;
-  
-def warn_doc_param_duplicate : Warning<
-  "parameter '%0' is already documented">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def note_doc_param_previous : Note<
-  "previous documentation">;
-
-def warn_doc_param_not_found : Warning<
-  "parameter '%0' not found in the function declaration">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def note_doc_param_name_suggestion : Note<
-  "did you mean '%0'?">;
-
-// tparam command
-
-def warn_doc_tparam_not_attached_to_a_template_decl : Warning<
-  "'%select{\\|@}0tparam' command used in a comment that is not attached to "
-  "a template declaration">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def warn_doc_tparam_duplicate : Warning<
-  "template parameter '%0' is already documented">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def note_doc_tparam_previous : Note<
-  "previous documentation">;
-
-def warn_doc_tparam_not_found : Warning<
-  "template parameter '%0' not found in the template declaration">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def note_doc_tparam_name_suggestion : Note<
-  "did you mean '%0'?">;
-
-// \returns command
-
-def warn_doc_returns_not_attached_to_a_function_decl : Warning<
-  "'%select{\\|@}0%1' command used in a comment that is not attached to "
-  "a function or method declaration">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def warn_doc_returns_attached_to_a_void_function : Warning<
-  "'%select{\\|@}0%1' command used in a comment that is attached to a "
-  "%select{function returning void|constructor|destructor|"
-  "method returning void}2">,
-  InGroup<Documentation>, DefaultIgnore;
-
-// \deprecated command
-
-def warn_doc_deprecated_not_sync : Warning<
-  "declaration is marked with '\\deprecated' command but does not have "
-  "a deprecation attribute">,
-  InGroup<DocumentationDeprecatedSync>, DefaultIgnore;
-
-def note_add_deprecation_attr : Note<
-  "add a deprecation attribute to the declaration to silence this warning">;
-
-// verbatim block commands
-
-def warn_verbatim_block_end_without_start : Warning<
-  "'%select{\\|@}0%1' command does not terminate a verbatim text block">,
-  InGroup<Documentation>, DefaultIgnore;
-
-def warn_unknown_comment_command_name : Warning<
-  "unknown command tag name">,
-  InGroup<DocumentationUnknownCommand>, DefaultIgnore;
-
-def warn_correct_comment_command_name : Warning<
-  "unknown command tag name '%0'; did you mean '%1'?">,
-  InGroup<Documentation>, DefaultIgnore;
-
-} // end of documentation issue category
-} // end of AST component
diff --git a/include/clang/Basic/DiagnosticIDs.h b/include/clang/Basic/DiagnosticIDs.h
index c952e49..364e273 100644
--- a/include/clang/Basic/DiagnosticIDs.h
+++ b/include/clang/Basic/DiagnosticIDs.h
@@ -34,8 +34,7 @@ namespace clang {
       DIAG_START_LEX           = DIAG_START_SERIALIZATION   +  120,
       DIAG_START_PARSE         = DIAG_START_LEX             +  300,
       DIAG_START_AST           = DIAG_START_PARSE           +  400,
-      DIAG_START_COMMENT       = DIAG_START_AST             +  100,
-      DIAG_START_SEMA          = DIAG_START_COMMENT         +  100,
+      DIAG_START_SEMA          = DIAG_START_AST             +  100,
       DIAG_START_ANALYSIS      = DIAG_START_SEMA            + 3000,
       DIAG_UPPER_LIMIT         = DIAG_START_ANALYSIS        +  100
     };
diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h
index e969161..f114e54 100644
--- a/include/clang/Basic/LangOptions.h
+++ b/include/clang/Basic/LangOptions.h
@@ -15,7 +15,6 @@
 #ifndef LLVM_CLANG_LANGOPTIONS_H
 #define LLVM_CLANG_LANGOPTIONS_H
 
-#include "clang/Basic/CommentOptions.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/ObjCRuntime.h"
 #include "clang/Basic/Visibility.h"
@@ -88,9 +87,6 @@ public:
 
   /// \brief The name of the current module.
   std::string CurrentModule;
-
-  /// \brief Options for parsing comments.
-  CommentOptions CommentOpts;
   
   LangOptions();
 
diff --git a/include/clang/Basic/Makefile b/include/clang/Basic/Makefile
index 5579a99..6a93141 100644
--- a/include/clang/Basic/Makefile
+++ b/include/clang/Basic/Makefile
@@ -1,7 +1,6 @@
 CLANG_LEVEL := ../../..
 BUILT_SOURCES = \
 	DiagnosticAnalysisKinds.inc DiagnosticASTKinds.inc \
-	DiagnosticCommentKinds.inc \
 	DiagnosticCommonKinds.inc DiagnosticDriverKinds.inc \
 	DiagnosticFrontendKinds.inc DiagnosticLexKinds.inc \
 	DiagnosticParseKinds.inc DiagnosticSemaKinds.inc \
diff --git a/include/clang/Index/CommentToXML.h b/include/clang/Index/CommentToXML.h
deleted file mode 100644
index 8444b14..0000000
--- a/include/clang/Index/CommentToXML.h
+++ /dev/null
@@ -1,50 +0,0 @@
-//===--- CommentToXML.h - Convert comments to XML representation ----------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_INDEX_COMMENTTOXML_H
-#define LLVM_CLANG_INDEX_COMMENTTOXML_H
-
-#include "clang/Basic/LLVM.h"
-
-namespace clang {
-class ASTContext;
-
-namespace comments {
-class FullComment;
-class HTMLTagComment;
-}
-
-namespace index {
-class SimpleFormatContext;
-
-class CommentToXMLConverter {
-  SimpleFormatContext *FormatContext;
-  unsigned FormatInMemoryUniqueId;
-
-public:
-  CommentToXMLConverter() : FormatContext(0), FormatInMemoryUniqueId(0) {}
-
-  void convertCommentToHTML(const comments::FullComment *FC,
-                            SmallVectorImpl<char> &HTML,
-                            const ASTContext &Context);
-
-  void convertHTMLTagNodeToText(const comments::HTMLTagComment *HTC,
-                                SmallVectorImpl<char> &Text,
-                                const ASTContext &Context);
-
-  void convertCommentToXML(const comments::FullComment *FC,
-                           SmallVectorImpl<char> &XML,
-                           const ASTContext &Context);
-};
-
-} // namespace index
-} // namespace clang
-
-#endif // LLVM_CLANG_INDEX_COMMENTTOXML_H
-
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 8a60beb..1184b3b 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -16,8 +16,6 @@
 #include "clang/AST/ASTMutationListener.h"
 #include "clang/AST/Attr.h"
 #include "clang/AST/CharUnits.h"
-#include "clang/AST/Comment.h"
-#include "clang/AST/CommentCommandTraits.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/DeclTemplate.h"
@@ -175,6 +173,8 @@ RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const {
     // When searching for comments during parsing, the comment we are looking
     // for is usually among the last two comments we parsed -- check them
     // first.
+    // FIXME: DOC
+#if 0
     RawComment CommentAtDeclLoc(
         SourceMgr, SourceRange(DeclLoc), false,
         LangOpts.CommentOpts.ParseAllComments);
@@ -195,6 +195,7 @@ RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const {
       Comment = std::lower_bound(RawComments.begin(), RawComments.end(),
                                  &CommentAtDeclLoc, Compare);
     }
+#endif
   }
 
   // Decompose the location for the declaration and find the beginning of the
@@ -415,132 +416,6 @@ static void addRedeclaredMethods(const ObjCMethodDecl *ObjCMethod,
   }
 }
 
-comments::FullComment *ASTContext::cloneFullComment(comments::FullComment *FC,
-                                                    const Decl *D) const {
-  comments::DeclInfo *ThisDeclInfo = new (*this) comments::DeclInfo;
-  ThisDeclInfo->CommentDecl = D;
-  ThisDeclInfo->IsFilled = false;
-  ThisDeclInfo->fill();
-  ThisDeclInfo->CommentDecl = FC->getDecl();
-  comments::FullComment *CFC =
-    new (*this) comments::FullComment(FC->getBlocks(),
-                                      ThisDeclInfo);
-  return CFC;
-  
-}
-
-comments::FullComment *ASTContext::getLocalCommentForDeclUncached(const Decl *D) const {
-  const RawComment *RC = getRawCommentForDeclNoCache(D);
-  return RC ? RC->parse(*this, 0, D) : 0;
-}
-
-comments::FullComment *ASTContext::getCommentForDecl(
-                                              const Decl *D,
-                                              const Preprocessor *PP) const {
-  if (D->isInvalidDecl())
-    return NULL;
-  D = adjustDeclToTemplate(D);
-  
-  const Decl *Canonical = D->getCanonicalDecl();
-  llvm::DenseMap<const Decl *, comments::FullComment *>::iterator Pos =
-      ParsedComments.find(Canonical);
-  
-  if (Pos != ParsedComments.end()) {
-    if (Canonical != D) {
-      comments::FullComment *FC = Pos->second;
-      comments::FullComment *CFC = cloneFullComment(FC, D);
-      return CFC;
-    }
-    return Pos->second;
-  }
-  
-  const Decl *OriginalDecl;
-  
-  const RawComment *RC = getRawCommentForAnyRedecl(D, &OriginalDecl);
-  if (!RC) {
-    if (isa<ObjCMethodDecl>(D) || isa<FunctionDecl>(D)) {
-      SmallVector<const NamedDecl*, 8> Overridden;
-      const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(D);
-      if (OMD && OMD->isPropertyAccessor())
-        if (const ObjCPropertyDecl *PDecl = OMD->findPropertyDecl())
-          if (comments::FullComment *FC = getCommentForDecl(PDecl, PP))
-            return cloneFullComment(FC, D);
-      if (OMD)
-        addRedeclaredMethods(OMD, Overridden);
-      getOverriddenMethods(dyn_cast<NamedDecl>(D), Overridden);
-      for (unsigned i = 0, e = Overridden.size(); i < e; i++)
-        if (comments::FullComment *FC = getCommentForDecl(Overridden[i], PP))
-          return cloneFullComment(FC, D);
-    }
-    else if (const TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(D)) {
-      // Attach any tag type's documentation to its typedef if latter
-      // does not have one of its own.
-      QualType QT = TD->getUnderlyingType();
-      if (const TagType *TT = QT->getAs<TagType>())
-        if (const Decl *TD = TT->getDecl())
-          if (comments::FullComment *FC = getCommentForDecl(TD, PP))
-            return cloneFullComment(FC, D);
-    }
-    else if (const ObjCInterfaceDecl *IC = dyn_cast<ObjCInterfaceDecl>(D)) {
-      while (IC->getSuperClass()) {
-        IC = IC->getSuperClass();
-        if (comments::FullComment *FC = getCommentForDecl(IC, PP))
-          return cloneFullComment(FC, D);
-      }
-    }
-    else if (const ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(D)) {
-      if (const ObjCInterfaceDecl *IC = CD->getClassInterface())
-        if (comments::FullComment *FC = getCommentForDecl(IC, PP))
-          return cloneFullComment(FC, D);
-    }
-    else if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D)) {
-      if (!(RD = RD->getDefinition()))
-        return NULL;
-      // Check non-virtual bases.
-      for (const auto &I : RD->bases()) {
-        if (I.isVirtual() || (I.getAccessSpecifier() != AS_public))
-          continue;
-        QualType Ty = I.getType();
-        if (Ty.isNull())
-          continue;
-        if (const CXXRecordDecl *NonVirtualBase = Ty->getAsCXXRecordDecl()) {
-          if (!(NonVirtualBase= NonVirtualBase->getDefinition()))
-            continue;
-        
-          if (comments::FullComment *FC = getCommentForDecl((NonVirtualBase), PP))
-            return cloneFullComment(FC, D);
-        }
-      }
-      // Check virtual bases.
-      for (const auto &I : RD->vbases()) {
-        if (I.getAccessSpecifier() != AS_public)
-          continue;
-        QualType Ty = I.getType();
-        if (Ty.isNull())
-          continue;
-        if (const CXXRecordDecl *VirtualBase = Ty->getAsCXXRecordDecl()) {
-          if (!(VirtualBase= VirtualBase->getDefinition()))
-            continue;
-          if (comments::FullComment *FC = getCommentForDecl((VirtualBase), PP))
-            return cloneFullComment(FC, D);
-        }
-      }
-    }
-    return NULL;
-  }
-  
-  // If the RawComment was attached to other redeclaration of this Decl, we
-  // should parse the comment in context of that other Decl.  This is important
-  // because comments can contain references to parameter names which can be
-  // different across redeclarations.
-  if (D != OriginalDecl)
-    return getCommentForDecl(OriginalDecl, PP);
-
-  comments::FullComment *FC = RC->parse(*this, PP, D);
-  ParsedComments[Canonical] = FC;
-  return FC;
-}
-
 void 
 ASTContext::CanonicalTemplateTemplateParm::Profile(llvm::FoldingSetNodeID &ID, 
                                                TemplateTemplateParmDecl *Parm) {
@@ -750,7 +625,6 @@ ASTContext::ASTContext(LangOptions& LOpts, SourceManager &SM,
     DeclarationNames(*this),
     ExternalSource(0), Listener(0),
     Comments(SM), CommentsLoaded(false),
-    CommentCommandTraits(BumpAlloc, LOpts.CommentOpts),
     LastSDM(0, 0)
 {
   if (size_reserve > 0) Types.reserve(size_reserve);
diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp
index 3901979..fb92410 100644
--- a/lib/AST/ASTDumper.cpp
+++ b/lib/AST/ASTDumper.cpp
@@ -14,7 +14,6 @@
 
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/Attr.h"
-#include "clang/AST/CommentVisitor.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclLookups.h"
 #include "clang/AST/DeclObjC.h"
@@ -24,7 +23,6 @@
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace clang;
-using namespace clang::comments;
 
 //===----------------------------------------------------------------------===//
 // ASTDumper Visitor
@@ -89,10 +87,8 @@ namespace  {
   static const TerminalColor IndentColor = { raw_ostream::BLUE, false };
 
   class ASTDumper
-      : public ConstDeclVisitor<ASTDumper>, public ConstStmtVisitor<ASTDumper>,
-        public ConstCommentVisitor<ASTDumper> {
+      : public ConstDeclVisitor<ASTDumper>, public ConstStmtVisitor<ASTDumper> {
     raw_ostream &OS;
-    const CommandTraits *Traits;
     const SourceManager *SM;
     bool IsFirstLine;
 
@@ -114,9 +110,6 @@ namespace  {
     const char *LastLocFilename;
     unsigned LastLocLine;
 
-    /// The \c FullComment parent of the comment being dumped.
-    const FullComment *FC;
-
     bool ShowColors;
 
     class IndentScope {
@@ -182,15 +175,13 @@ namespace  {
     };
 
   public:
-    ASTDumper(raw_ostream &OS, const CommandTraits *Traits,
-              const SourceManager *SM)
-      : OS(OS), Traits(Traits), SM(SM), IsFirstLine(true), MoreChildren(false),
-        LastLocFilename(""), LastLocLine(~0U), FC(0),
+    ASTDumper(raw_ostream &OS, const SourceManager *SM)
+      : OS(OS), SM(SM), IsFirstLine(true), MoreChildren(false),
+        LastLocFilename(""), LastLocLine(~0U),
         ShowColors(SM && SM->getDiagnostics().getShowColors()) { }
 
-    ASTDumper(raw_ostream &OS, const CommandTraits *Traits,
-              const SourceManager *SM, bool ShowColors)
-      : OS(OS), Traits(Traits), SM(SM), IsFirstLine(true), MoreChildren(false),
+    ASTDumper(raw_ostream &OS, const SourceManager *SM, bool ShowColors)
+      : OS(OS), SM(SM), IsFirstLine(true), MoreChildren(false),
         LastLocFilename(""), LastLocLine(~0U),
         ShowColors(ShowColors) { }
 
@@ -200,7 +191,6 @@ namespace  {
 
     void dumpDecl(const Decl *D);
     void dumpStmt(const Stmt *S);
-    void dumpFullComment(const FullComment *C);
 
     // Formatting
     void indent();
@@ -352,24 +342,6 @@ namespace  {
     void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node);
     void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node);
     void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node);
-
-    // Comments.
-    const char *getCommandName(unsigned CommandID);
-    void dumpComment(const Comment *C);
-
-    // Inline comments.
-    void visitTextComment(const TextComment *C);
-    void visitInlineCommandComment(const InlineCommandComment *C);
-    void visitHTMLStartTagComment(const HTMLStartTagComment *C);
-    void visitHTMLEndTagComment(const HTMLEndTagComment *C);
-
-    // Block comments.
-    void visitBlockCommandComment(const BlockCommandComment *C);
-    void visitParamCommandComment(const ParamCommandComment *C);
-    void visitTParamCommandComment(const TParamCommandComment *C);
-    void visitVerbatimBlockComment(const VerbatimBlockComment *C);
-    void visitVerbatimBlockLineComment(const VerbatimBlockLineComment *C);
-    void visitVerbatimLineComment(const VerbatimLineComment *C);
   };
 }
 
@@ -801,16 +773,14 @@ void ASTDumper::dumpDecl(const Decl *D) {
       OS << " hidden";
 
   bool HasAttrs = D->hasAttrs();
-  const FullComment *Comment =
-      D->getASTContext().getLocalCommentForDeclUncached(D);
   // Decls within functions are visited by the body
   bool HasDeclContext = !isa<FunctionDecl>(*D) && !isa<ObjCMethodDecl>(*D) &&
                          hasNodes(dyn_cast<DeclContext>(D));
 
-  setMoreChildren(HasAttrs || Comment || HasDeclContext);
+  setMoreChildren(HasAttrs || HasDeclContext);
   ConstDeclVisitor<ASTDumper>::Visit(D);
 
-  setMoreChildren(Comment || HasDeclContext);
+  setMoreChildren(HasDeclContext);
   for (Decl::attr_iterator I = D->attr_begin(), E = D->attr_end();
        I != E; ++I) {
     if (I + 1 == E)
@@ -820,7 +790,6 @@ void ASTDumper::dumpDecl(const Decl *D) {
 
   setMoreChildren(HasDeclContext);
   lastChild();
-  dumpFullComment(Comment);
 
   if (D->isInvalidDecl())
     OS << " invalid";
@@ -1970,166 +1939,18 @@ void ASTDumper::VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node) {
 }
 
 //===----------------------------------------------------------------------===//
-// Comments
-//===----------------------------------------------------------------------===//
-
-const char *ASTDumper::getCommandName(unsigned CommandID) {
-  if (Traits)
-    return Traits->getCommandInfo(CommandID)->Name;
-  const CommandInfo *Info = CommandTraits::getBuiltinCommandInfo(CommandID);
-  if (Info)
-    return Info->Name;
-  return "<not a builtin command>";
-}
-
-void ASTDumper::dumpFullComment(const FullComment *C) {
-  if (!C)
-    return;
-
-  FC = C;
-  dumpComment(C);
-  FC = 0;
-}
-
-void ASTDumper::dumpComment(const Comment *C) {
-  IndentScope Indent(*this);
-
-  if (!C) {
-    ColorScope Color(*this, NullColor);
-    OS << "<<<NULL>>>";
-    return;
-  }
-
-  {
-    ColorScope Color(*this, CommentColor);
-    OS << C->getCommentKindName();
-  }
-  dumpPointer(C);
-  dumpSourceRange(C->getSourceRange());
-  ConstCommentVisitor<ASTDumper>::visit(C);
-  for (Comment::child_iterator I = C->child_begin(), E = C->child_end();
-       I != E; ++I) {
-    if (I + 1 == E)
-      lastChild();
-    dumpComment(*I);
-  }
-}
-
-void ASTDumper::visitTextComment(const TextComment *C) {
-  OS << " Text=\"" << C->getText() << "\"";
-}
-
-void ASTDumper::visitInlineCommandComment(const InlineCommandComment *C) {
-  OS << " Name=\"" << getCommandName(C->getCommandID()) << "\"";
-  switch (C->getRenderKind()) {
-  case InlineCommandComment::RenderNormal:
-    OS << " RenderNormal";
-    break;
-  case InlineCommandComment::RenderBold:
-    OS << " RenderBold";
-    break;
-  case InlineCommandComment::RenderMonospaced:
-    OS << " RenderMonospaced";
-    break;
-  case InlineCommandComment::RenderEmphasized:
-    OS << " RenderEmphasized";
-    break;
-  }
-
-  for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i)
-    OS << " Arg[" << i << "]=\"" << C->getArgText(i) << "\"";
-}
-
-void ASTDumper::visitHTMLStartTagComment(const HTMLStartTagComment *C) {
-  OS << " Name=\"" << C->getTagName() << "\"";
-  if (C->getNumAttrs() != 0) {
-    OS << " Attrs: ";
-    for (unsigned i = 0, e = C->getNumAttrs(); i != e; ++i) {
-      const HTMLStartTagComment::Attribute &Attr = C->getAttr(i);
-      OS << " \"" << Attr.Name << "=\"" << Attr.Value << "\"";
-    }
-  }
-  if (C->isSelfClosing())
-    OS << " SelfClosing";
-}
-
-void ASTDumper::visitHTMLEndTagComment(const HTMLEndTagComment *C) {
-  OS << " Name=\"" << C->getTagName() << "\"";
-}
-
-void ASTDumper::visitBlockCommandComment(const BlockCommandComment *C) {
-  OS << " Name=\"" << getCommandName(C->getCommandID()) << "\"";
-  for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i)
-    OS << " Arg[" << i << "]=\"" << C->getArgText(i) << "\"";
-}
-
-void ASTDumper::visitParamCommandComment(const ParamCommandComment *C) {
-  OS << " " << ParamCommandComment::getDirectionAsString(C->getDirection());
-
-  if (C->isDirectionExplicit())
-    OS << " explicitly";
-  else
-    OS << " implicitly";
-
-  if (C->hasParamName()) {
-    if (C->isParamIndexValid())
-      OS << " Param=\"" << C->getParamName(FC) << "\"";
-    else
-      OS << " Param=\"" << C->getParamNameAsWritten() << "\"";
-  }
-
-  if (C->isParamIndexValid() && !C->isVarArgParam())
-    OS << " ParamIndex=" << C->getParamIndex();
-}
-
-void ASTDumper::visitTParamCommandComment(const TParamCommandComment *C) {
-  if (C->hasParamName()) {
-    if (C->isPositionValid())
-      OS << " Param=\"" << C->getParamName(FC) << "\"";
-    else
-      OS << " Param=\"" << C->getParamNameAsWritten() << "\"";
-  }
-
-  if (C->isPositionValid()) {
-    OS << " Position=<";
-    for (unsigned i = 0, e = C->getDepth(); i != e; ++i) {
-      OS << C->getIndex(i);
-      if (i != e - 1)
-        OS << ", ";
-    }
-    OS << ">";
-  }
-}
-
-void ASTDumper::visitVerbatimBlockComment(const VerbatimBlockComment *C) {
-  OS << " Name=\"" << getCommandName(C->getCommandID()) << "\""
-        " CloseName=\"" << C->getCloseName() << "\"";
-}
-
-void ASTDumper::visitVerbatimBlockLineComment(
-    const VerbatimBlockLineComment *C) {
-  OS << " Text=\"" << C->getText() << "\"";
-}
-
-void ASTDumper::visitVerbatimLineComment(const VerbatimLineComment *C) {
-  OS << " Text=\"" << C->getText() << "\"";
-}
-
-//===----------------------------------------------------------------------===//
 // Decl method implementations
 //===----------------------------------------------------------------------===//
 
 LLVM_DUMP_METHOD void Decl::dump() const { dump(llvm::errs()); }
 
 LLVM_DUMP_METHOD void Decl::dump(raw_ostream &OS) const {
-  ASTDumper P(OS, &getASTContext().getCommentCommandTraits(),
-              &getASTContext().getSourceManager());
+  ASTDumper P(OS, &getASTContext().getSourceManager());
   P.dumpDecl(this);
 }
 
 LLVM_DUMP_METHOD void Decl::dumpColor() const {
-  ASTDumper P(llvm::errs(), &getASTContext().getCommentCommandTraits(),
-              &getASTContext().getSourceManager(), /*ShowColors*/true);
+  ASTDumper P(llvm::errs(), &getASTContext().getSourceManager(), /*ShowColors*/true);
   P.dumpDecl(this);
 }
 
@@ -2142,7 +1963,7 @@ LLVM_DUMP_METHOD void DeclContext::dumpLookups(raw_ostream &OS) const {
   while (!DC->isTranslationUnit())
     DC = DC->getParent();
   ASTContext &Ctx = cast<TranslationUnitDecl>(DC)->getASTContext();
-  ASTDumper P(OS, &Ctx.getCommentCommandTraits(), &Ctx.getSourceManager());
+  ASTDumper P(OS, &Ctx.getSourceManager());
   P.dumpLookups(this);
 }
 
@@ -2160,35 +1981,11 @@ LLVM_DUMP_METHOD void Stmt::dump(raw_ostream &OS, SourceManager &SM) const {
 }
 
 LLVM_DUMP_METHOD void Stmt::dump() const {
-  ASTDumper P(llvm::errs(), 0, 0);
+  ASTDumper P(llvm::errs(), 0);
   P.dumpStmt(this);
 }
 
 LLVM_DUMP_METHOD void Stmt::dumpColor() const {
-  ASTDumper P(llvm::errs(), 0, 0, /*ShowColors*/true);
+  ASTDumper P(llvm::errs(), 0, /*ShowColors*/true);
   P.dumpStmt(this);
 }
-
-//===----------------------------------------------------------------------===//
-// Comment method implementations
-//===----------------------------------------------------------------------===//
-
-LLVM_DUMP_METHOD void Comment::dump() const { dump(llvm::errs(), 0, 0); }
-
-LLVM_DUMP_METHOD void Comment::dump(const ASTContext &Context) const {
-  dump(llvm::errs(), &Context.getCommentCommandTraits(),
-       &Context.getSourceManager());
-}
-
-void Comment::dump(raw_ostream &OS, const CommandTraits *Traits,
-                   const SourceManager *SM) const {
-  const FullComment *FC = dyn_cast<FullComment>(this);
-  ASTDumper D(OS, Traits, SM);
-  D.dumpFullComment(FC);
-}
-
-LLVM_DUMP_METHOD void Comment::dumpColor() const {
-  const FullComment *FC = dyn_cast<FullComment>(this);
-  ASTDumper D(llvm::errs(), 0, 0, /*ShowColors*/true);
-  D.dumpFullComment(FC);
-}
diff --git a/lib/AST/CMakeLists.txt b/lib/AST/CMakeLists.txt
index 9006be6..27de38b 100644
--- a/lib/AST/CMakeLists.txt
+++ b/lib/AST/CMakeLists.txt
@@ -10,12 +10,6 @@ add_clang_library(clangAST
   ASTTypeTraits.cpp
   AttrImpl.cpp
   CXXInheritance.cpp
-  Comment.cpp
-  CommentBriefParser.cpp
-  CommentCommandTraits.cpp
-  CommentLexer.cpp
-  CommentParser.cpp
-  CommentSema.cpp
   Decl.cpp
   DeclarationName.cpp
   DeclBase.cpp
diff --git a/lib/AST/Comment.cpp b/lib/AST/Comment.cpp
deleted file mode 100644
index b0b2351..0000000
--- a/lib/AST/Comment.cpp
+++ /dev/null
@@ -1,354 +0,0 @@
-//===--- Comment.cpp - Comment AST node implementation --------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/Comment.h"
-#include "clang/AST/Decl.h"
-#include "clang/AST/DeclObjC.h"
-#include "clang/AST/DeclTemplate.h"
-#include "clang/Basic/CharInfo.h"
-#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/raw_ostream.h"
-
-namespace clang {
-namespace comments {
-
-const char *Comment::getCommentKindName() const {
-  switch (getCommentKind()) {
-  case NoCommentKind: return "NoCommentKind";
-#define ABSTRACT_COMMENT(COMMENT)
-#define COMMENT(CLASS, PARENT) \
-  case CLASS##Kind: \
-    return #CLASS;
-#include "clang/AST/CommentNodes.inc"
-#undef COMMENT
-#undef ABSTRACT_COMMENT
-  }
-  llvm_unreachable("Unknown comment kind!");
-}
-
-namespace {
-struct good {};
-struct bad {};
-
-template <typename T>
-good implements_child_begin_end(Comment::child_iterator (T::*)() const) {
-  return good();
-}
-
-LLVM_ATTRIBUTE_UNUSED
-static inline bad implements_child_begin_end(
-                      Comment::child_iterator (Comment::*)() const) {
-  return bad();
-}
-
-#define ASSERT_IMPLEMENTS_child_begin(function) \
-  (void) good(implements_child_begin_end(function))
-
-LLVM_ATTRIBUTE_UNUSED
-static inline void CheckCommentASTNodes() {
-#define ABSTRACT_COMMENT(COMMENT)
-#define COMMENT(CLASS, PARENT) \
-  ASSERT_IMPLEMENTS_child_begin(&CLASS::child_begin); \
-  ASSERT_IMPLEMENTS_child_begin(&CLASS::child_end);
-#include "clang/AST/CommentNodes.inc"
-#undef COMMENT
-#undef ABSTRACT_COMMENT
-}
-
-#undef ASSERT_IMPLEMENTS_child_begin
-
-} // end unnamed namespace
-
-Comment::child_iterator Comment::child_begin() const {
-  switch (getCommentKind()) {
-  case NoCommentKind: llvm_unreachable("comment without a kind");
-#define ABSTRACT_COMMENT(COMMENT)
-#define COMMENT(CLASS, PARENT) \
-  case CLASS##Kind: \
-    return static_cast<const CLASS *>(this)->child_begin();
-#include "clang/AST/CommentNodes.inc"
-#undef COMMENT
-#undef ABSTRACT_COMMENT
-  }
-  llvm_unreachable("Unknown comment kind!");
-}
-
-Comment::child_iterator Comment::child_end() const {
-  switch (getCommentKind()) {
-  case NoCommentKind: llvm_unreachable("comment without a kind");
-#define ABSTRACT_COMMENT(COMMENT)
-#define COMMENT(CLASS, PARENT) \
-  case CLASS##Kind: \
-    return static_cast<const CLASS *>(this)->child_end();
-#include "clang/AST/CommentNodes.inc"
-#undef COMMENT
-#undef ABSTRACT_COMMENT
-  }
-  llvm_unreachable("Unknown comment kind!");
-}
-
-bool TextComment::isWhitespaceNoCache() const {
-  for (StringRef::const_iterator I = Text.begin(), E = Text.end();
-       I != E; ++I) {
-    if (!clang::isWhitespace(*I))
-      return false;
-  }
-  return true;
-}
-
-bool ParagraphComment::isWhitespaceNoCache() const {
-  for (child_iterator I = child_begin(), E = child_end(); I != E; ++I) {
-    if (const TextComment *TC = dyn_cast<TextComment>(*I)) {
-      if (!TC->isWhitespace())
-        return false;
-    } else
-      return false;
-  }
-  return true;
-}
-
-const char *ParamCommandComment::getDirectionAsString(PassDirection D) {
-  switch (D) {
-  case ParamCommandComment::In:
-    return "[in]";
-  case ParamCommandComment::Out:
-    return "[out]";
-  case ParamCommandComment::InOut:
-    return "[in,out]";
-  }
-  llvm_unreachable("unknown PassDirection");
-}
-
-void DeclInfo::fill() {
-  assert(!IsFilled);
-
-  // Set defaults.
-  Kind = OtherKind;
-  TemplateKind = NotTemplate;
-  IsObjCMethod = false;
-  IsInstanceMethod = false;
-  IsClassMethod = false;
-  ParamVars = None;
-  TemplateParameters = NULL;
-
-  if (!CommentDecl) {
-    // If there is no declaration, the defaults is our only guess.
-    IsFilled = true;
-    return;
-  }
-  CurrentDecl = CommentDecl;
-  
-  Decl::Kind K = CommentDecl->getKind();
-  switch (K) {
-  default:
-    // Defaults are should be good for declarations we don't handle explicitly.
-    break;
-  case Decl::Function:
-  case Decl::CXXMethod:
-  case Decl::CXXConstructor:
-  case Decl::CXXDestructor:
-  case Decl::CXXConversion: {
-    const FunctionDecl *FD = cast<FunctionDecl>(CommentDecl);
-    Kind = FunctionKind;
-    ParamVars = ArrayRef<const ParmVarDecl *>(FD->param_begin(),
-                                              FD->getNumParams());
-    ReturnType = FD->getReturnType();
-    unsigned NumLists = FD->getNumTemplateParameterLists();
-    if (NumLists != 0) {
-      TemplateKind = TemplateSpecialization;
-      TemplateParameters =
-          FD->getTemplateParameterList(NumLists - 1);
-    }
-
-    if (K == Decl::CXXMethod || K == Decl::CXXConstructor ||
-        K == Decl::CXXDestructor || K == Decl::CXXConversion) {
-      const CXXMethodDecl *MD = cast<CXXMethodDecl>(CommentDecl);
-      IsInstanceMethod = MD->isInstance();
-      IsClassMethod = !IsInstanceMethod;
-    }
-    break;
-  }
-  case Decl::ObjCMethod: {
-    const ObjCMethodDecl *MD = cast<ObjCMethodDecl>(CommentDecl);
-    Kind = FunctionKind;
-    ParamVars = ArrayRef<const ParmVarDecl *>(MD->param_begin(),
-                                              MD->param_size());
-    ReturnType = MD->getReturnType();
-    IsObjCMethod = true;
-    IsInstanceMethod = MD->isInstanceMethod();
-    IsClassMethod = !IsInstanceMethod;
-    break;
-  }
-  case Decl::FunctionTemplate: {
-    const FunctionTemplateDecl *FTD = cast<FunctionTemplateDecl>(CommentDecl);
-    Kind = FunctionKind;
-    TemplateKind = Template;
-    const FunctionDecl *FD = FTD->getTemplatedDecl();
-    ParamVars = ArrayRef<const ParmVarDecl *>(FD->param_begin(),
-                                              FD->getNumParams());
-    ReturnType = FD->getReturnType();
-    TemplateParameters = FTD->getTemplateParameters();
-    break;
-  }
-  case Decl::ClassTemplate: {
-    const ClassTemplateDecl *CTD = cast<ClassTemplateDecl>(CommentDecl);
-    Kind = ClassKind;
-    TemplateKind = Template;
-    TemplateParameters = CTD->getTemplateParameters();
-    break;
-  }
-  case Decl::ClassTemplatePartialSpecialization: {
-    const ClassTemplatePartialSpecializationDecl *CTPSD =
-        cast<ClassTemplatePartialSpecializationDecl>(CommentDecl);
-    Kind = ClassKind;
-    TemplateKind = TemplatePartialSpecialization;
-    TemplateParameters = CTPSD->getTemplateParameters();
-    break;
-  }
-  case Decl::ClassTemplateSpecialization:
-    Kind = ClassKind;
-    TemplateKind = TemplateSpecialization;
-    break;
-  case Decl::Record:
-  case Decl::CXXRecord:
-    Kind = ClassKind;
-    break;
-  case Decl::Var:
-  case Decl::Field:
-  case Decl::EnumConstant:
-  case Decl::ObjCIvar:
-  case Decl::ObjCAtDefsField:
-    Kind = VariableKind;
-    break;
-  case Decl::Namespace:
-    Kind = NamespaceKind;
-    break;
-  case Decl::Typedef: {
-    Kind = TypedefKind;
-    // If this is a typedef to something we consider a function, extract
-    // arguments and return type.
-    const TypedefDecl *TD = cast<TypedefDecl>(CommentDecl);
-    const TypeSourceInfo *TSI = TD->getTypeSourceInfo();
-    if (!TSI)
-      break;
-    TypeLoc TL = TSI->getTypeLoc().getUnqualifiedLoc();
-    while (true) {
-      TL = TL.IgnoreParens();
-      // Look through qualified types.
-      if (QualifiedTypeLoc QualifiedTL = TL.getAs<QualifiedTypeLoc>()) {
-        TL = QualifiedTL.getUnqualifiedLoc();
-        continue;
-      }
-      // Look through pointer types.
-      if (PointerTypeLoc PointerTL = TL.getAs<PointerTypeLoc>()) {
-        TL = PointerTL.getPointeeLoc().getUnqualifiedLoc();
-        continue;
-      }
-      // Look through reference types.
-      if (ReferenceTypeLoc ReferenceTL = TL.getAs<ReferenceTypeLoc>()) {
-        TL = ReferenceTL.getPointeeLoc().getUnqualifiedLoc();
-        continue;
-      }
-      // Look through adjusted types.
-      if (AdjustedTypeLoc ATL = TL.getAs<AdjustedTypeLoc>()) {
-        TL = ATL.getOriginalLoc();
-        continue;
-      }
-      if (BlockPointerTypeLoc BlockPointerTL =
-              TL.getAs<BlockPointerTypeLoc>()) {
-        TL = BlockPointerTL.getPointeeLoc().getUnqualifiedLoc();
-        continue;
-      }
-      if (MemberPointerTypeLoc MemberPointerTL =
-              TL.getAs<MemberPointerTypeLoc>()) {
-        TL = MemberPointerTL.getPointeeLoc().getUnqualifiedLoc();
-        continue;
-      }
-      if (ElaboratedTypeLoc ETL = TL.getAs<ElaboratedTypeLoc>()) {
-        TL = ETL.getNamedTypeLoc();
-        continue;
-      }
-      // Is this a typedef for a function type?
-      if (FunctionTypeLoc FTL = TL.getAs<FunctionTypeLoc>()) {
-        Kind = FunctionKind;
-        ArrayRef<ParmVarDecl *> Params = FTL.getParams();
-        ParamVars = ArrayRef<const ParmVarDecl *>(Params.data(),
-                                                  Params.size());
-        ReturnType = FTL.getReturnLoc().getType();
-        break;
-      }
-      if (TemplateSpecializationTypeLoc STL =
-              TL.getAs<TemplateSpecializationTypeLoc>()) {
-        // If we have a typedef to a template specialization with exactly one
-        // template argument of a function type, this looks like std::function,
-        // boost::function, or other function wrapper.  Treat these typedefs as
-        // functions.
-        if (STL.getNumArgs() != 1)
-          break;
-        TemplateArgumentLoc MaybeFunction = STL.getArgLoc(0);
-        if (MaybeFunction.getArgument().getKind() != TemplateArgument::Type)
-          break;
-        TypeSourceInfo *MaybeFunctionTSI = MaybeFunction.getTypeSourceInfo();
-        TypeLoc TL = MaybeFunctionTSI->getTypeLoc().getUnqualifiedLoc();
-        if (FunctionTypeLoc FTL = TL.getAs<FunctionTypeLoc>()) {
-          Kind = FunctionKind;
-          ArrayRef<ParmVarDecl *> Params = FTL.getParams();
-          ParamVars = ArrayRef<const ParmVarDecl *>(Params.data(),
-                                                    Params.size());
-          ReturnType = FTL.getReturnLoc().getType();
-        }
-        break;
-      }
-      break;
-    }
-    break;
-  }
-  case Decl::TypeAlias:
-    Kind = TypedefKind;
-    break;
-  case Decl::TypeAliasTemplate: {
-    const TypeAliasTemplateDecl *TAT = cast<TypeAliasTemplateDecl>(CommentDecl);
-    Kind = TypedefKind;
-    TemplateKind = Template;
-    TemplateParameters = TAT->getTemplateParameters();
-    break;
-  }
-  case Decl::Enum:
-    Kind = EnumKind;
-    break;
-  }
-
-  IsFilled = true;
-}
-
-StringRef ParamCommandComment::getParamName(const FullComment *FC) const {
-  assert(isParamIndexValid());
-  if (isVarArgParam())
-    return "...";
-  return FC->getDeclInfo()->ParamVars[getParamIndex()]->getName();
-}
-
-StringRef TParamCommandComment::getParamName(const FullComment *FC) const {
-  assert(isPositionValid());
-  const TemplateParameterList *TPL = FC->getDeclInfo()->TemplateParameters;
-  for (unsigned i = 0, e = getDepth(); i != e; ++i) {
-    if (i == e-1)
-      return TPL->getParam(getIndex(i))->getName();
-    const NamedDecl *Param = TPL->getParam(getIndex(i));
-    if (const TemplateTemplateParmDecl *TTP =
-          dyn_cast<TemplateTemplateParmDecl>(Param))
-      TPL = TTP->getTemplateParameters();
-  }
-  return "";
-}
-
-} // end namespace comments
-} // end namespace clang
-
diff --git a/lib/AST/CommentBriefParser.cpp b/lib/AST/CommentBriefParser.cpp
deleted file mode 100644
index 090b921..0000000
--- a/lib/AST/CommentBriefParser.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-//===--- CommentBriefParser.cpp - Dumb comment parser ---------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/AST/CommentBriefParser.h"
-#include "clang/AST/CommentCommandTraits.h"
-#include "llvm/ADT/StringSwitch.h"
-
-namespace clang {
-namespace comments {
-
-namespace {
-inline bool isWhitespace(char C) {
-  return C == ' ' || C == '\n' || C == '\r' ||
-         C == '\t' || C == '\f' || C == '\v';
-}
-
-/// Convert all whitespace into spaces, remove leading and trailing spaces,
-/// compress multiple spaces into one.
-void cleanupBrief(std::string &S) {
-  bool PrevWasSpace = true;
-  std::string::iterator O = S.begin();
-  for (std::string::iterator I = S.begin(), E = S.end();
-       I != E; ++I) {
-    const char C = *I;
-    if (isWhitespace(C)) {
-      if (!PrevWasSpace) {
-        *O++ = ' ';
-        PrevWasSpace = true;
-      }
-      continue;
-    } else {
-      *O++ = C;
-      PrevWasSpace = false;
-    }
-  }
-  if (O != S.begin() && *(O - 1) == ' ')
-    --O;
-
-  S.resize(O - S.begin());
-}
-
-bool isWhitespace(StringRef Text) {
-  for (StringRef::const_iterator I = Text.begin(), E = Text.end();
-       I != E; ++I) {
-    if (!isWhitespace(*I))
-      return false;
-  }
-  return true;
-}
-} // unnamed namespace
-
-BriefParser::BriefParser(Lexer &L, const CommandTraits &Traits) :
-    L(L), Traits(Traits) {
-  // Get lookahead token.
-  ConsumeToken();
-}
-
-std::string BriefParser::Parse() {
-  std::string FirstParagraphOrBrief;
-  std::string ReturnsParagraph;
-  bool InFirstParagraph = true;
-  bool InBrief = false;
-  bool InReturns = false;
-
-  while (Tok.isNot(tok::eof)) {
-    if (Tok.is(tok::text)) {
-      if (InFirstParagraph || InBrief)
-        FirstParagraphOrBrief += Tok.getText();
-      else if (InReturns)
-        ReturnsParagraph += Tok.getText();
-      ConsumeToken();
-      continue;
-    }
-
-    if (Tok.is(tok::backslash_command) || Tok.is(tok::at_command)) {
-      const CommandInfo *Info = Traits.getCommandInfo(Tok.getCommandID());
-      if (Info->IsBriefCommand) {
-        FirstParagraphOrBrief.clear();
-        InBrief = true;
-        ConsumeToken();
-        continue;
-      }
-      if (Info->IsReturnsCommand) {
-        InReturns = true;
-        InBrief = false;
-        InFirstParagraph = false;
-        ReturnsParagraph += "Returns ";
-        ConsumeToken();
-        continue;
-      }
-      // Block commands implicitly start a new paragraph.
-      if (Info->IsBlockCommand) {
-        // We found an implicit paragraph end.
-        InFirstParagraph = false;
-        if (InBrief)
-          break;
-      }
-    }
-
-    if (Tok.is(tok::newline)) {
-      if (InFirstParagraph || InBrief)
-        FirstParagraphOrBrief += ' ';
-      else if (InReturns)
-        ReturnsParagraph += ' ';
-      ConsumeToken();
-
-      // If the next token is a whitespace only text, ignore it.  Thus we allow
-      // two paragraphs to be separated by line that has only whitespace in it.
-      //
-      // We don't need to add a space to the parsed text because we just added
-      // a space for the newline.
-      if (Tok.is(tok::text)) {
-        if (isWhitespace(Tok.getText()))
-          ConsumeToken();
-      }
-
-      if (Tok.is(tok::newline)) {
-        ConsumeToken();
-        // We found a paragraph end.  This ends the brief description if
-        // \\brief command or its equivalent was explicitly used.
-        // Stop scanning text because an explicit \\brief paragraph is the
-        // preffered one.
-        if (InBrief)
-          break;
-        // End first paragraph if we found some non-whitespace text.
-        if (InFirstParagraph && !isWhitespace(FirstParagraphOrBrief))
-          InFirstParagraph = false;
-        // End the \\returns paragraph because we found the paragraph end.
-        InReturns = false;
-      }
-      continue;
-    }
-
-    // We didn't handle this token, so just drop it.
-    ConsumeToken();
-  }
-
-  cleanupBrief(FirstParagraphOrBrief);
-  if (!FirstParagraphOrBrief.empty())
-    return FirstParagraphOrBrief;
-
-  cleanupBrief(ReturnsParagraph);
-  return ReturnsParagraph;
-}
-
-} // end namespace comments
-} // end namespace clang
-
-
diff --git a/lib/AST/CommentCommandTraits.cpp b/lib/AST/CommentCommandTraits.cpp
deleted file mode 100644
index 8879aac..0000000
--- a/lib/AST/CommentCommandTraits.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-//===--- CommentCommandTraits.cpp - Comment command properties --*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/AST/CommentCommandTraits.h"
-#include "llvm/ADT/STLExtras.h"
-
-namespace clang {
-namespace comments {
-
-#include "clang/AST/CommentCommandInfo.inc"
-
-CommandTraits::CommandTraits(llvm::BumpPtrAllocator &Allocator,
-                             const CommentOptions &CommentOptions) :
-    NextID(llvm::array_lengthof(Commands)), Allocator(Allocator) {
-  registerCommentOptions(CommentOptions);
-}
-
-void CommandTraits::registerCommentOptions(
-    const CommentOptions &CommentOptions) {
-  for (CommentOptions::BlockCommandNamesTy::const_iterator
-           I = CommentOptions.BlockCommandNames.begin(),
-           E = CommentOptions.BlockCommandNames.end();
-       I != E; I++) {
-    registerBlockCommand(*I);
-  }
-}
-
-const CommandInfo *CommandTraits::getCommandInfoOrNULL(StringRef Name) const {
-  if (const CommandInfo *Info = getBuiltinCommandInfo(Name))
-    return Info;
-  return getRegisteredCommandInfo(Name);
-}
-
-const CommandInfo *CommandTraits::getCommandInfo(unsigned CommandID) const {
-  if (const CommandInfo *Info = getBuiltinCommandInfo(CommandID))
-    return Info;
-  return getRegisteredCommandInfo(CommandID);
-}
-
-const CommandInfo *
-CommandTraits::getTypoCorrectCommandInfo(StringRef Typo) const {
-  // Single-character command impostures, such as \t or \n, should not go
-  // through the fixit logic.
-  if (Typo.size() <= 1)
-    return nullptr;
-
-  // The maximum edit distance we're prepared to accept.
-  const unsigned MaxEditDistance = 1;
-
-  unsigned BestEditDistance = MaxEditDistance;
-  SmallVector<const CommandInfo *, 2> BestCommand;
-
-  auto ConsiderCorrection = [&](const CommandInfo *Command) {
-    StringRef Name = Command->Name;
-
-    unsigned MinPossibleEditDistance = abs((int)Name.size() - (int)Typo.size());
-    if (MinPossibleEditDistance <= BestEditDistance) {
-      unsigned EditDistance = Typo.edit_distance(Name, true, BestEditDistance);
-      if (EditDistance < BestEditDistance) {
-        BestEditDistance = EditDistance;
-        BestCommand.clear();
-      }
-      if (EditDistance == BestEditDistance)
-        BestCommand.push_back(Command);
-    }
-  };
-
-  for (const auto &Command : Commands)
-    ConsiderCorrection(&Command);
-
-  for (const auto *Command : RegisteredCommands)
-    if (!Command->IsUnknownCommand)
-      ConsiderCorrection(Command);
-
-  return BestCommand.size() == 1 ? BestCommand[0] : nullptr;
-}
-
-CommandInfo *CommandTraits::createCommandInfoWithName(StringRef CommandName) {
-  char *Name = Allocator.Allocate<char>(CommandName.size() + 1);
-  memcpy(Name, CommandName.data(), CommandName.size());
-  Name[CommandName.size()] = '\0';
-
-  // Value-initialize (=zero-initialize in this case) a new CommandInfo.
-  CommandInfo *Info = new (Allocator) CommandInfo();
-  Info->Name = Name;
-  Info->ID = NextID++;
-
-  RegisteredCommands.push_back(Info);
-
-  return Info;
-}
-
-const CommandInfo *CommandTraits::registerUnknownCommand(
-                                                  StringRef CommandName) {
-  CommandInfo *Info = createCommandInfoWithName(CommandName);
-  Info->IsUnknownCommand = true;
-  return Info;
-}
-
-const CommandInfo *CommandTraits::registerBlockCommand(StringRef CommandName) {
-  CommandInfo *Info = createCommandInfoWithName(CommandName);
-  Info->IsBlockCommand = true;
-  return Info;
-}
-
-const CommandInfo *CommandTraits::getBuiltinCommandInfo(
-                                                  unsigned CommandID) {
-  if (CommandID < llvm::array_lengthof(Commands))
-    return &Commands[CommandID];
-  return NULL;
-}
-
-const CommandInfo *CommandTraits::getRegisteredCommandInfo(
-                                                  StringRef Name) const {
-  for (unsigned i = 0, e = RegisteredCommands.size(); i != e; ++i) {
-    if (RegisteredCommands[i]->Name == Name)
-      return RegisteredCommands[i];
-  }
-  return NULL;
-}
-
-const CommandInfo *CommandTraits::getRegisteredCommandInfo(
-                                                  unsigned CommandID) const {
-  return RegisteredCommands[CommandID - llvm::array_lengthof(Commands)];
-}
-
-} // end namespace comments
-} // end namespace clang
-
diff --git a/lib/AST/CommentLexer.cpp b/lib/AST/CommentLexer.cpp
deleted file mode 100644
index 792a832..0000000
--- a/lib/AST/CommentLexer.cpp
+++ /dev/null
@@ -1,845 +0,0 @@
-#include "clang/AST/CommentLexer.h"
-#include "clang/AST/CommentCommandTraits.h"
-#include "clang/AST/CommentDiagnostic.h"
-#include "clang/Basic/CharInfo.h"
-#include "llvm/ADT/StringExtras.h"
-#include "llvm/ADT/StringSwitch.h"
-#include "llvm/Support/ConvertUTF.h"
-#include "llvm/Support/ErrorHandling.h"
-
-namespace clang {
-namespace comments {
-
-void Token::dump(const Lexer &L, const SourceManager &SM) const {
-  llvm::errs() << "comments::Token Kind=" << Kind << " ";
-  Loc.dump(SM);
-  llvm::errs() << " " << Length << " \"" << L.getSpelling(*this, SM) << "\"\n";
-}
-
-static inline bool isHTMLNamedCharacterReferenceCharacter(char C) {
-  return isLetter(C);
-}
-
-static inline bool isHTMLDecimalCharacterReferenceCharacter(char C) {
-  return isDigit(C);
-}
-
-static inline bool isHTMLHexCharacterReferenceCharacter(char C) {
-  return isHexDigit(C);
-}
-
-static inline StringRef convertCodePointToUTF8(
-                                      llvm::BumpPtrAllocator &Allocator,
-                                      unsigned CodePoint) {
-  char *Resolved = Allocator.Allocate<char>(UNI_MAX_UTF8_BYTES_PER_CODE_POINT);
-  char *ResolvedPtr = Resolved;
-  if (llvm::ConvertCodePointToUTF8(CodePoint, ResolvedPtr))
-    return StringRef(Resolved, ResolvedPtr - Resolved);
-  else
-    return StringRef();
-}
-
-namespace {
-
-#include "clang/AST/CommentHTMLTags.inc"
-#include "clang/AST/CommentHTMLNamedCharacterReferences.inc"
-
-} // unnamed namespace
-
-StringRef Lexer::resolveHTMLNamedCharacterReference(StringRef Name) const {
-  // Fast path, first check a few most widely used named character references.
-  return llvm::StringSwitch<StringRef>(Name)
-      .Case("amp", "&")
-      .Case("lt", "<")
-      .Case("gt", ">")
-      .Case("quot", "\"")
-      .Case("apos", "\'")
-      // Slow path.
-      .Default(translateHTMLNamedCharacterReferenceToUTF8(Name));
-}
-
-StringRef Lexer::resolveHTMLDecimalCharacterReference(StringRef Name) const {
-  unsigned CodePoint = 0;
-  for (unsigned i = 0, e = Name.size(); i != e; ++i) {
-    assert(isHTMLDecimalCharacterReferenceCharacter(Name[i]));
-    CodePoint *= 10;
-    CodePoint += Name[i] - '0';
-  }
-  return convertCodePointToUTF8(Allocator, CodePoint);
-}
-
-StringRef Lexer::resolveHTMLHexCharacterReference(StringRef Name) const {
-  unsigned CodePoint = 0;
-  for (unsigned i = 0, e = Name.size(); i != e; ++i) {
-    CodePoint *= 16;
-    const char C = Name[i];
-    assert(isHTMLHexCharacterReferenceCharacter(C));
-    CodePoint += llvm::hexDigitValue(C);
-  }
-  return convertCodePointToUTF8(Allocator, CodePoint);
-}
-
-void Lexer::skipLineStartingDecorations() {
-  // This function should be called only for C comments
-  assert(CommentState == LCS_InsideCComment);
-
-  if (BufferPtr == CommentEnd)
-    return;
-
-  switch (*BufferPtr) {
-  case ' ':
-  case '\t':
-  case '\f':
-  case '\v': {
-    const char *NewBufferPtr = BufferPtr;
-    NewBufferPtr++;
-    if (NewBufferPtr == CommentEnd)
-      return;
-
-    char C = *NewBufferPtr;
-    while (isHorizontalWhitespace(C)) {
-      NewBufferPtr++;
-      if (NewBufferPtr == CommentEnd)
-        return;
-      C = *NewBufferPtr;
-    }
-    if (C == '*')
-      BufferPtr = NewBufferPtr + 1;
-    break;
-  }
-  case '*':
-    BufferPtr++;
-    break;
-  }
-}
-
-namespace {
-/// Returns pointer to the first newline character in the string.
-const char *findNewline(const char *BufferPtr, const char *BufferEnd) {
-  for ( ; BufferPtr != BufferEnd; ++BufferPtr) {
-    if (isVerticalWhitespace(*BufferPtr))
-      return BufferPtr;
-  }
-  return BufferEnd;
-}
-
-const char *skipNewline(const char *BufferPtr, const char *BufferEnd) {
-  if (BufferPtr == BufferEnd)
-    return BufferPtr;
-
-  if (*BufferPtr == '\n')
-    BufferPtr++;
-  else {
-    assert(*BufferPtr == '\r');
-    BufferPtr++;
-    if (BufferPtr != BufferEnd && *BufferPtr == '\n')
-      BufferPtr++;
-  }
-  return BufferPtr;
-}
-
-const char *skipNamedCharacterReference(const char *BufferPtr,
-                                        const char *BufferEnd) {
-  for ( ; BufferPtr != BufferEnd; ++BufferPtr) {
-    if (!isHTMLNamedCharacterReferenceCharacter(*BufferPtr))
-      return BufferPtr;
-  }
-  return BufferEnd;
-}
-
-const char *skipDecimalCharacterReference(const char *BufferPtr,
-                                          const char *BufferEnd) {
-  for ( ; BufferPtr != BufferEnd; ++BufferPtr) {
-    if (!isHTMLDecimalCharacterReferenceCharacter(*BufferPtr))
-      return BufferPtr;
-  }
-  return BufferEnd;
-}
-
-const char *skipHexCharacterReference(const char *BufferPtr,
-                                      const char *BufferEnd) {
-  for ( ; BufferPtr != BufferEnd; ++BufferPtr) {
-    if (!isHTMLHexCharacterReferenceCharacter(*BufferPtr))
-      return BufferPtr;
-  }
-  return BufferEnd;
-}
-
-bool isHTMLIdentifierStartingCharacter(char C) {
-  return isLetter(C);
-}
-
-bool isHTMLIdentifierCharacter(char C) {
-  return isAlphanumeric(C);
-}
-
-const char *skipHTMLIdentifier(const char *BufferPtr, const char *BufferEnd) {
-  for ( ; BufferPtr != BufferEnd; ++BufferPtr) {
-    if (!isHTMLIdentifierCharacter(*BufferPtr))
-      return BufferPtr;
-  }
-  return BufferEnd;
-}
-
-/// Skip HTML string quoted in single or double quotes.  Escaping quotes inside
-/// string allowed.
-///
-/// Returns pointer to closing quote.
-const char *skipHTMLQuotedString(const char *BufferPtr, const char *BufferEnd)
-{
-  const char Quote = *BufferPtr;
-  assert(Quote == '\"' || Quote == '\'');
-
-  BufferPtr++;
-  for ( ; BufferPtr != BufferEnd; ++BufferPtr) {
-    const char C = *BufferPtr;
-    if (C == Quote && BufferPtr[-1] != '\\')
-      return BufferPtr;
-  }
-  return BufferEnd;
-}
-
-const char *skipWhitespace(const char *BufferPtr, const char *BufferEnd) {
-  for ( ; BufferPtr != BufferEnd; ++BufferPtr) {
-    if (!isWhitespace(*BufferPtr))
-      return BufferPtr;
-  }
-  return BufferEnd;
-}
-
-bool isWhitespace(const char *BufferPtr, const char *BufferEnd) {
-  return skipWhitespace(BufferPtr, BufferEnd) == BufferEnd;
-}
-
-bool isCommandNameStartCharacter(char C) {
-  return isLetter(C);
-}
-
-bool isCommandNameCharacter(char C) {
-  return isAlphanumeric(C);
-}
-
-const char *skipCommandName(const char *BufferPtr, const char *BufferEnd) {
-  for ( ; BufferPtr != BufferEnd; ++BufferPtr) {
-    if (!isCommandNameCharacter(*BufferPtr))
-      return BufferPtr;
-  }
-  return BufferEnd;
-}
-
-/// Return the one past end pointer for BCPL comments.
-/// Handles newlines escaped with backslash or trigraph for backslahs.
-const char *findBCPLCommentEnd(const char *BufferPtr, const char *BufferEnd) {
-  const char *CurPtr = BufferPtr;
-  while (CurPtr != BufferEnd) {
-    while (!isVerticalWhitespace(*CurPtr)) {
-      CurPtr++;
-      if (CurPtr == BufferEnd)
-        return BufferEnd;
-    }
-    // We found a newline, check if it is escaped.
-    const char *EscapePtr = CurPtr - 1;
-    while(isHorizontalWhitespace(*EscapePtr))
-      EscapePtr--;
-
-    if (*EscapePtr == '\\' ||
-        (EscapePtr - 2 >= BufferPtr && EscapePtr[0] == '/' &&
-         EscapePtr[-1] == '?' && EscapePtr[-2] == '?')) {
-      // We found an escaped newline.
-      CurPtr = skipNewline(CurPtr, BufferEnd);
-    } else
-      return CurPtr; // Not an escaped newline.
-  }
-  return BufferEnd;
-}
-
-/// Return the one past end pointer for C comments.
-/// Very dumb, does not handle escaped newlines or trigraphs.
-const char *findCCommentEnd(const char *BufferPtr, const char *BufferEnd) {
-  for ( ; BufferPtr != BufferEnd; ++BufferPtr) {
-    if (*BufferPtr == '*') {
-      assert(BufferPtr + 1 != BufferEnd);
-      if (*(BufferPtr + 1) == '/')
-        return BufferPtr;
-    }
-  }
-  llvm_unreachable("buffer end hit before '*/' was seen");
-}
-    
-} // unnamed namespace
-
-void Lexer::formTokenWithChars(Token &Result, const char *TokEnd,
-                               tok::TokenKind Kind) {
-  const unsigned TokLen = TokEnd - BufferPtr;
-  Result.setLocation(getSourceLocation(BufferPtr));
-  Result.setKind(Kind);
-  Result.setLength(TokLen);
-#ifndef NDEBUG
-  Result.TextPtr = "<UNSET>";
-  Result.IntVal = 7;
-#endif
-  BufferPtr = TokEnd;
-}
-
-void Lexer::lexCommentText(Token &T) {
-  assert(CommentState == LCS_InsideBCPLComment ||
-         CommentState == LCS_InsideCComment);
-
-  switch (State) {
-  case LS_Normal:
-    break;
-  case LS_VerbatimBlockFirstLine:
-    lexVerbatimBlockFirstLine(T);
-    return;
-  case LS_VerbatimBlockBody:
-    lexVerbatimBlockBody(T);
-    return;
-  case LS_VerbatimLineText:
-    lexVerbatimLineText(T);
-    return;
-  case LS_HTMLStartTag:
-    lexHTMLStartTag(T);
-    return;
-  case LS_HTMLEndTag:
-    lexHTMLEndTag(T);
-    return;
-  }
-
-  assert(State == LS_Normal);
-
-  const char *TokenPtr = BufferPtr;
-  assert(TokenPtr < CommentEnd);
-  while (TokenPtr != CommentEnd) {
-    switch(*TokenPtr) {
-      case '\\':
-      case '@': {
-        // Commands that start with a backslash and commands that start with
-        // 'at' have equivalent semantics.  But we keep information about the
-        // exact syntax in AST for comments.
-        tok::TokenKind CommandKind =
-            (*TokenPtr == '@') ? tok::at_command : tok::backslash_command;
-        TokenPtr++;
-        if (TokenPtr == CommentEnd) {
-          formTextToken(T, TokenPtr);
-          return;
-        }
-        char C = *TokenPtr;
-        switch (C) {
-        default:
-          break;
-
-        case '\\': case '@': case '&': case '$':
-        case '#':  case '<': case '>': case '%':
-        case '\"': case '.': case ':':
-          // This is one of \\ \@ \& \$ etc escape sequences.
-          TokenPtr++;
-          if (C == ':' && TokenPtr != CommentEnd && *TokenPtr == ':') {
-            // This is the \:: escape sequence.
-            TokenPtr++;
-          }
-          StringRef UnescapedText(BufferPtr + 1, TokenPtr - (BufferPtr + 1));
-          formTokenWithChars(T, TokenPtr, tok::text);
-          T.setText(UnescapedText);
-          return;
-        }
-
-        // Don't make zero-length commands.
-        if (!isCommandNameStartCharacter(*TokenPtr)) {
-          formTextToken(T, TokenPtr);
-          return;
-        }
-
-        TokenPtr = skipCommandName(TokenPtr, CommentEnd);
-        unsigned Length = TokenPtr - (BufferPtr + 1);
-
-        // Hardcoded support for lexing LaTeX formula commands
-        // \f$ \f[ \f] \f{ \f} as a single command.
-        if (Length == 1 && TokenPtr[-1] == 'f' && TokenPtr != CommentEnd) {
-          C = *TokenPtr;
-          if (C == '$' || C == '[' || C == ']' || C == '{' || C == '}') {
-            TokenPtr++;
-            Length++;
-          }
-        }
-
-        const StringRef CommandName(BufferPtr + 1, Length);
-
-        const CommandInfo *Info = Traits.getCommandInfoOrNULL(CommandName);
-        if (!Info) {
-          if ((Info = Traits.getTypoCorrectCommandInfo(CommandName))) {
-            StringRef CorrectedName = Info->Name;
-            SourceLocation Loc = getSourceLocation(BufferPtr);
-            SourceRange CommandRange(Loc.getLocWithOffset(1),
-                                     getSourceLocation(TokenPtr));
-            Diag(Loc, diag::warn_correct_comment_command_name)
-              << CommandName << CorrectedName
-              << FixItHint::CreateReplacement(CommandRange, CorrectedName);
-          } else {
-            formTokenWithChars(T, TokenPtr, tok::unknown_command);
-            T.setUnknownCommandName(CommandName);
-            Diag(T.getLocation(), diag::warn_unknown_comment_command_name);
-            return;
-          }
-        }
-        if (Info->IsVerbatimBlockCommand) {
-          setupAndLexVerbatimBlock(T, TokenPtr, *BufferPtr, Info);
-          return;
-        }
-        if (Info->IsVerbatimLineCommand) {
-          setupAndLexVerbatimLine(T, TokenPtr, Info);
-          return;
-        }
-        formTokenWithChars(T, TokenPtr, CommandKind);
-        T.setCommandID(Info->getID());
-        return;
-      }
-
-      case '&':
-        lexHTMLCharacterReference(T);
-        return;
-
-      case '<': {
-        TokenPtr++;
-        if (TokenPtr == CommentEnd) {
-          formTextToken(T, TokenPtr);
-          return;
-        }
-        const char C = *TokenPtr;
-        if (isHTMLIdentifierStartingCharacter(C))
-          setupAndLexHTMLStartTag(T);
-        else if (C == '/')
-          setupAndLexHTMLEndTag(T);
-        else
-          formTextToken(T, TokenPtr);
-
-        return;
-      }
-
-      case '\n':
-      case '\r':
-        TokenPtr = skipNewline(TokenPtr, CommentEnd);
-        formTokenWithChars(T, TokenPtr, tok::newline);
-
-        if (CommentState == LCS_InsideCComment)
-          skipLineStartingDecorations();
-        return;
-
-      default: {
-        size_t End = StringRef(TokenPtr, CommentEnd - TokenPtr).
-                         find_first_of("\n\r\\@&<");
-        if (End != StringRef::npos)
-          TokenPtr += End;
-        else
-          TokenPtr = CommentEnd;
-        formTextToken(T, TokenPtr);
-        return;
-      }
-    }
-  }
-}
-
-void Lexer::setupAndLexVerbatimBlock(Token &T,
-                                     const char *TextBegin,
-                                     char Marker, const CommandInfo *Info) {
-  assert(Info->IsVerbatimBlockCommand);
-
-  VerbatimBlockEndCommandName.clear();
-  VerbatimBlockEndCommandName.append(Marker == '\\' ? "\\" : "@");
-  VerbatimBlockEndCommandName.append(Info->EndCommandName);
-
-  formTokenWithChars(T, TextBegin, tok::verbatim_block_begin);
-  T.setVerbatimBlockID(Info->getID());
-
-  // If there is a newline following the verbatim opening command, skip the
-  // newline so that we don't create an tok::verbatim_block_line with empty
-  // text content.
-  if (BufferPtr != CommentEnd &&
-      isVerticalWhitespace(*BufferPtr)) {
-    BufferPtr = skipNewline(BufferPtr, CommentEnd);
-    State = LS_VerbatimBlockBody;
-    return;
-  }
-
-  State = LS_VerbatimBlockFirstLine;
-}
-
-void Lexer::lexVerbatimBlockFirstLine(Token &T) {
-again:
-  assert(BufferPtr < CommentEnd);
-
-  // FIXME: It would be better to scan the text once, finding either the block
-  // end command or newline.
-  //
-  // Extract current line.
-  const char *Newline = findNewline(BufferPtr, CommentEnd);
-  StringRef Line(BufferPtr, Newline - BufferPtr);
-
-  // Look for end command in current line.
-  size_t Pos = Line.find(VerbatimBlockEndCommandName);
-  const char *TextEnd;
-  const char *NextLine;
-  if (Pos == StringRef::npos) {
-    // Current line is completely verbatim.
-    TextEnd = Newline;
-    NextLine = skipNewline(Newline, CommentEnd);
-  } else if (Pos == 0) {
-    // Current line contains just an end command.
-    const char *End = BufferPtr + VerbatimBlockEndCommandName.size();
-    StringRef Name(BufferPtr + 1, End - (BufferPtr + 1));
-    formTokenWithChars(T, End, tok::verbatim_block_end);
-    T.setVerbatimBlockID(Traits.getCommandInfo(Name)->getID());
-    State = LS_Normal;
-    return;
-  } else {
-    // There is some text, followed by end command.  Extract text first.
-    TextEnd = BufferPtr + Pos;
-    NextLine = TextEnd;
-    // If there is only whitespace before end command, skip whitespace.
-    if (isWhitespace(BufferPtr, TextEnd)) {
-      BufferPtr = TextEnd;
-      goto again;
-    }
-  }
-
-  StringRef Text(BufferPtr, TextEnd - BufferPtr);
-  formTokenWithChars(T, NextLine, tok::verbatim_block_line);
-  T.setVerbatimBlockText(Text);
-
-  State = LS_VerbatimBlockBody;
-}
-
-void Lexer::lexVerbatimBlockBody(Token &T) {
-  assert(State == LS_VerbatimBlockBody);
-
-  if (CommentState == LCS_InsideCComment)
-    skipLineStartingDecorations();
-
-  lexVerbatimBlockFirstLine(T);
-}
-
-void Lexer::setupAndLexVerbatimLine(Token &T, const char *TextBegin,
-                                    const CommandInfo *Info) {
-  assert(Info->IsVerbatimLineCommand);
-  formTokenWithChars(T, TextBegin, tok::verbatim_line_name);
-  T.setVerbatimLineID(Info->getID());
-
-  State = LS_VerbatimLineText;
-}
-
-void Lexer::lexVerbatimLineText(Token &T) {
-  assert(State == LS_VerbatimLineText);
-
-  // Extract current line.
-  const char *Newline = findNewline(BufferPtr, CommentEnd);
-  const StringRef Text(BufferPtr, Newline - BufferPtr);
-  formTokenWithChars(T, Newline, tok::verbatim_line_text);
-  T.setVerbatimLineText(Text);
-
-  State = LS_Normal;
-}
-
-void Lexer::lexHTMLCharacterReference(Token &T) {
-  const char *TokenPtr = BufferPtr;
-  assert(*TokenPtr == '&');
-  TokenPtr++;
-  if (TokenPtr == CommentEnd) {
-    formTextToken(T, TokenPtr);
-    return;
-  }
-  const char *NamePtr;
-  bool isNamed = false;
-  bool isDecimal = false;
-  char C = *TokenPtr;
-  if (isHTMLNamedCharacterReferenceCharacter(C)) {
-    NamePtr = TokenPtr;
-    TokenPtr = skipNamedCharacterReference(TokenPtr, CommentEnd);
-    isNamed = true;
-  } else if (C == '#') {
-    TokenPtr++;
-    if (TokenPtr == CommentEnd) {
-      formTextToken(T, TokenPtr);
-      return;
-    }
-    C = *TokenPtr;
-    if (isHTMLDecimalCharacterReferenceCharacter(C)) {
-      NamePtr = TokenPtr;
-      TokenPtr = skipDecimalCharacterReference(TokenPtr, CommentEnd);
-      isDecimal = true;
-    } else if (C == 'x' || C == 'X') {
-      TokenPtr++;
-      NamePtr = TokenPtr;
-      TokenPtr = skipHexCharacterReference(TokenPtr, CommentEnd);
-    } else {
-      formTextToken(T, TokenPtr);
-      return;
-    }
-  } else {
-    formTextToken(T, TokenPtr);
-    return;
-  }
-  if (NamePtr == TokenPtr || TokenPtr == CommentEnd ||
-      *TokenPtr != ';') {
-    formTextToken(T, TokenPtr);
-    return;
-  }
-  StringRef Name(NamePtr, TokenPtr - NamePtr);
-  TokenPtr++; // Skip semicolon.
-  StringRef Resolved;
-  if (isNamed)
-    Resolved = resolveHTMLNamedCharacterReference(Name);
-  else if (isDecimal)
-    Resolved = resolveHTMLDecimalCharacterReference(Name);
-  else
-    Resolved = resolveHTMLHexCharacterReference(Name);
-
-  if (Resolved.empty()) {
-    formTextToken(T, TokenPtr);
-    return;
-  }
-  formTokenWithChars(T, TokenPtr, tok::text);
-  T.setText(Resolved);
-  return;
-}
-
-void Lexer::setupAndLexHTMLStartTag(Token &T) {
-  assert(BufferPtr[0] == '<' &&
-         isHTMLIdentifierStartingCharacter(BufferPtr[1]));
-  const char *TagNameEnd = skipHTMLIdentifier(BufferPtr + 2, CommentEnd);
-  StringRef Name(BufferPtr + 1, TagNameEnd - (BufferPtr + 1));
-  if (!isHTMLTagName(Name)) {
-    formTextToken(T, TagNameEnd);
-    return;
-  }
-
-  formTokenWithChars(T, TagNameEnd, tok::html_start_tag);
-  T.setHTMLTagStartName(Name);
-
-  BufferPtr = skipWhitespace(BufferPtr, CommentEnd);
-
-  const char C = *BufferPtr;
-  if (BufferPtr != CommentEnd &&
-      (C == '>' || C == '/' || isHTMLIdentifierStartingCharacter(C)))
-    State = LS_HTMLStartTag;
-}
-
-void Lexer::lexHTMLStartTag(Token &T) {
-  assert(State == LS_HTMLStartTag);
-
-  const char *TokenPtr = BufferPtr;
-  char C = *TokenPtr;
-  if (isHTMLIdentifierCharacter(C)) {
-    TokenPtr = skipHTMLIdentifier(TokenPtr, CommentEnd);
-    StringRef Ident(BufferPtr, TokenPtr - BufferPtr);
-    formTokenWithChars(T, TokenPtr, tok::html_ident);
-    T.setHTMLIdent(Ident);
-  } else {
-    switch (C) {
-    case '=':
-      TokenPtr++;
-      formTokenWithChars(T, TokenPtr, tok::html_equals);
-      break;
-    case '\"':
-    case '\'': {
-      const char *OpenQuote = TokenPtr;
-      TokenPtr = skipHTMLQuotedString(TokenPtr, CommentEnd);
-      const char *ClosingQuote = TokenPtr;
-      if (TokenPtr != CommentEnd) // Skip closing quote.
-        TokenPtr++;
-      formTokenWithChars(T, TokenPtr, tok::html_quoted_string);
-      T.setHTMLQuotedString(StringRef(OpenQuote + 1,
-                                      ClosingQuote - (OpenQuote + 1)));
-      break;
-    }
-    case '>':
-      TokenPtr++;
-      formTokenWithChars(T, TokenPtr, tok::html_greater);
-      State = LS_Normal;
-      return;
-    case '/':
-      TokenPtr++;
-      if (TokenPtr != CommentEnd && *TokenPtr == '>') {
-        TokenPtr++;
-        formTokenWithChars(T, TokenPtr, tok::html_slash_greater);
-      } else
-        formTextToken(T, TokenPtr);
-
-      State = LS_Normal;
-      return;
-    }
-  }
-
-  // Now look ahead and return to normal state if we don't see any HTML tokens
-  // ahead.
-  BufferPtr = skipWhitespace(BufferPtr, CommentEnd);
-  if (BufferPtr == CommentEnd) {
-    State = LS_Normal;
-    return;
-  }
-
-  C = *BufferPtr;
-  if (!isHTMLIdentifierStartingCharacter(C) &&
-      C != '=' && C != '\"' && C != '\'' && C != '>') {
-    State = LS_Normal;
-    return;
-  }
-}
-
-void Lexer::setupAndLexHTMLEndTag(Token &T) {
-  assert(BufferPtr[0] == '<' && BufferPtr[1] == '/');
-
-  const char *TagNameBegin = skipWhitespace(BufferPtr + 2, CommentEnd);
-  const char *TagNameEnd = skipHTMLIdentifier(TagNameBegin, CommentEnd);
-  StringRef Name(TagNameBegin, TagNameEnd - TagNameBegin);
-  if (!isHTMLTagName(Name)) {
-    formTextToken(T, TagNameEnd);
-    return;
-  }
-
-  const char *End = skipWhitespace(TagNameEnd, CommentEnd);
-
-  formTokenWithChars(T, End, tok::html_end_tag);
-  T.setHTMLTagEndName(Name);
-
-  if (BufferPtr != CommentEnd && *BufferPtr == '>')
-    State = LS_HTMLEndTag;
-}
-
-void Lexer::lexHTMLEndTag(Token &T) {
-  assert(BufferPtr != CommentEnd && *BufferPtr == '>');
-
-  formTokenWithChars(T, BufferPtr + 1, tok::html_greater);
-  State = LS_Normal;
-}
-
-Lexer::Lexer(llvm::BumpPtrAllocator &Allocator, DiagnosticsEngine &Diags,
-             const CommandTraits &Traits,
-             SourceLocation FileLoc,
-             const char *BufferStart, const char *BufferEnd):
-    Allocator(Allocator), Diags(Diags), Traits(Traits),
-    BufferStart(BufferStart), BufferEnd(BufferEnd),
-    FileLoc(FileLoc), BufferPtr(BufferStart),
-    CommentState(LCS_BeforeComment), State(LS_Normal) {
-}
-
-void Lexer::lex(Token &T) {
-again:
-  switch (CommentState) {
-  case LCS_BeforeComment:
-    if (BufferPtr == BufferEnd) {
-      formTokenWithChars(T, BufferPtr, tok::eof);
-      return;
-    }
-
-    assert(*BufferPtr == '/');
-    BufferPtr++; // Skip first slash.
-    switch(*BufferPtr) {
-    case '/': { // BCPL comment.
-      BufferPtr++; // Skip second slash.
-
-      if (BufferPtr != BufferEnd) {
-        // Skip Doxygen magic marker, if it is present.
-        // It might be missing because of a typo //< or /*<, or because we
-        // merged this non-Doxygen comment into a bunch of Doxygen comments
-        // around it: /** ... */ /* ... */ /** ... */
-        const char C = *BufferPtr;
-        if (C == '/' || C == '!')
-          BufferPtr++;
-      }
-
-      // Skip less-than symbol that marks trailing comments.
-      // Skip it even if the comment is not a Doxygen one, because //< and /*<
-      // are frequent typos.
-      if (BufferPtr != BufferEnd && *BufferPtr == '<')
-        BufferPtr++;
-
-      CommentState = LCS_InsideBCPLComment;
-      if (State != LS_VerbatimBlockBody && State != LS_VerbatimBlockFirstLine)
-        State = LS_Normal;
-      CommentEnd = findBCPLCommentEnd(BufferPtr, BufferEnd);
-      goto again;
-    }
-    case '*': { // C comment.
-      BufferPtr++; // Skip star.
-
-      // Skip Doxygen magic marker.
-      const char C = *BufferPtr;
-      if ((C == '*' && *(BufferPtr + 1) != '/') || C == '!')
-        BufferPtr++;
-
-      // Skip less-than symbol that marks trailing comments.
-      if (BufferPtr != BufferEnd && *BufferPtr == '<')
-        BufferPtr++;
-
-      CommentState = LCS_InsideCComment;
-      State = LS_Normal;
-      CommentEnd = findCCommentEnd(BufferPtr, BufferEnd);
-      goto again;
-    }
-    default:
-      llvm_unreachable("second character of comment should be '/' or '*'");
-    }
-
-  case LCS_BetweenComments: {
-    // Consecutive comments are extracted only if there is only whitespace
-    // between them.  So we can search for the start of the next comment.
-    const char *EndWhitespace = BufferPtr;
-    while(EndWhitespace != BufferEnd && *EndWhitespace != '/')
-      EndWhitespace++;
-
-    // Turn any whitespace between comments (and there is only whitespace
-    // between them -- guaranteed by comment extraction) into a newline.  We
-    // have two newlines between C comments in total (first one was synthesized
-    // after a comment).
-    formTokenWithChars(T, EndWhitespace, tok::newline);
-
-    CommentState = LCS_BeforeComment;
-    break;
-  }
-
-  case LCS_InsideBCPLComment:
-  case LCS_InsideCComment:
-    if (BufferPtr != CommentEnd) {
-      lexCommentText(T);
-      break;
-    } else {
-      // Skip C comment closing sequence.
-      if (CommentState == LCS_InsideCComment) {
-        assert(BufferPtr[0] == '*' && BufferPtr[1] == '/');
-        BufferPtr += 2;
-        assert(BufferPtr <= BufferEnd);
-
-        // Synthenize newline just after the C comment, regardless if there is
-        // actually a newline.
-        formTokenWithChars(T, BufferPtr, tok::newline);
-
-        CommentState = LCS_BetweenComments;
-        break;
-      } else {
-        // Don't synthesized a newline after BCPL comment.
-        CommentState = LCS_BetweenComments;
-        goto again;
-      }
-    }
-  }
-}
-
-StringRef Lexer::getSpelling(const Token &Tok,
-                             const SourceManager &SourceMgr,
-                             bool *Invalid) const {
-  SourceLocation Loc = Tok.getLocation();
-  std::pair<FileID, unsigned> LocInfo = SourceMgr.getDecomposedLoc(Loc);
-
-  bool InvalidTemp = false;
-  StringRef File = SourceMgr.getBufferData(LocInfo.first, &InvalidTemp);
-  if (InvalidTemp) {
-    *Invalid = true;
-    return StringRef();
-  }
-
-  const char *Begin = File.data() + LocInfo.second;
-  return StringRef(Begin, Tok.getLength());
-}
-
-} // end namespace comments
-} // end namespace clang
-
diff --git a/lib/AST/CommentParser.cpp b/lib/AST/CommentParser.cpp
deleted file mode 100644
index 03e0101..0000000
--- a/lib/AST/CommentParser.cpp
+++ /dev/null
@@ -1,776 +0,0 @@
-//===--- CommentParser.cpp - Doxygen comment parser -----------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/AST/CommentParser.h"
-#include "clang/AST/CommentCommandTraits.h"
-#include "clang/AST/CommentDiagnostic.h"
-#include "clang/AST/CommentSema.h"
-#include "clang/Basic/CharInfo.h"
-#include "clang/Basic/SourceManager.h"
-#include "llvm/Support/ErrorHandling.h"
-
-namespace clang {
-
-static inline bool isWhitespace(llvm::StringRef S) {
-  for (StringRef::const_iterator I = S.begin(), E = S.end(); I != E; ++I) {
-    if (!isWhitespace(*I))
-      return false;
-  }
-  return true;
-}
-
-namespace comments {
-
-/// Re-lexes a sequence of tok::text tokens.
-class TextTokenRetokenizer {
-  llvm::BumpPtrAllocator &Allocator;
-  Parser &P;
-
-  /// This flag is set when there are no more tokens we can fetch from lexer.
-  bool NoMoreInterestingTokens;
-
-  /// Token buffer: tokens we have processed and lookahead.
-  SmallVector<Token, 16> Toks;
-
-  /// A position in \c Toks.
-  struct Position {
-    unsigned CurToken;
-    const char *BufferStart;
-    const char *BufferEnd;
-    const char *BufferPtr;
-    SourceLocation BufferStartLoc;
-  };
-
-  /// Current position in Toks.
-  Position Pos;
-
-  bool isEnd() const {
-    return Pos.CurToken >= Toks.size();
-  }
-
-  /// Sets up the buffer pointers to point to current token.
-  void setupBuffer() {
-    assert(!isEnd());
-    const Token &Tok = Toks[Pos.CurToken];
-
-    Pos.BufferStart = Tok.getText().begin();
-    Pos.BufferEnd = Tok.getText().end();
-    Pos.BufferPtr = Pos.BufferStart;
-    Pos.BufferStartLoc = Tok.getLocation();
-  }
-
-  SourceLocation getSourceLocation() const {
-    const unsigned CharNo = Pos.BufferPtr - Pos.BufferStart;
-    return Pos.BufferStartLoc.getLocWithOffset(CharNo);
-  }
-
-  char peek() const {
-    assert(!isEnd());
-    assert(Pos.BufferPtr != Pos.BufferEnd);
-    return *Pos.BufferPtr;
-  }
-
-  void consumeChar() {
-    assert(!isEnd());
-    assert(Pos.BufferPtr != Pos.BufferEnd);
-    Pos.BufferPtr++;
-    if (Pos.BufferPtr == Pos.BufferEnd) {
-      Pos.CurToken++;
-      if (isEnd() && !addToken())
-        return;
-
-      assert(!isEnd());
-      setupBuffer();
-    }
-  }
-
-  /// Add a token.
-  /// Returns true on success, false if there are no interesting tokens to
-  /// fetch from lexer.
-  bool addToken() {
-    if (NoMoreInterestingTokens)
-      return false;
-
-    if (P.Tok.is(tok::newline)) {
-      // If we see a single newline token between text tokens, skip it.
-      Token Newline = P.Tok;
-      P.consumeToken();
-      if (P.Tok.isNot(tok::text)) {
-        P.putBack(Newline);
-        NoMoreInterestingTokens = true;
-        return false;
-      }
-    }
-    if (P.Tok.isNot(tok::text)) {
-      NoMoreInterestingTokens = true;
-      return false;
-    }
-
-    Toks.push_back(P.Tok);
-    P.consumeToken();
-    if (Toks.size() == 1)
-      setupBuffer();
-    return true;
-  }
-
-  void consumeWhitespace() {
-    while (!isEnd()) {
-      if (isWhitespace(peek()))
-        consumeChar();
-      else
-        break;
-    }
-  }
-
-  void formTokenWithChars(Token &Result,
-                          SourceLocation Loc,
-                          const char *TokBegin,
-                          unsigned TokLength,
-                          StringRef Text) {
-    Result.setLocation(Loc);
-    Result.setKind(tok::text);
-    Result.setLength(TokLength);
-#ifndef NDEBUG
-    Result.TextPtr = "<UNSET>";
-    Result.IntVal = 7;
-#endif
-    Result.setText(Text);
-  }
-
-public:
-  TextTokenRetokenizer(llvm::BumpPtrAllocator &Allocator, Parser &P):
-      Allocator(Allocator), P(P), NoMoreInterestingTokens(false) {
-    Pos.CurToken = 0;
-    addToken();
-  }
-
-  /// Extract a word -- sequence of non-whitespace characters.
-  bool lexWord(Token &Tok) {
-    if (isEnd())
-      return false;
-
-    Position SavedPos = Pos;
-
-    consumeWhitespace();
-    SmallString<32> WordText;
-    const char *WordBegin = Pos.BufferPtr;
-    SourceLocation Loc = getSourceLocation();
-    while (!isEnd()) {
-      const char C = peek();
-      if (!isWhitespace(C)) {
-        WordText.push_back(C);
-        consumeChar();
-      } else
-        break;
-    }
-    const unsigned Length = WordText.size();
-    if (Length == 0) {
-      Pos = SavedPos;
-      return false;
-    }
-
-    char *TextPtr = Allocator.Allocate<char>(Length + 1);
-
-    memcpy(TextPtr, WordText.c_str(), Length + 1);
-    StringRef Text = StringRef(TextPtr, Length);
-
-    formTokenWithChars(Tok, Loc, WordBegin, Length, Text);
-    return true;
-  }
-
-  bool lexDelimitedSeq(Token &Tok, char OpenDelim, char CloseDelim) {
-    if (isEnd())
-      return false;
-
-    Position SavedPos = Pos;
-
-    consumeWhitespace();
-    SmallString<32> WordText;
-    const char *WordBegin = Pos.BufferPtr;
-    SourceLocation Loc = getSourceLocation();
-    bool Error = false;
-    if (!isEnd()) {
-      const char C = peek();
-      if (C == OpenDelim) {
-        WordText.push_back(C);
-        consumeChar();
-      } else
-        Error = true;
-    }
-    char C = '\0';
-    while (!Error && !isEnd()) {
-      C = peek();
-      WordText.push_back(C);
-      consumeChar();
-      if (C == CloseDelim)
-        break;
-    }
-    if (!Error && C != CloseDelim)
-      Error = true;
-
-    if (Error) {
-      Pos = SavedPos;
-      return false;
-    }
-
-    const unsigned Length = WordText.size();
-    char *TextPtr = Allocator.Allocate<char>(Length + 1);
-
-    memcpy(TextPtr, WordText.c_str(), Length + 1);
-    StringRef Text = StringRef(TextPtr, Length);
-
-    formTokenWithChars(Tok, Loc, WordBegin,
-                       Pos.BufferPtr - WordBegin, Text);
-    return true;
-  }
-
-  /// Put back tokens that we didn't consume.
-  void putBackLeftoverTokens() {
-    if (isEnd())
-      return;
-
-    bool HavePartialTok = false;
-    Token PartialTok;
-    if (Pos.BufferPtr != Pos.BufferStart) {
-      formTokenWithChars(PartialTok, getSourceLocation(),
-                         Pos.BufferPtr, Pos.BufferEnd - Pos.BufferPtr,
-                         StringRef(Pos.BufferPtr,
-                                   Pos.BufferEnd - Pos.BufferPtr));
-      HavePartialTok = true;
-      Pos.CurToken++;
-    }
-
-    P.putBack(llvm::makeArrayRef(Toks.begin() + Pos.CurToken, Toks.end()));
-    Pos.CurToken = Toks.size();
-
-    if (HavePartialTok)
-      P.putBack(PartialTok);
-  }
-};
-
-Parser::Parser(Lexer &L, Sema &S, llvm::BumpPtrAllocator &Allocator,
-               const SourceManager &SourceMgr, DiagnosticsEngine &Diags,
-               const CommandTraits &Traits):
-    L(L), S(S), Allocator(Allocator), SourceMgr(SourceMgr), Diags(Diags),
-    Traits(Traits) {
-  consumeToken();
-}
-
-void Parser::parseParamCommandArgs(ParamCommandComment *PC,
-                                   TextTokenRetokenizer &Retokenizer) {
-  Token Arg;
-  // Check if argument looks like direction specification: [dir]
-  // e.g., [in], [out], [in,out]
-  if (Retokenizer.lexDelimitedSeq(Arg, '[', ']'))
-    S.actOnParamCommandDirectionArg(PC,
-                                    Arg.getLocation(),
-                                    Arg.getEndLocation(),
-                                    Arg.getText());
-
-  if (Retokenizer.lexWord(Arg))
-    S.actOnParamCommandParamNameArg(PC,
-                                    Arg.getLocation(),
-                                    Arg.getEndLocation(),
-                                    Arg.getText());
-}
-
-void Parser::parseTParamCommandArgs(TParamCommandComment *TPC,
-                                    TextTokenRetokenizer &Retokenizer) {
-  Token Arg;
-  if (Retokenizer.lexWord(Arg))
-    S.actOnTParamCommandParamNameArg(TPC,
-                                     Arg.getLocation(),
-                                     Arg.getEndLocation(),
-                                     Arg.getText());
-}
-
-void Parser::parseBlockCommandArgs(BlockCommandComment *BC,
-                                   TextTokenRetokenizer &Retokenizer,
-                                   unsigned NumArgs) {
-  typedef BlockCommandComment::Argument Argument;
-  Argument *Args =
-      new (Allocator.Allocate<Argument>(NumArgs)) Argument[NumArgs];
-  unsigned ParsedArgs = 0;
-  Token Arg;
-  while (ParsedArgs < NumArgs && Retokenizer.lexWord(Arg)) {
-    Args[ParsedArgs] = Argument(SourceRange(Arg.getLocation(),
-                                            Arg.getEndLocation()),
-                                Arg.getText());
-    ParsedArgs++;
-  }
-
-  S.actOnBlockCommandArgs(BC, llvm::makeArrayRef(Args, ParsedArgs));
-}
-
-BlockCommandComment *Parser::parseBlockCommand() {
-  assert(Tok.is(tok::backslash_command) || Tok.is(tok::at_command));
-
-  ParamCommandComment *PC = 0;
-  TParamCommandComment *TPC = 0;
-  BlockCommandComment *BC = 0;
-  const CommandInfo *Info = Traits.getCommandInfo(Tok.getCommandID());
-  CommandMarkerKind CommandMarker =
-      Tok.is(tok::backslash_command) ? CMK_Backslash : CMK_At;
-  if (Info->IsParamCommand) {
-    PC = S.actOnParamCommandStart(Tok.getLocation(),
-                                  Tok.getEndLocation(),
-                                  Tok.getCommandID(),
-                                  CommandMarker);
-  } else if (Info->IsTParamCommand) {
-    TPC = S.actOnTParamCommandStart(Tok.getLocation(),
-                                    Tok.getEndLocation(),
-                                    Tok.getCommandID(),
-                                    CommandMarker);
-  } else {
-    BC = S.actOnBlockCommandStart(Tok.getLocation(),
-                                  Tok.getEndLocation(),
-                                  Tok.getCommandID(),
-                                  CommandMarker);
-  }
-  consumeToken();
-
-  if (isTokBlockCommand()) {
-    // Block command ahead.  We can't nest block commands, so pretend that this
-    // command has an empty argument.
-    ParagraphComment *Paragraph = S.actOnParagraphComment(None);
-    if (PC) {
-      S.actOnParamCommandFinish(PC, Paragraph);
-      return PC;
-    } else if (TPC) {
-      S.actOnTParamCommandFinish(TPC, Paragraph);
-      return TPC;
-    } else {
-      S.actOnBlockCommandFinish(BC, Paragraph);
-      return BC;
-    }
-  }
-
-  if (PC || TPC || Info->NumArgs > 0) {
-    // In order to parse command arguments we need to retokenize a few
-    // following text tokens.
-    TextTokenRetokenizer Retokenizer(Allocator, *this);
-
-    if (PC)
-      parseParamCommandArgs(PC, Retokenizer);
-    else if (TPC)
-      parseTParamCommandArgs(TPC, Retokenizer);
-    else
-      parseBlockCommandArgs(BC, Retokenizer, Info->NumArgs);
-
-    Retokenizer.putBackLeftoverTokens();
-  }
-
-  // If there's a block command ahead, we will attach an empty paragraph to
-  // this command.
-  bool EmptyParagraph = false;
-  if (isTokBlockCommand())
-    EmptyParagraph = true;
-  else if (Tok.is(tok::newline)) {
-    Token PrevTok = Tok;
-    consumeToken();
-    EmptyParagraph = isTokBlockCommand();
-    putBack(PrevTok);
-  }
-
-  ParagraphComment *Paragraph;
-  if (EmptyParagraph)
-    Paragraph = S.actOnParagraphComment(None);
-  else {
-    BlockContentComment *Block = parseParagraphOrBlockCommand();
-    // Since we have checked for a block command, we should have parsed a
-    // paragraph.
-    Paragraph = cast<ParagraphComment>(Block);
-  }
-
-  if (PC) {
-    S.actOnParamCommandFinish(PC, Paragraph);
-    return PC;
-  } else if (TPC) {
-    S.actOnTParamCommandFinish(TPC, Paragraph);
-    return TPC;
-  } else {
-    S.actOnBlockCommandFinish(BC, Paragraph);
-    return BC;
-  }
-}
-
-InlineCommandComment *Parser::parseInlineCommand() {
-  assert(Tok.is(tok::backslash_command) || Tok.is(tok::at_command));
-
-  const Token CommandTok = Tok;
-  consumeToken();
-
-  TextTokenRetokenizer Retokenizer(Allocator, *this);
-
-  Token ArgTok;
-  bool ArgTokValid = Retokenizer.lexWord(ArgTok);
-
-  InlineCommandComment *IC;
-  if (ArgTokValid) {
-    IC = S.actOnInlineCommand(CommandTok.getLocation(),
-                              CommandTok.getEndLocation(),
-                              CommandTok.getCommandID(),
-                              ArgTok.getLocation(),
-                              ArgTok.getEndLocation(),
-                              ArgTok.getText());
-  } else {
-    IC = S.actOnInlineCommand(CommandTok.getLocation(),
-                              CommandTok.getEndLocation(),
-                              CommandTok.getCommandID());
-  }
-
-  Retokenizer.putBackLeftoverTokens();
-
-  return IC;
-}
-
-HTMLStartTagComment *Parser::parseHTMLStartTag() {
-  assert(Tok.is(tok::html_start_tag));
-  HTMLStartTagComment *HST =
-      S.actOnHTMLStartTagStart(Tok.getLocation(),
-                               Tok.getHTMLTagStartName());
-  consumeToken();
-
-  SmallVector<HTMLStartTagComment::Attribute, 2> Attrs;
-  while (true) {
-    switch (Tok.getKind()) {
-    case tok::html_ident: {
-      Token Ident = Tok;
-      consumeToken();
-      if (Tok.isNot(tok::html_equals)) {
-        Attrs.push_back(HTMLStartTagComment::Attribute(Ident.getLocation(),
-                                                       Ident.getHTMLIdent()));
-        continue;
-      }
-      Token Equals = Tok;
-      consumeToken();
-      if (Tok.isNot(tok::html_quoted_string)) {
-        Diag(Tok.getLocation(),
-             diag::warn_doc_html_start_tag_expected_quoted_string)
-          << SourceRange(Equals.getLocation());
-        Attrs.push_back(HTMLStartTagComment::Attribute(Ident.getLocation(),
-                                                       Ident.getHTMLIdent()));
-        while (Tok.is(tok::html_equals) ||
-               Tok.is(tok::html_quoted_string))
-          consumeToken();
-        continue;
-      }
-      Attrs.push_back(HTMLStartTagComment::Attribute(
-                              Ident.getLocation(),
-                              Ident.getHTMLIdent(),
-                              Equals.getLocation(),
-                              SourceRange(Tok.getLocation(),
-                                          Tok.getEndLocation()),
-                              Tok.getHTMLQuotedString()));
-      consumeToken();
-      continue;
-    }
-
-    case tok::html_greater:
-      S.actOnHTMLStartTagFinish(HST,
-                                S.copyArray(llvm::makeArrayRef(Attrs)),
-                                Tok.getLocation(),
-                                /* IsSelfClosing = */ false);
-      consumeToken();
-      return HST;
-
-    case tok::html_slash_greater:
-      S.actOnHTMLStartTagFinish(HST,
-                                S.copyArray(llvm::makeArrayRef(Attrs)),
-                                Tok.getLocation(),
-                                /* IsSelfClosing = */ true);
-      consumeToken();
-      return HST;
-
-    case tok::html_equals:
-    case tok::html_quoted_string:
-      Diag(Tok.getLocation(),
-           diag::warn_doc_html_start_tag_expected_ident_or_greater);
-      while (Tok.is(tok::html_equals) ||
-             Tok.is(tok::html_quoted_string))
-        consumeToken();
-      if (Tok.is(tok::html_ident) ||
-          Tok.is(tok::html_greater) ||
-          Tok.is(tok::html_slash_greater))
-        continue;
-
-      S.actOnHTMLStartTagFinish(HST,
-                                S.copyArray(llvm::makeArrayRef(Attrs)),
-                                SourceLocation(),
-                                /* IsSelfClosing = */ false);
-      return HST;
-
-    default:
-      // Not a token from an HTML start tag.  Thus HTML tag prematurely ended.
-      S.actOnHTMLStartTagFinish(HST,
-                                S.copyArray(llvm::makeArrayRef(Attrs)),
-                                SourceLocation(),
-                                /* IsSelfClosing = */ false);
-      bool StartLineInvalid;
-      const unsigned StartLine = SourceMgr.getPresumedLineNumber(
-                                                  HST->getLocation(),
-                                                  &StartLineInvalid);
-      bool EndLineInvalid;
-      const unsigned EndLine = SourceMgr.getPresumedLineNumber(
-                                                  Tok.getLocation(),
-                                                  &EndLineInvalid);
-      if (StartLineInvalid || EndLineInvalid || StartLine == EndLine)
-        Diag(Tok.getLocation(),
-             diag::warn_doc_html_start_tag_expected_ident_or_greater)
-          << HST->getSourceRange();
-      else {
-        Diag(Tok.getLocation(),
-             diag::warn_doc_html_start_tag_expected_ident_or_greater);
-        Diag(HST->getLocation(), diag::note_doc_html_tag_started_here)
-          << HST->getSourceRange();
-      }
-      return HST;
-    }
-  }
-}
-
-HTMLEndTagComment *Parser::parseHTMLEndTag() {
-  assert(Tok.is(tok::html_end_tag));
-  Token TokEndTag = Tok;
-  consumeToken();
-  SourceLocation Loc;
-  if (Tok.is(tok::html_greater)) {
-    Loc = Tok.getLocation();
-    consumeToken();
-  }
-
-  return S.actOnHTMLEndTag(TokEndTag.getLocation(),
-                           Loc,
-                           TokEndTag.getHTMLTagEndName());
-}
-
-BlockContentComment *Parser::parseParagraphOrBlockCommand() {
-  SmallVector<InlineContentComment *, 8> Content;
-
-  while (true) {
-    switch (Tok.getKind()) {
-    case tok::verbatim_block_begin:
-    case tok::verbatim_line_name:
-    case tok::eof:
-      assert(Content.size() != 0);
-      break; // Block content or EOF ahead, finish this parapgaph.
-
-    case tok::unknown_command:
-      Content.push_back(S.actOnUnknownCommand(Tok.getLocation(),
-                                              Tok.getEndLocation(),
-                                              Tok.getUnknownCommandName()));
-      consumeToken();
-      continue;
-
-    case tok::backslash_command:
-    case tok::at_command: {
-      const CommandInfo *Info = Traits.getCommandInfo(Tok.getCommandID());
-      if (Info->IsBlockCommand) {
-        if (Content.size() == 0)
-          return parseBlockCommand();
-        break; // Block command ahead, finish this parapgaph.
-      }
-      if (Info->IsVerbatimBlockEndCommand) {
-        Diag(Tok.getLocation(),
-             diag::warn_verbatim_block_end_without_start)
-          << Tok.is(tok::at_command)
-          << Info->Name
-          << SourceRange(Tok.getLocation(), Tok.getEndLocation());
-        consumeToken();
-        continue;
-      }
-      if (Info->IsUnknownCommand) {
-        Content.push_back(S.actOnUnknownCommand(Tok.getLocation(),
-                                                Tok.getEndLocation(),
-                                                Info->getID()));
-        consumeToken();
-        continue;
-      }
-      assert(Info->IsInlineCommand);
-      Content.push_back(parseInlineCommand());
-      continue;
-    }
-
-    case tok::newline: {
-      consumeToken();
-      if (Tok.is(tok::newline) || Tok.is(tok::eof)) {
-        consumeToken();
-        break; // Two newlines -- end of paragraph.
-      }
-      // Also allow [tok::newline, tok::text, tok::newline] if the middle
-      // tok::text is just whitespace.
-      if (Tok.is(tok::text) && isWhitespace(Tok.getText())) {
-        Token WhitespaceTok = Tok;
-        consumeToken();
-        if (Tok.is(tok::newline) || Tok.is(tok::eof)) {
-          consumeToken();
-          break;
-        }
-        // We have [tok::newline, tok::text, non-newline].  Put back tok::text.
-        putBack(WhitespaceTok);
-      }
-      if (Content.size() > 0)
-        Content.back()->addTrailingNewline();
-      continue;
-    }
-
-    // Don't deal with HTML tag soup now.
-    case tok::html_start_tag:
-      Content.push_back(parseHTMLStartTag());
-      continue;
-
-    case tok::html_end_tag:
-      Content.push_back(parseHTMLEndTag());
-      continue;
-
-    case tok::text:
-      Content.push_back(S.actOnText(Tok.getLocation(),
-                                    Tok.getEndLocation(),
-                                    Tok.getText()));
-      consumeToken();
-      continue;
-
-    case tok::verbatim_block_line:
-    case tok::verbatim_block_end:
-    case tok::verbatim_line_text:
-    case tok::html_ident:
-    case tok::html_equals:
-    case tok::html_quoted_string:
-    case tok::html_greater:
-    case tok::html_slash_greater:
-      llvm_unreachable("should not see this token");
-    }
-    break;
-  }
-
-  return S.actOnParagraphComment(S.copyArray(llvm::makeArrayRef(Content)));
-}
-
-VerbatimBlockComment *Parser::parseVerbatimBlock() {
-  assert(Tok.is(tok::verbatim_block_begin));
-
-  VerbatimBlockComment *VB =
-      S.actOnVerbatimBlockStart(Tok.getLocation(),
-                                Tok.getVerbatimBlockID());
-  consumeToken();
-
-  // Don't create an empty line if verbatim opening command is followed
-  // by a newline.
-  if (Tok.is(tok::newline))
-    consumeToken();
-
-  SmallVector<VerbatimBlockLineComment *, 8> Lines;
-  while (Tok.is(tok::verbatim_block_line) ||
-         Tok.is(tok::newline)) {
-    VerbatimBlockLineComment *Line;
-    if (Tok.is(tok::verbatim_block_line)) {
-      Line = S.actOnVerbatimBlockLine(Tok.getLocation(),
-                                      Tok.getVerbatimBlockText());
-      consumeToken();
-      if (Tok.is(tok::newline)) {
-        consumeToken();
-      }
-    } else {
-      // Empty line, just a tok::newline.
-      Line = S.actOnVerbatimBlockLine(Tok.getLocation(), "");
-      consumeToken();
-    }
-    Lines.push_back(Line);
-  }
-
-  if (Tok.is(tok::verbatim_block_end)) {
-    const CommandInfo *Info = Traits.getCommandInfo(Tok.getVerbatimBlockID());
-    S.actOnVerbatimBlockFinish(VB, Tok.getLocation(),
-                               Info->Name,
-                               S.copyArray(llvm::makeArrayRef(Lines)));
-    consumeToken();
-  } else {
-    // Unterminated \\verbatim block
-    S.actOnVerbatimBlockFinish(VB, SourceLocation(), "",
-                               S.copyArray(llvm::makeArrayRef(Lines)));
-  }
-
-  return VB;
-}
-
-VerbatimLineComment *Parser::parseVerbatimLine() {
-  assert(Tok.is(tok::verbatim_line_name));
-
-  Token NameTok = Tok;
-  consumeToken();
-
-  SourceLocation TextBegin;
-  StringRef Text;
-  // Next token might not be a tok::verbatim_line_text if verbatim line
-  // starting command comes just before a newline or comment end.
-  if (Tok.is(tok::verbatim_line_text)) {
-    TextBegin = Tok.getLocation();
-    Text = Tok.getVerbatimLineText();
-  } else {
-    TextBegin = NameTok.getEndLocation();
-    Text = "";
-  }
-
-  VerbatimLineComment *VL = S.actOnVerbatimLine(NameTok.getLocation(),
-                                                NameTok.getVerbatimLineID(),
-                                                TextBegin,
-                                                Text);
-  consumeToken();
-  return VL;
-}
-
-BlockContentComment *Parser::parseBlockContent() {
-  switch (Tok.getKind()) {
-  case tok::text:
-  case tok::unknown_command:
-  case tok::backslash_command:
-  case tok::at_command:
-  case tok::html_start_tag:
-  case tok::html_end_tag:
-    return parseParagraphOrBlockCommand();
-
-  case tok::verbatim_block_begin:
-    return parseVerbatimBlock();
-
-  case tok::verbatim_line_name:
-    return parseVerbatimLine();
-
-  case tok::eof:
-  case tok::newline:
-  case tok::verbatim_block_line:
-  case tok::verbatim_block_end:
-  case tok::verbatim_line_text:
-  case tok::html_ident:
-  case tok::html_equals:
-  case tok::html_quoted_string:
-  case tok::html_greater:
-  case tok::html_slash_greater:
-    llvm_unreachable("should not see this token");
-  }
-  llvm_unreachable("bogus token kind");
-}
-
-FullComment *Parser::parseFullComment() {
-  // Skip newlines at the beginning of the comment.
-  while (Tok.is(tok::newline))
-    consumeToken();
-
-  SmallVector<BlockContentComment *, 8> Blocks;
-  while (Tok.isNot(tok::eof)) {
-    Blocks.push_back(parseBlockContent());
-
-    // Skip extra newlines after paragraph end.
-    while (Tok.is(tok::newline))
-      consumeToken();
-  }
-  return S.actOnFullComment(S.copyArray(llvm::makeArrayRef(Blocks)));
-}
-
-} // end namespace comments
-} // end namespace clang
diff --git a/lib/AST/CommentSema.cpp b/lib/AST/CommentSema.cpp
deleted file mode 100644
index 5a0bf37..0000000
--- a/lib/AST/CommentSema.cpp
+++ /dev/null
@@ -1,1102 +0,0 @@
-//===--- CommentSema.cpp - Doxygen comment semantic analysis --------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/AST/CommentSema.h"
-#include "clang/AST/Attr.h"
-#include "clang/AST/CommentCommandTraits.h"
-#include "clang/AST/CommentDiagnostic.h"
-#include "clang/AST/Decl.h"
-#include "clang/AST/DeclTemplate.h"
-#include "clang/Basic/SourceManager.h"
-#include "clang/Lex/Preprocessor.h"
-#include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/StringSwitch.h"
-
-namespace clang {
-namespace comments {
-
-namespace {
-#include "clang/AST/CommentHTMLTagsProperties.inc"
-} // unnamed namespace
-
-Sema::Sema(llvm::BumpPtrAllocator &Allocator, const SourceManager &SourceMgr,
-           DiagnosticsEngine &Diags, CommandTraits &Traits,
-           const Preprocessor *PP) :
-    Allocator(Allocator), SourceMgr(SourceMgr), Diags(Diags), Traits(Traits),
-    PP(PP), ThisDeclInfo(NULL), BriefCommand(NULL), HeaderfileCommand(NULL) {
-}
-
-void Sema::setDecl(const Decl *D) {
-  if (!D)
-    return;
-
-  ThisDeclInfo = new (Allocator) DeclInfo;
-  ThisDeclInfo->CommentDecl = D;
-  ThisDeclInfo->IsFilled = false;
-}
-
-ParagraphComment *Sema::actOnParagraphComment(
-                              ArrayRef<InlineContentComment *> Content) {
-  return new (Allocator) ParagraphComment(Content);
-}
-
-BlockCommandComment *Sema::actOnBlockCommandStart(
-                                      SourceLocation LocBegin,
-                                      SourceLocation LocEnd,
-                                      unsigned CommandID,
-                                      CommandMarkerKind CommandMarker) {
-  BlockCommandComment *BC = new (Allocator) BlockCommandComment(LocBegin, LocEnd,
-                                                                CommandID,
-                                                                CommandMarker);
-  checkContainerDecl(BC);
-  return BC;
-}
-
-void Sema::actOnBlockCommandArgs(BlockCommandComment *Command,
-                                 ArrayRef<BlockCommandComment::Argument> Args) {
-  Command->setArgs(Args);
-}
-
-void Sema::actOnBlockCommandFinish(BlockCommandComment *Command,
-                                   ParagraphComment *Paragraph) {
-  Command->setParagraph(Paragraph);
-  checkBlockCommandEmptyParagraph(Command);
-  checkBlockCommandDuplicate(Command);
-  if (ThisDeclInfo) {
-    // These checks only make sense if the comment is attached to a
-    // declaration.
-    checkReturnsCommand(Command);
-    checkDeprecatedCommand(Command);
-  }
-}
-
-ParamCommandComment *Sema::actOnParamCommandStart(
-                                      SourceLocation LocBegin,
-                                      SourceLocation LocEnd,
-                                      unsigned CommandID,
-                                      CommandMarkerKind CommandMarker) {
-  ParamCommandComment *Command =
-      new (Allocator) ParamCommandComment(LocBegin, LocEnd, CommandID,
-                                          CommandMarker);
-
-  if (!isFunctionDecl())
-    Diag(Command->getLocation(),
-         diag::warn_doc_param_not_attached_to_a_function_decl)
-      << CommandMarker
-      << Command->getCommandNameRange(Traits);
-
-  return Command;
-}
-
-void Sema::checkFunctionDeclVerbatimLine(const BlockCommandComment *Comment) {
-  const CommandInfo *Info = Traits.getCommandInfo(Comment->getCommandID());
-  if (!Info->IsFunctionDeclarationCommand)
-    return;
-
-  unsigned DiagSelect;
-  switch (Comment->getCommandID()) {
-    case CommandTraits::KCI_function:
-      DiagSelect = (!isAnyFunctionDecl() && !isFunctionTemplateDecl())? 1 : 0;
-      break;
-    case CommandTraits::KCI_functiongroup:
-      DiagSelect = (!isAnyFunctionDecl() && !isFunctionTemplateDecl())? 2 : 0;
-      break;
-    case CommandTraits::KCI_method:
-      DiagSelect = !isObjCMethodDecl() ? 3 : 0;
-      break;
-    case CommandTraits::KCI_methodgroup:
-      DiagSelect = !isObjCMethodDecl() ? 4 : 0;
-      break;
-    case CommandTraits::KCI_callback:
-      DiagSelect = !isFunctionPointerVarDecl() ? 5 : 0;
-      break;
-    default:
-      DiagSelect = 0;
-      break;
-  }
-  if (DiagSelect)
-    Diag(Comment->getLocation(), diag::warn_doc_function_method_decl_mismatch)
-    << Comment->getCommandMarker()
-    << (DiagSelect-1) << (DiagSelect-1)
-    << Comment->getSourceRange();
-}
-
-void Sema::checkContainerDeclVerbatimLine(const BlockCommandComment *Comment) {
-  const CommandInfo *Info = Traits.getCommandInfo(Comment->getCommandID());
-  if (!Info->IsRecordLikeDeclarationCommand)
-    return;
-  unsigned DiagSelect;
-  switch (Comment->getCommandID()) {
-    case CommandTraits::KCI_class:
-      DiagSelect = (!isClassOrStructDecl() && !isClassTemplateDecl()) ? 1 : 0;
-      // Allow @class command on @interface declarations.
-      // FIXME. Currently, \class and @class are indistinguishable. So,
-      // \class is also allowed on an @interface declaration
-      if (DiagSelect && Comment->getCommandMarker() && isObjCInterfaceDecl())
-        DiagSelect = 0;
-      break;
-    case CommandTraits::KCI_interface:
-      DiagSelect = !isObjCInterfaceDecl() ? 2 : 0;
-      break;
-    case CommandTraits::KCI_protocol:
-      DiagSelect = !isObjCProtocolDecl() ? 3 : 0;
-      break;
-    case CommandTraits::KCI_struct:
-      DiagSelect = !isClassOrStructDecl() ? 4 : 0;
-      break;
-    case CommandTraits::KCI_union:
-      DiagSelect = !isUnionDecl() ? 5 : 0;
-      break;
-    default:
-      DiagSelect = 0;
-      break;
-  }
-  if (DiagSelect)
-    Diag(Comment->getLocation(), diag::warn_doc_api_container_decl_mismatch)
-    << Comment->getCommandMarker()
-    << (DiagSelect-1) << (DiagSelect-1)
-    << Comment->getSourceRange();
-}
-
-void Sema::checkContainerDecl(const BlockCommandComment *Comment) {
-  const CommandInfo *Info = Traits.getCommandInfo(Comment->getCommandID());
-  if (!Info->IsRecordLikeDetailCommand || isRecordLikeDecl())
-    return;
-  unsigned DiagSelect;
-  switch (Comment->getCommandID()) {
-    case CommandTraits::KCI_classdesign:
-      DiagSelect = 1;
-      break;
-    case CommandTraits::KCI_coclass:
-      DiagSelect = 2;
-      break;
-    case CommandTraits::KCI_dependency:
-      DiagSelect = 3;
-      break;
-    case CommandTraits::KCI_helper:
-      DiagSelect = 4;
-      break;
-    case CommandTraits::KCI_helperclass:
-      DiagSelect = 5;
-      break;
-    case CommandTraits::KCI_helps:
-      DiagSelect = 6;
-      break;
-    case CommandTraits::KCI_instancesize:
-      DiagSelect = 7;
-      break;
-    case CommandTraits::KCI_ownership:
-      DiagSelect = 8;
-      break;
-    case CommandTraits::KCI_performance:
-      DiagSelect = 9;
-      break;
-    case CommandTraits::KCI_security:
-      DiagSelect = 10;
-      break;
-    case CommandTraits::KCI_superclass:
-      DiagSelect = 11;
-      break;
-    default:
-      DiagSelect = 0;
-      break;
-  }
-  if (DiagSelect)
-    Diag(Comment->getLocation(), diag::warn_doc_container_decl_mismatch)
-    << Comment->getCommandMarker()
-    << (DiagSelect-1)
-    << Comment->getSourceRange();
-}
-
-/// \brief Turn a string into the corresponding PassDirection or -1 if it's not
-/// valid.
-static int getParamPassDirection(StringRef Arg) {
-  return llvm::StringSwitch<int>(Arg)
-      .Case("[in]", ParamCommandComment::In)
-      .Case("[out]", ParamCommandComment::Out)
-      .Cases("[in,out]", "[out,in]", ParamCommandComment::InOut)
-      .Default(-1);
-}
-
-void Sema::actOnParamCommandDirectionArg(ParamCommandComment *Command,
-                                         SourceLocation ArgLocBegin,
-                                         SourceLocation ArgLocEnd,
-                                         StringRef Arg) {
-  std::string ArgLower = Arg.lower();
-  int Direction = getParamPassDirection(ArgLower);
-
-  if (Direction == -1) {
-    // Try again with whitespace removed.
-    ArgLower.erase(
-        std::remove_if(ArgLower.begin(), ArgLower.end(), clang::isWhitespace),
-        ArgLower.end());
-    Direction = getParamPassDirection(ArgLower);
-
-    SourceRange ArgRange(ArgLocBegin, ArgLocEnd);
-    if (Direction != -1) {
-      const char *FixedName = ParamCommandComment::getDirectionAsString(
-          (ParamCommandComment::PassDirection)Direction);
-      Diag(ArgLocBegin, diag::warn_doc_param_spaces_in_direction)
-          << ArgRange << FixItHint::CreateReplacement(ArgRange, FixedName);
-    } else {
-      Diag(ArgLocBegin, diag::warn_doc_param_invalid_direction) << ArgRange;
-      Direction = ParamCommandComment::In; // Sane fall back.
-    }
-  }
-  Command->setDirection((ParamCommandComment::PassDirection)Direction,
-                        /*Explicit=*/true);
-}
-
-void Sema::actOnParamCommandParamNameArg(ParamCommandComment *Command,
-                                         SourceLocation ArgLocBegin,
-                                         SourceLocation ArgLocEnd,
-                                         StringRef Arg) {
-  // Parser will not feed us more arguments than needed.
-  assert(Command->getNumArgs() == 0);
-
-  if (!Command->isDirectionExplicit()) {
-    // User didn't provide a direction argument.
-    Command->setDirection(ParamCommandComment::In, /* Explicit = */ false);
-  }
-  typedef BlockCommandComment::Argument Argument;
-  Argument *A = new (Allocator) Argument(SourceRange(ArgLocBegin,
-                                                     ArgLocEnd),
-                                         Arg);
-  Command->setArgs(llvm::makeArrayRef(A, 1));
-}
-
-void Sema::actOnParamCommandFinish(ParamCommandComment *Command,
-                                   ParagraphComment *Paragraph) {
-  Command->setParagraph(Paragraph);
-  checkBlockCommandEmptyParagraph(Command);
-}
-
-TParamCommandComment *Sema::actOnTParamCommandStart(
-                                      SourceLocation LocBegin,
-                                      SourceLocation LocEnd,
-                                      unsigned CommandID,
-                                      CommandMarkerKind CommandMarker) {
-  TParamCommandComment *Command =
-      new (Allocator) TParamCommandComment(LocBegin, LocEnd, CommandID,
-                                           CommandMarker);
-
-  if (!isTemplateOrSpecialization())
-    Diag(Command->getLocation(),
-         diag::warn_doc_tparam_not_attached_to_a_template_decl)
-      << CommandMarker
-      << Command->getCommandNameRange(Traits);
-
-  return Command;
-}
-
-void Sema::actOnTParamCommandParamNameArg(TParamCommandComment *Command,
-                                          SourceLocation ArgLocBegin,
-                                          SourceLocation ArgLocEnd,
-                                          StringRef Arg) {
-  // Parser will not feed us more arguments than needed.
-  assert(Command->getNumArgs() == 0);
-
-  typedef BlockCommandComment::Argument Argument;
-  Argument *A = new (Allocator) Argument(SourceRange(ArgLocBegin,
-                                                     ArgLocEnd),
-                                         Arg);
-  Command->setArgs(llvm::makeArrayRef(A, 1));
-
-  if (!isTemplateOrSpecialization()) {
-    // We already warned that this \\tparam is not attached to a template decl.
-    return;
-  }
-
-  const TemplateParameterList *TemplateParameters =
-      ThisDeclInfo->TemplateParameters;
-  SmallVector<unsigned, 2> Position;
-  if (resolveTParamReference(Arg, TemplateParameters, &Position)) {
-    Command->setPosition(copyArray(llvm::makeArrayRef(Position)));
-    TParamCommandComment *&PrevCommand = TemplateParameterDocs[Arg];
-    if (PrevCommand) {
-      SourceRange ArgRange(ArgLocBegin, ArgLocEnd);
-      Diag(ArgLocBegin, diag::warn_doc_tparam_duplicate)
-        << Arg << ArgRange;
-      Diag(PrevCommand->getLocation(), diag::note_doc_tparam_previous)
-        << PrevCommand->getParamNameRange();
-    }
-    PrevCommand = Command;
-    return;
-  }
-
-  SourceRange ArgRange(ArgLocBegin, ArgLocEnd);
-  Diag(ArgLocBegin, diag::warn_doc_tparam_not_found)
-    << Arg << ArgRange;
-
-  if (!TemplateParameters || TemplateParameters->size() == 0)
-    return;
-
-  StringRef CorrectedName;
-  if (TemplateParameters->size() == 1) {
-    const NamedDecl *Param = TemplateParameters->getParam(0);
-    const IdentifierInfo *II = Param->getIdentifier();
-    if (II)
-      CorrectedName = II->getName();
-  } else {
-    CorrectedName = correctTypoInTParamReference(Arg, TemplateParameters);
-  }
-
-  if (!CorrectedName.empty()) {
-    Diag(ArgLocBegin, diag::note_doc_tparam_name_suggestion)
-      << CorrectedName
-      << FixItHint::CreateReplacement(ArgRange, CorrectedName);
-  }
-
-  return;
-}
-
-void Sema::actOnTParamCommandFinish(TParamCommandComment *Command,
-                                    ParagraphComment *Paragraph) {
-  Command->setParagraph(Paragraph);
-  checkBlockCommandEmptyParagraph(Command);
-}
-
-InlineCommandComment *Sema::actOnInlineCommand(SourceLocation CommandLocBegin,
-                                               SourceLocation CommandLocEnd,
-                                               unsigned CommandID) {
-  ArrayRef<InlineCommandComment::Argument> Args;
-  StringRef CommandName = Traits.getCommandInfo(CommandID)->Name;
-  return new (Allocator) InlineCommandComment(
-                                  CommandLocBegin,
-                                  CommandLocEnd,
-                                  CommandID,
-                                  getInlineCommandRenderKind(CommandName),
-                                  Args);
-}
-
-InlineCommandComment *Sema::actOnInlineCommand(SourceLocation CommandLocBegin,
-                                               SourceLocation CommandLocEnd,
-                                               unsigned CommandID,
-                                               SourceLocation ArgLocBegin,
-                                               SourceLocation ArgLocEnd,
-                                               StringRef Arg) {
-  typedef InlineCommandComment::Argument Argument;
-  Argument *A = new (Allocator) Argument(SourceRange(ArgLocBegin,
-                                                     ArgLocEnd),
-                                         Arg);
-  StringRef CommandName = Traits.getCommandInfo(CommandID)->Name;
-
-  return new (Allocator) InlineCommandComment(
-                                  CommandLocBegin,
-                                  CommandLocEnd,
-                                  CommandID,
-                                  getInlineCommandRenderKind(CommandName),
-                                  llvm::makeArrayRef(A, 1));
-}
-
-InlineContentComment *Sema::actOnUnknownCommand(SourceLocation LocBegin,
-                                                SourceLocation LocEnd,
-                                                StringRef CommandName) {
-  unsigned CommandID = Traits.registerUnknownCommand(CommandName)->getID();
-  return actOnUnknownCommand(LocBegin, LocEnd, CommandID);
-}
-
-InlineContentComment *Sema::actOnUnknownCommand(SourceLocation LocBegin,
-                                                SourceLocation LocEnd,
-                                                unsigned CommandID) {
-  ArrayRef<InlineCommandComment::Argument> Args;
-  return new (Allocator) InlineCommandComment(
-                                  LocBegin, LocEnd, CommandID,
-                                  InlineCommandComment::RenderNormal,
-                                  Args);
-}
-
-TextComment *Sema::actOnText(SourceLocation LocBegin,
-                             SourceLocation LocEnd,
-                             StringRef Text) {
-  return new (Allocator) TextComment(LocBegin, LocEnd, Text);
-}
-
-VerbatimBlockComment *Sema::actOnVerbatimBlockStart(SourceLocation Loc,
-                                                    unsigned CommandID) {
-  StringRef CommandName = Traits.getCommandInfo(CommandID)->Name;
-  return new (Allocator) VerbatimBlockComment(
-                                  Loc,
-                                  Loc.getLocWithOffset(1 + CommandName.size()),
-                                  CommandID);
-}
-
-VerbatimBlockLineComment *Sema::actOnVerbatimBlockLine(SourceLocation Loc,
-                                                       StringRef Text) {
-  return new (Allocator) VerbatimBlockLineComment(Loc, Text);
-}
-
-void Sema::actOnVerbatimBlockFinish(
-                            VerbatimBlockComment *Block,
-                            SourceLocation CloseNameLocBegin,
-                            StringRef CloseName,
-                            ArrayRef<VerbatimBlockLineComment *> Lines) {
-  Block->setCloseName(CloseName, CloseNameLocBegin);
-  Block->setLines(Lines);
-}
-
-VerbatimLineComment *Sema::actOnVerbatimLine(SourceLocation LocBegin,
-                                             unsigned CommandID,
-                                             SourceLocation TextBegin,
-                                             StringRef Text) {
-  VerbatimLineComment *VL = new (Allocator) VerbatimLineComment(
-                              LocBegin,
-                              TextBegin.getLocWithOffset(Text.size()),
-                              CommandID,
-                              TextBegin,
-                              Text);
-  checkFunctionDeclVerbatimLine(VL);
-  checkContainerDeclVerbatimLine(VL);
-  return VL;
-}
-
-HTMLStartTagComment *Sema::actOnHTMLStartTagStart(SourceLocation LocBegin,
-                                                  StringRef TagName) {
-  return new (Allocator) HTMLStartTagComment(LocBegin, TagName);
-}
-
-void Sema::actOnHTMLStartTagFinish(
-                              HTMLStartTagComment *Tag,
-                              ArrayRef<HTMLStartTagComment::Attribute> Attrs,
-                              SourceLocation GreaterLoc,
-                              bool IsSelfClosing) {
-  Tag->setAttrs(Attrs);
-  for (const auto &Attr : Attrs) {
-    if (!isHTMLAttributeSafeToPassThrough(Attr.Name))
-      Tag->setUnsafeToPassThrough();
-  }
-
-  Tag->setGreaterLoc(GreaterLoc);
-  if (IsSelfClosing)
-    Tag->setSelfClosing();
-  else if (!isHTMLEndTagForbidden(Tag->getTagName()))
-    HTMLOpenTags.push_back(Tag);
-}
-
-HTMLEndTagComment *Sema::actOnHTMLEndTag(SourceLocation LocBegin,
-                                         SourceLocation LocEnd,
-                                         StringRef TagName) {
-  HTMLEndTagComment *HET =
-      new (Allocator) HTMLEndTagComment(LocBegin, LocEnd, TagName);
-  if (isHTMLEndTagForbidden(TagName)) {
-    Diag(HET->getLocation(), diag::warn_doc_html_end_forbidden)
-      << TagName << HET->getSourceRange();
-    HET->setUnsafeToPassThrough();
-    return HET;
-  }
-
-  bool FoundOpen = false;
-  for (SmallVectorImpl<HTMLStartTagComment *>::const_reverse_iterator
-       I = HTMLOpenTags.rbegin(), E = HTMLOpenTags.rend();
-       I != E; ++I) {
-    if ((*I)->getTagName() == TagName) {
-      FoundOpen = true;
-      break;
-    }
-  }
-  if (!FoundOpen) {
-    Diag(HET->getLocation(), diag::warn_doc_html_end_unbalanced)
-      << HET->getSourceRange();
-    HET->setUnsafeToPassThrough();
-    return HET;
-  }
-
-  while (!HTMLOpenTags.empty()) {
-    HTMLStartTagComment *HST = HTMLOpenTags.pop_back_val();
-    StringRef LastNotClosedTagName = HST->getTagName();
-    if (LastNotClosedTagName == TagName) {
-      // If the start tag is unsafe, end tag is unsafe as well.
-      if (!HST->isSafeToPassThrough())
-        HET->setUnsafeToPassThrough();
-      break;
-    }
-
-    if (isHTMLEndTagOptional(LastNotClosedTagName))
-      continue;
-
-    bool OpenLineInvalid;
-    const unsigned OpenLine = SourceMgr.getPresumedLineNumber(
-                                                HST->getLocation(),
-                                                &OpenLineInvalid);
-    bool CloseLineInvalid;
-    const unsigned CloseLine = SourceMgr.getPresumedLineNumber(
-                                                HET->getLocation(),
-                                                &CloseLineInvalid);
-
-    if (OpenLineInvalid || CloseLineInvalid || OpenLine == CloseLine) {
-      Diag(HST->getLocation(), diag::warn_doc_html_start_end_mismatch)
-        << HST->getTagName() << HET->getTagName()
-        << HST->getSourceRange() << HET->getSourceRange();
-      HST->setUnsafeToPassThrough();
-    } else {
-      Diag(HST->getLocation(), diag::warn_doc_html_start_end_mismatch)
-        << HST->getTagName() << HET->getTagName()
-        << HST->getSourceRange();
-      Diag(HET->getLocation(), diag::note_doc_html_end_tag)
-        << HET->getSourceRange();
-      HST->setUnsafeToPassThrough();
-    }
-  }
-
-  return HET;
-}
-
-FullComment *Sema::actOnFullComment(
-                              ArrayRef<BlockContentComment *> Blocks) {
-  FullComment *FC = new (Allocator) FullComment(Blocks, ThisDeclInfo);
-  resolveParamCommandIndexes(FC);
-
-  // Complain about HTML tags that are not closed.
-  while (!HTMLOpenTags.empty()) {
-    HTMLStartTagComment *HST = HTMLOpenTags.pop_back_val();
-    if (isHTMLEndTagOptional(HST->getTagName()))
-      continue;
-
-    Diag(HST->getLocation(), diag::warn_doc_html_missing_end_tag)
-      << HST->getTagName() << HST->getSourceRange();
-    HST->setUnsafeToPassThrough();
-  }
-
-  return FC;
-}
-
-void Sema::checkBlockCommandEmptyParagraph(BlockCommandComment *Command) {
-  if (Traits.getCommandInfo(Command->getCommandID())->IsEmptyParagraphAllowed)
-    return;
-
-  ParagraphComment *Paragraph = Command->getParagraph();
-  if (Paragraph->isWhitespace()) {
-    SourceLocation DiagLoc;
-    if (Command->getNumArgs() > 0)
-      DiagLoc = Command->getArgRange(Command->getNumArgs() - 1).getEnd();
-    if (!DiagLoc.isValid())
-      DiagLoc = Command->getCommandNameRange(Traits).getEnd();
-    Diag(DiagLoc, diag::warn_doc_block_command_empty_paragraph)
-      << Command->getCommandMarker()
-      << Command->getCommandName(Traits)
-      << Command->getSourceRange();
-  }
-}
-
-void Sema::checkReturnsCommand(const BlockCommandComment *Command) {
-  if (!Traits.getCommandInfo(Command->getCommandID())->IsReturnsCommand)
-    return;
-
-  assert(ThisDeclInfo && "should not call this check on a bare comment");
-
-  if (isFunctionDecl()) {
-    if (ThisDeclInfo->ReturnType->isVoidType()) {
-      unsigned DiagKind;
-      switch (ThisDeclInfo->CommentDecl->getKind()) {
-      default:
-        if (ThisDeclInfo->IsObjCMethod)
-          DiagKind = 3;
-        else
-          DiagKind = 0;
-        break;
-      case Decl::CXXConstructor:
-        DiagKind = 1;
-        break;
-      case Decl::CXXDestructor:
-        DiagKind = 2;
-        break;
-      }
-      Diag(Command->getLocation(),
-           diag::warn_doc_returns_attached_to_a_void_function)
-        << Command->getCommandMarker()
-        << Command->getCommandName(Traits)
-        << DiagKind
-        << Command->getSourceRange();
-    }
-    return;
-  }
-  else if (isObjCPropertyDecl())
-    return;
-
-  Diag(Command->getLocation(),
-       diag::warn_doc_returns_not_attached_to_a_function_decl)
-    << Command->getCommandMarker()
-    << Command->getCommandName(Traits)
-    << Command->getSourceRange();
-}
-
-void Sema::checkBlockCommandDuplicate(const BlockCommandComment *Command) {
-  const CommandInfo *Info = Traits.getCommandInfo(Command->getCommandID());
-  const BlockCommandComment *PrevCommand = NULL;
-  if (Info->IsBriefCommand) {
-    if (!BriefCommand) {
-      BriefCommand = Command;
-      return;
-    }
-    PrevCommand = BriefCommand;
-  } else if (Info->IsHeaderfileCommand) {
-    if (!HeaderfileCommand) {
-      HeaderfileCommand = Command;
-      return;
-    }
-    PrevCommand = HeaderfileCommand;
-  } else {
-    // We don't want to check this command for duplicates.
-    return;
-  }
-  StringRef CommandName = Command->getCommandName(Traits);
-  StringRef PrevCommandName = PrevCommand->getCommandName(Traits);
-  Diag(Command->getLocation(), diag::warn_doc_block_command_duplicate)
-      << Command->getCommandMarker()
-      << CommandName
-      << Command->getSourceRange();
-  if (CommandName == PrevCommandName)
-    Diag(PrevCommand->getLocation(), diag::note_doc_block_command_previous)
-        << PrevCommand->getCommandMarker()
-        << PrevCommandName
-        << PrevCommand->getSourceRange();
-  else
-    Diag(PrevCommand->getLocation(),
-         diag::note_doc_block_command_previous_alias)
-        << PrevCommand->getCommandMarker()
-        << PrevCommandName
-        << CommandName;
-}
-
-void Sema::checkDeprecatedCommand(const BlockCommandComment *Command) {
-  if (!Traits.getCommandInfo(Command->getCommandID())->IsDeprecatedCommand)
-    return;
-
-  assert(ThisDeclInfo && "should not call this check on a bare comment");
-
-  const Decl *D = ThisDeclInfo->CommentDecl;
-  if (!D)
-    return;
-
-  if (D->hasAttr<DeprecatedAttr>() ||
-      D->hasAttr<AvailabilityAttr>() ||
-      D->hasAttr<UnavailableAttr>())
-    return;
-
-  Diag(Command->getLocation(),
-       diag::warn_doc_deprecated_not_sync)
-    << Command->getSourceRange();
-
-  // Try to emit a fixit with a deprecation attribute.
-  if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
-    // Don't emit a Fix-It for non-member function definitions.  GCC does not
-    // accept attributes on them.
-    const DeclContext *Ctx = FD->getDeclContext();
-    if ((!Ctx || !Ctx->isRecord()) &&
-        FD->doesThisDeclarationHaveABody())
-      return;
-
-    StringRef AttributeSpelling = "__attribute__((deprecated))";
-    if (PP) {
-      TokenValue Tokens[] = {
-        tok::kw___attribute, tok::l_paren, tok::l_paren,
-        PP->getIdentifierInfo("deprecated"),
-        tok::r_paren, tok::r_paren
-      };
-      StringRef MacroName = PP->getLastMacroWithSpelling(FD->getLocation(),
-                                                         Tokens);
-      if (!MacroName.empty())
-        AttributeSpelling = MacroName;
-    }
-
-    SmallString<64> TextToInsert(" ");
-    TextToInsert += AttributeSpelling;
-    Diag(FD->getLocEnd(),
-         diag::note_add_deprecation_attr)
-      << FixItHint::CreateInsertion(FD->getLocEnd().getLocWithOffset(1),
-                                    TextToInsert);
-  }
-}
-
-void Sema::resolveParamCommandIndexes(const FullComment *FC) {
-  if (!isFunctionDecl()) {
-    // We already warned that \\param commands are not attached to a function
-    // decl.
-    return;
-  }
-
-  SmallVector<ParamCommandComment *, 8> UnresolvedParamCommands;
-
-  // Comment AST nodes that correspond to \c ParamVars for which we have
-  // found a \\param command or NULL if no documentation was found so far.
-  SmallVector<ParamCommandComment *, 8> ParamVarDocs;
-
-  ArrayRef<const ParmVarDecl *> ParamVars = getParamVars();
-  ParamVarDocs.resize(ParamVars.size(), NULL);
-
-  // First pass over all \\param commands: resolve all parameter names.
-  for (Comment::child_iterator I = FC->child_begin(), E = FC->child_end();
-       I != E; ++I) {
-    ParamCommandComment *PCC = dyn_cast<ParamCommandComment>(*I);
-    if (!PCC || !PCC->hasParamName())
-      continue;
-    StringRef ParamName = PCC->getParamNameAsWritten();
-
-    // Check that referenced parameter name is in the function decl.
-    const unsigned ResolvedParamIndex = resolveParmVarReference(ParamName,
-                                                                ParamVars);
-    if (ResolvedParamIndex == ParamCommandComment::VarArgParamIndex) {
-      PCC->setIsVarArgParam();
-      continue;
-    }
-    if (ResolvedParamIndex == ParamCommandComment::InvalidParamIndex) {
-      UnresolvedParamCommands.push_back(PCC);
-      continue;
-    }
-    PCC->setParamIndex(ResolvedParamIndex);
-    if (ParamVarDocs[ResolvedParamIndex]) {
-      SourceRange ArgRange = PCC->getParamNameRange();
-      Diag(ArgRange.getBegin(), diag::warn_doc_param_duplicate)
-        << ParamName << ArgRange;
-      ParamCommandComment *PrevCommand = ParamVarDocs[ResolvedParamIndex];
-      Diag(PrevCommand->getLocation(), diag::note_doc_param_previous)
-        << PrevCommand->getParamNameRange();
-    }
-    ParamVarDocs[ResolvedParamIndex] = PCC;
-  }
-
-  // Find parameter declarations that have no corresponding \\param.
-  SmallVector<const ParmVarDecl *, 8> OrphanedParamDecls;
-  for (unsigned i = 0, e = ParamVarDocs.size(); i != e; ++i) {
-    if (!ParamVarDocs[i])
-      OrphanedParamDecls.push_back(ParamVars[i]);
-  }
-
-  // Second pass over unresolved \\param commands: do typo correction.
-  // Suggest corrections from a set of parameter declarations that have no
-  // corresponding \\param.
-  for (unsigned i = 0, e = UnresolvedParamCommands.size(); i != e; ++i) {
-    const ParamCommandComment *PCC = UnresolvedParamCommands[i];
-
-    SourceRange ArgRange = PCC->getParamNameRange();
-    StringRef ParamName = PCC->getParamNameAsWritten();
-    Diag(ArgRange.getBegin(), diag::warn_doc_param_not_found)
-      << ParamName << ArgRange;
-
-    // All parameters documented -- can't suggest a correction.
-    if (OrphanedParamDecls.size() == 0)
-      continue;
-
-    unsigned CorrectedParamIndex = ParamCommandComment::InvalidParamIndex;
-    if (OrphanedParamDecls.size() == 1) {
-      // If one parameter is not documented then that parameter is the only
-      // possible suggestion.
-      CorrectedParamIndex = 0;
-    } else {
-      // Do typo correction.
-      CorrectedParamIndex = correctTypoInParmVarReference(ParamName,
-                                                          OrphanedParamDecls);
-    }
-    if (CorrectedParamIndex != ParamCommandComment::InvalidParamIndex) {
-      const ParmVarDecl *CorrectedPVD = OrphanedParamDecls[CorrectedParamIndex];
-      if (const IdentifierInfo *CorrectedII = CorrectedPVD->getIdentifier())
-        Diag(ArgRange.getBegin(), diag::note_doc_param_name_suggestion)
-          << CorrectedII->getName()
-          << FixItHint::CreateReplacement(ArgRange, CorrectedII->getName());
-    }
-  }
-}
-
-bool Sema::isFunctionDecl() {
-  if (!ThisDeclInfo)
-    return false;
-  if (!ThisDeclInfo->IsFilled)
-    inspectThisDecl();
-  return ThisDeclInfo->getKind() == DeclInfo::FunctionKind;
-}
-
-bool Sema::isAnyFunctionDecl() {
-  return isFunctionDecl() && ThisDeclInfo->CurrentDecl &&
-         isa<FunctionDecl>(ThisDeclInfo->CurrentDecl);
-}
-
-bool Sema::isFunctionOrMethodVariadic() {
-  if (!isAnyFunctionDecl() && !isObjCMethodDecl() && !isFunctionTemplateDecl())
-    return false;
-  if (const FunctionDecl *FD =
-        dyn_cast<FunctionDecl>(ThisDeclInfo->CurrentDecl))
-    return FD->isVariadic();
-  if (const FunctionTemplateDecl *FTD =
-        dyn_cast<FunctionTemplateDecl>(ThisDeclInfo->CurrentDecl))
-    return FTD->getTemplatedDecl()->isVariadic();
-  if (const ObjCMethodDecl *MD =
-        dyn_cast<ObjCMethodDecl>(ThisDeclInfo->CurrentDecl))
-    return MD->isVariadic();
-  return false;
-}
-
-bool Sema::isObjCMethodDecl() {
-  return isFunctionDecl() && ThisDeclInfo->CurrentDecl &&
-         isa<ObjCMethodDecl>(ThisDeclInfo->CurrentDecl);
-}
-
-bool Sema::isFunctionPointerVarDecl() {
-  if (!ThisDeclInfo)
-    return false;
-  if (!ThisDeclInfo->IsFilled)
-    inspectThisDecl();
-  if (ThisDeclInfo->getKind() == DeclInfo::VariableKind) {
-    if (const VarDecl *VD = dyn_cast_or_null<VarDecl>(ThisDeclInfo->CurrentDecl)) {
-      QualType QT = VD->getType();
-      return QT->isFunctionPointerType();
-    }
-  }
-  return false;
-}
-
-bool Sema::isObjCPropertyDecl() {
-  if (!ThisDeclInfo)
-    return false;
-  if (!ThisDeclInfo->IsFilled)
-    inspectThisDecl();
-  return ThisDeclInfo->CurrentDecl->getKind() == Decl::ObjCProperty;
-}
-
-bool Sema::isTemplateOrSpecialization() {
-  if (!ThisDeclInfo)
-    return false;
-  if (!ThisDeclInfo->IsFilled)
-    inspectThisDecl();
-  return ThisDeclInfo->getTemplateKind() != DeclInfo::NotTemplate;
-}
-
-bool Sema::isRecordLikeDecl() {
-  if (!ThisDeclInfo)
-    return false;
-  if (!ThisDeclInfo->IsFilled)
-    inspectThisDecl();
-  return isUnionDecl() || isClassOrStructDecl() || isObjCInterfaceDecl() ||
-         isObjCProtocolDecl();
-}
-
-bool Sema::isUnionDecl() {
-  if (!ThisDeclInfo)
-    return false;
-  if (!ThisDeclInfo->IsFilled)
-    inspectThisDecl();
-  if (const RecordDecl *RD =
-        dyn_cast_or_null<RecordDecl>(ThisDeclInfo->CurrentDecl))
-    return RD->isUnion();
-  return false;
-}
-
-bool Sema::isClassOrStructDecl() {
-  if (!ThisDeclInfo)
-    return false;
-  if (!ThisDeclInfo->IsFilled)
-    inspectThisDecl();
-  return ThisDeclInfo->CurrentDecl &&
-         isa<RecordDecl>(ThisDeclInfo->CurrentDecl) &&
-         !isUnionDecl();
-}
-
-bool Sema::isClassTemplateDecl() {
-  if (!ThisDeclInfo)
-    return false;
-  if (!ThisDeclInfo->IsFilled)
-    inspectThisDecl();
-  return ThisDeclInfo->CurrentDecl &&
-          (isa<ClassTemplateDecl>(ThisDeclInfo->CurrentDecl));
-}
-
-bool Sema::isFunctionTemplateDecl() {
-  if (!ThisDeclInfo)
-    return false;
-  if (!ThisDeclInfo->IsFilled)
-    inspectThisDecl();
-  return ThisDeclInfo->CurrentDecl &&
-         (isa<FunctionTemplateDecl>(ThisDeclInfo->CurrentDecl));
-}
-
-bool Sema::isObjCInterfaceDecl() {
-  if (!ThisDeclInfo)
-    return false;
-  if (!ThisDeclInfo->IsFilled)
-    inspectThisDecl();
-  return ThisDeclInfo->CurrentDecl &&
-         isa<ObjCInterfaceDecl>(ThisDeclInfo->CurrentDecl);
-}
-
-bool Sema::isObjCProtocolDecl() {
-  if (!ThisDeclInfo)
-    return false;
-  if (!ThisDeclInfo->IsFilled)
-    inspectThisDecl();
-  return ThisDeclInfo->CurrentDecl &&
-         isa<ObjCProtocolDecl>(ThisDeclInfo->CurrentDecl);
-}
-
-ArrayRef<const ParmVarDecl *> Sema::getParamVars() {
-  if (!ThisDeclInfo->IsFilled)
-    inspectThisDecl();
-  return ThisDeclInfo->ParamVars;
-}
-
-void Sema::inspectThisDecl() {
-  ThisDeclInfo->fill();
-}
-
-unsigned Sema::resolveParmVarReference(StringRef Name,
-                                       ArrayRef<const ParmVarDecl *> ParamVars) {
-  for (unsigned i = 0, e = ParamVars.size(); i != e; ++i) {
-    const IdentifierInfo *II = ParamVars[i]->getIdentifier();
-    if (II && II->getName() == Name)
-      return i;
-  }
-  if (Name == "..." && isFunctionOrMethodVariadic())
-    return ParamCommandComment::VarArgParamIndex;
-  return ParamCommandComment::InvalidParamIndex;
-}
-
-namespace {
-class SimpleTypoCorrector {
-  StringRef Typo;
-  const unsigned MaxEditDistance;
-
-  const NamedDecl *BestDecl;
-  unsigned BestEditDistance;
-  unsigned BestIndex;
-  unsigned NextIndex;
-
-public:
-  SimpleTypoCorrector(StringRef Typo) :
-      Typo(Typo), MaxEditDistance((Typo.size() + 2) / 3),
-      BestDecl(NULL), BestEditDistance(MaxEditDistance + 1),
-      BestIndex(0), NextIndex(0)
-  { }
-
-  void addDecl(const NamedDecl *ND);
-
-  const NamedDecl *getBestDecl() const {
-    if (BestEditDistance > MaxEditDistance)
-      return NULL;
-
-    return BestDecl;
-  }
-
-  unsigned getBestDeclIndex() const {
-    assert(getBestDecl());
-    return BestIndex;
-  }
-};
-
-void SimpleTypoCorrector::addDecl(const NamedDecl *ND) {
-  unsigned CurrIndex = NextIndex++;
-
-  const IdentifierInfo *II = ND->getIdentifier();
-  if (!II)
-    return;
-
-  StringRef Name = II->getName();
-  unsigned MinPossibleEditDistance = abs((int)Name.size() - (int)Typo.size());
-  if (MinPossibleEditDistance > 0 &&
-      Typo.size() / MinPossibleEditDistance < 3)
-    return;
-
-  unsigned EditDistance = Typo.edit_distance(Name, true, MaxEditDistance);
-  if (EditDistance < BestEditDistance) {
-    BestEditDistance = EditDistance;
-    BestDecl = ND;
-    BestIndex = CurrIndex;
-  }
-}
-} // unnamed namespace
-
-unsigned Sema::correctTypoInParmVarReference(
-                                    StringRef Typo,
-                                    ArrayRef<const ParmVarDecl *> ParamVars) {
-  SimpleTypoCorrector Corrector(Typo);
-  for (unsigned i = 0, e = ParamVars.size(); i != e; ++i)
-    Corrector.addDecl(ParamVars[i]);
-  if (Corrector.getBestDecl())
-    return Corrector.getBestDeclIndex();
-  else
-    return ParamCommandComment::InvalidParamIndex;
-}
-
-namespace {
-bool ResolveTParamReferenceHelper(
-                            StringRef Name,
-                            const TemplateParameterList *TemplateParameters,
-                            SmallVectorImpl<unsigned> *Position) {
-  for (unsigned i = 0, e = TemplateParameters->size(); i != e; ++i) {
-    const NamedDecl *Param = TemplateParameters->getParam(i);
-    const IdentifierInfo *II = Param->getIdentifier();
-    if (II && II->getName() == Name) {
-      Position->push_back(i);
-      return true;
-    }
-
-    if (const TemplateTemplateParmDecl *TTP =
-            dyn_cast<TemplateTemplateParmDecl>(Param)) {
-      Position->push_back(i);
-      if (ResolveTParamReferenceHelper(Name, TTP->getTemplateParameters(),
-                                       Position))
-        return true;
-      Position->pop_back();
-    }
-  }
-  return false;
-}
-} // unnamed namespace
-
-bool Sema::resolveTParamReference(
-                            StringRef Name,
-                            const TemplateParameterList *TemplateParameters,
-                            SmallVectorImpl<unsigned> *Position) {
-  Position->clear();
-  if (!TemplateParameters)
-    return false;
-
-  return ResolveTParamReferenceHelper(Name, TemplateParameters, Position);
-}
-
-namespace {
-void CorrectTypoInTParamReferenceHelper(
-                            const TemplateParameterList *TemplateParameters,
-                            SimpleTypoCorrector &Corrector) {
-  for (unsigned i = 0, e = TemplateParameters->size(); i != e; ++i) {
-    const NamedDecl *Param = TemplateParameters->getParam(i);
-    Corrector.addDecl(Param);
-
-    if (const TemplateTemplateParmDecl *TTP =
-            dyn_cast<TemplateTemplateParmDecl>(Param))
-      CorrectTypoInTParamReferenceHelper(TTP->getTemplateParameters(),
-                                         Corrector);
-  }
-}
-} // unnamed namespace
-
-StringRef Sema::correctTypoInTParamReference(
-                            StringRef Typo,
-                            const TemplateParameterList *TemplateParameters) {
-  SimpleTypoCorrector Corrector(Typo);
-  CorrectTypoInTParamReferenceHelper(TemplateParameters, Corrector);
-  if (const NamedDecl *ND = Corrector.getBestDecl()) {
-    const IdentifierInfo *II = ND->getIdentifier();
-    assert(II && "SimpleTypoCorrector should not return this decl");
-    return II->getName();
-  }
-  return StringRef();
-}
-
-InlineCommandComment::RenderKind
-Sema::getInlineCommandRenderKind(StringRef Name) const {
-  assert(Traits.getCommandInfo(Name)->IsInlineCommand);
-
-  return llvm::StringSwitch<InlineCommandComment::RenderKind>(Name)
-      .Case("b", InlineCommandComment::RenderBold)
-      .Cases("c", "p", InlineCommandComment::RenderMonospaced)
-      .Cases("a", "e", "em", InlineCommandComment::RenderEmphasized)
-      .Default(InlineCommandComment::RenderNormal);
-}
-
-} // end namespace comments
-} // end namespace clang
-
diff --git a/lib/AST/RawCommentList.cpp b/lib/AST/RawCommentList.cpp
index 24b129a..84550cd 100644
--- a/lib/AST/RawCommentList.cpp
+++ b/lib/AST/RawCommentList.cpp
@@ -9,12 +9,6 @@
 
 #include "clang/AST/RawCommentList.h"
 #include "clang/AST/ASTContext.h"
-#include "clang/AST/Comment.h"
-#include "clang/AST/CommentBriefParser.h"
-#include "clang/AST/CommentCommandTraits.h"
-#include "clang/AST/CommentLexer.h"
-#include "clang/AST/CommentParser.h"
-#include "clang/AST/CommentSema.h"
 #include "llvm/ADT/STLExtras.h"
 
 using namespace clang;
@@ -117,49 +111,10 @@ StringRef RawComment::getRawTextSlow(const SourceManager &SourceMgr) const {
 
 const char *RawComment::extractBriefText(const ASTContext &Context) const {
   // Make sure that RawText is valid.
-  getRawText(Context.getSourceManager());
-
-  // Since we will be copying the resulting text, all allocations made during
-  // parsing are garbage after resulting string is formed.  Thus we can use
-  // a separate allocator for all temporary stuff.
-  llvm::BumpPtrAllocator Allocator;
-
-  comments::Lexer L(Allocator, Context.getDiagnostics(),
-                    Context.getCommentCommandTraits(),
-                    Range.getBegin(),
-                    RawText.begin(), RawText.end());
-  comments::BriefParser P(L, Context.getCommentCommandTraits());
-
-  const std::string Result = P.Parse();
-  const unsigned BriefTextLength = Result.size();
-  char *BriefTextPtr = new (Context) char[BriefTextLength + 1];
-  memcpy(BriefTextPtr, Result.c_str(), BriefTextLength + 1);
-  BriefText = BriefTextPtr;
-  BriefTextValid = true;
-
-  return BriefTextPtr;
-}
+  //getRawText(Context.getSourceManager());
 
-comments::FullComment *RawComment::parse(const ASTContext &Context,
-                                         const Preprocessor *PP,
-                                         const Decl *D) const {
-  // Make sure that RawText is valid.
-  getRawText(Context.getSourceManager());
-
-  comments::Lexer L(Context.getAllocator(), Context.getDiagnostics(),
-                    Context.getCommentCommandTraits(),
-                    getSourceRange().getBegin(),
-                    RawText.begin(), RawText.end());
-  comments::Sema S(Context.getAllocator(), Context.getSourceManager(),
-                   Context.getDiagnostics(),
-                   Context.getCommentCommandTraits(),
-                   PP);
-  S.setDecl(D);
-  comments::Parser P(L, S, Context.getAllocator(), Context.getSourceManager(),
-                     Context.getDiagnostics(),
-                     Context.getCommentCommandTraits());
-
-  return P.parseFullComment();
+  // FIXME: DOC
+  return "";
 }
 
 static bool onlyWhitespaceBetween(SourceManager &SM,
diff --git a/lib/Basic/DiagnosticIDs.cpp b/lib/Basic/DiagnosticIDs.cpp
index 5334ae8..6c46416 100644
--- a/lib/Basic/DiagnosticIDs.cpp
+++ b/lib/Basic/DiagnosticIDs.cpp
@@ -79,7 +79,6 @@ static const StaticDiagInfoRec StaticDiagInfo[] = {
 #include "clang/Basic/DiagnosticLexKinds.inc"
 #include "clang/Basic/DiagnosticParseKinds.inc"
 #include "clang/Basic/DiagnosticASTKinds.inc"
-#include "clang/Basic/DiagnosticCommentKinds.inc"
 #include "clang/Basic/DiagnosticSemaKinds.inc"
 #include "clang/Basic/DiagnosticAnalysisKinds.inc"
 #undef DIAG
@@ -132,8 +131,7 @@ CATEGORY(SERIALIZATION, FRONTEND)
 CATEGORY(LEX, SERIALIZATION)
 CATEGORY(PARSE, LEX)
 CATEGORY(AST, PARSE)
-CATEGORY(COMMENT, AST)
-CATEGORY(SEMA, COMMENT)
+CATEGORY(SEMA, AST)
 CATEGORY(ANALYSIS, SEMA)
 #undef CATEGORY
 
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 240acc2..619e456 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -566,11 +566,6 @@ private:
 
     // Initialize the ASTContext
     Context.InitBuiltinTypes(*Target);
-
-    // We didn't have access to the comment options when the ASTContext was
-    // constructed, so register them now.
-    Context.getCommentCommandTraits().registerCommentOptions(
-        LangOpt.CommentOpts);
   }
 };
 
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index e51d2cf..0e7714a 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -290,11 +290,6 @@ static bool ParseMigratorArgs(MigratorOptions &Opts, ArgList &Args) {
   return true;
 }
 
-static void ParseCommentArgs(CommentOptions &Opts, ArgList &Args) {
-  Opts.BlockCommandNames = Args.getAllArgValues(OPT_fcomment_block_commands);
-  Opts.ParseAllComments = Args.hasArg(OPT_fparse_all_comments);
-}
-
 static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
                              DiagnosticsEngine &Diags,
                              const TargetOptions &TargetOpts) {
@@ -1716,7 +1711,6 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
   ParseDependencyOutputArgs(Res.getDependencyOutputOpts(), *Args);
   Success = ParseDiagnosticArgs(Res.getDiagnosticOpts(), *Args, &Diags)
             && Success;
-  ParseCommentArgs(Res.getLangOpts()->CommentOpts, *Args);
   ParseFileSystemArgs(Res.getFileSystemOpts(), *Args);
   // FIXME: We shouldn't have to pass the DashX option around here
   InputKind DashX = ParseFrontendArgs(Res.getFrontendOpts(), *Args, Diags);
diff --git a/lib/Index/CMakeLists.txt b/lib/Index/CMakeLists.txt
index fd9810d..abe8fa7 100644
--- a/lib/Index/CMakeLists.txt
+++ b/lib/Index/CMakeLists.txt
@@ -3,7 +3,6 @@ set(LLVM_LINK_COMPONENTS
   )
 
 add_clang_library(clangIndex
-  CommentToXML.cpp
   USRGeneration.cpp
 
   ADDITIONAL_HEADERS
diff --git a/lib/Index/CommentToXML.cpp b/lib/Index/CommentToXML.cpp
deleted file mode 100644
index 377440f..0000000
--- a/lib/Index/CommentToXML.cpp
+++ /dev/null
@@ -1,1142 +0,0 @@
-//===--- CommentToXML.cpp - Convert comments to XML representation --------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/Index/CommentToXML.h"
-#include "SimpleFormatContext.h"
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/Attr.h"
-#include "clang/AST/Comment.h"
-#include "clang/AST/CommentVisitor.h"
-#include "clang/Format/Format.h"
-#include "clang/Index/USRGeneration.h"
-#include "clang/Lex/Lexer.h"
-#include "llvm/ADT/StringExtras.h"
-#include "llvm/ADT/TinyPtrVector.h"
-#include "llvm/Support/raw_ostream.h"
-
-using namespace clang;
-using namespace clang::comments;
-using namespace clang::index;
-
-namespace {
-
-/// This comparison will sort parameters with valid index by index, then vararg
-/// parameters, and invalid (unresolved) parameters last.
-class ParamCommandCommentCompareIndex {
-public:
-  bool operator()(const ParamCommandComment *LHS,
-                  const ParamCommandComment *RHS) const {
-    unsigned LHSIndex = UINT_MAX;
-    unsigned RHSIndex = UINT_MAX;
-
-    if (LHS->isParamIndexValid()) {
-      if (LHS->isVarArgParam())
-        LHSIndex = UINT_MAX - 1;
-      else
-        LHSIndex = LHS->getParamIndex();
-    }
-    if (RHS->isParamIndexValid()) {
-      if (RHS->isVarArgParam())
-        RHSIndex = UINT_MAX - 1;
-      else
-        RHSIndex = RHS->getParamIndex();
-    }
-    return LHSIndex < RHSIndex;
-  }
-};
-
-/// This comparison will sort template parameters in the following order:
-/// \li real template parameters (depth = 1) in index order;
-/// \li all other names (depth > 1);
-/// \li unresolved names.
-class TParamCommandCommentComparePosition {
-public:
-  bool operator()(const TParamCommandComment *LHS,
-                  const TParamCommandComment *RHS) const {
-    // Sort unresolved names last.
-    if (!LHS->isPositionValid())
-      return false;
-    if (!RHS->isPositionValid())
-      return true;
-
-    if (LHS->getDepth() > 1)
-      return false;
-    if (RHS->getDepth() > 1)
-      return true;
-
-    // Sort template parameters in index order.
-    if (LHS->getDepth() == 1 && RHS->getDepth() == 1)
-      return LHS->getIndex(0) < RHS->getIndex(0);
-
-    // Leave all other names in source order.
-    return true;
-  }
-};
-
-/// Separate parts of a FullComment.
-struct FullCommentParts {
-  /// Take a full comment apart and initialize members accordingly.
-  FullCommentParts(const FullComment *C,
-                   const CommandTraits &Traits);
-
-  const BlockContentComment *Brief;
-  const BlockContentComment *Headerfile;
-  const ParagraphComment *FirstParagraph;
-  SmallVector<const BlockCommandComment *, 4> Returns;
-  SmallVector<const ParamCommandComment *, 8> Params;
-  SmallVector<const TParamCommandComment *, 4> TParams;
-  llvm::TinyPtrVector<const BlockCommandComment *> Exceptions;
-  SmallVector<const BlockContentComment *, 8> MiscBlocks;
-};
-
-FullCommentParts::FullCommentParts(const FullComment *C,
-                                   const CommandTraits &Traits) :
-    Brief(NULL), Headerfile(NULL), FirstParagraph(NULL) {
-  for (Comment::child_iterator I = C->child_begin(), E = C->child_end();
-       I != E; ++I) {
-    const Comment *Child = *I;
-    if (!Child)
-      continue;
-    switch (Child->getCommentKind()) {
-    case Comment::NoCommentKind:
-      continue;
-
-    case Comment::ParagraphCommentKind: {
-      const ParagraphComment *PC = cast<ParagraphComment>(Child);
-      if (PC->isWhitespace())
-        break;
-      if (!FirstParagraph)
-        FirstParagraph = PC;
-
-      MiscBlocks.push_back(PC);
-      break;
-    }
-
-    case Comment::BlockCommandCommentKind: {
-      const BlockCommandComment *BCC = cast<BlockCommandComment>(Child);
-      const CommandInfo *Info = Traits.getCommandInfo(BCC->getCommandID());
-      if (!Brief && Info->IsBriefCommand) {
-        Brief = BCC;
-        break;
-      }
-      if (!Headerfile && Info->IsHeaderfileCommand) {
-        Headerfile = BCC;
-        break;
-      }
-      if (Info->IsReturnsCommand) {
-        Returns.push_back(BCC);
-        break;
-      }
-      if (Info->IsThrowsCommand) {
-        Exceptions.push_back(BCC);
-        break;
-      }
-      MiscBlocks.push_back(BCC);
-      break;
-    }
-
-    case Comment::ParamCommandCommentKind: {
-      const ParamCommandComment *PCC = cast<ParamCommandComment>(Child);
-      if (!PCC->hasParamName())
-        break;
-
-      if (!PCC->isDirectionExplicit() && !PCC->hasNonWhitespaceParagraph())
-        break;
-
-      Params.push_back(PCC);
-      break;
-    }
-
-    case Comment::TParamCommandCommentKind: {
-      const TParamCommandComment *TPCC = cast<TParamCommandComment>(Child);
-      if (!TPCC->hasParamName())
-        break;
-
-      if (!TPCC->hasNonWhitespaceParagraph())
-        break;
-
-      TParams.push_back(TPCC);
-      break;
-    }
-
-    case Comment::VerbatimBlockCommentKind:
-      MiscBlocks.push_back(cast<BlockCommandComment>(Child));
-      break;
-
-    case Comment::VerbatimLineCommentKind: {
-      const VerbatimLineComment *VLC = cast<VerbatimLineComment>(Child);
-      const CommandInfo *Info = Traits.getCommandInfo(VLC->getCommandID());
-      if (!Info->IsDeclarationCommand)
-        MiscBlocks.push_back(VLC);
-      break;
-    }
-
-    case Comment::TextCommentKind:
-    case Comment::InlineCommandCommentKind:
-    case Comment::HTMLStartTagCommentKind:
-    case Comment::HTMLEndTagCommentKind:
-    case Comment::VerbatimBlockLineCommentKind:
-    case Comment::FullCommentKind:
-      llvm_unreachable("AST node of this kind can't be a child of "
-                       "a FullComment");
-    }
-  }
-
-  // Sort params in order they are declared in the function prototype.
-  // Unresolved parameters are put at the end of the list in the same order
-  // they were seen in the comment.
-  std::stable_sort(Params.begin(), Params.end(),
-                   ParamCommandCommentCompareIndex());
-
-  std::stable_sort(TParams.begin(), TParams.end(),
-                   TParamCommandCommentComparePosition());
-}
-
-void printHTMLStartTagComment(const HTMLStartTagComment *C,
-                              llvm::raw_svector_ostream &Result) {
-  Result << "<" << C->getTagName();
-
-  if (C->getNumAttrs() != 0) {
-    for (unsigned i = 0, e = C->getNumAttrs(); i != e; i++) {
-      Result << " ";
-      const HTMLStartTagComment::Attribute &Attr = C->getAttr(i);
-      Result << Attr.Name;
-      if (!Attr.Value.empty())
-        Result << "=\"" << Attr.Value << "\"";
-    }
-  }
-
-  if (!C->isSelfClosing())
-    Result << ">";
-  else
-    Result << "/>";
-}
-
-class CommentASTToHTMLConverter :
-    public ConstCommentVisitor<CommentASTToHTMLConverter> {
-public:
-  /// \param Str accumulator for HTML.
-  CommentASTToHTMLConverter(const FullComment *FC,
-                            SmallVectorImpl<char> &Str,
-                            const CommandTraits &Traits) :
-      FC(FC), Result(Str), Traits(Traits)
-  { }
-
-  // Inline content.
-  void visitTextComment(const TextComment *C);
-  void visitInlineCommandComment(const InlineCommandComment *C);
-  void visitHTMLStartTagComment(const HTMLStartTagComment *C);
-  void visitHTMLEndTagComment(const HTMLEndTagComment *C);
-
-  // Block content.
-  void visitParagraphComment(const ParagraphComment *C);
-  void visitBlockCommandComment(const BlockCommandComment *C);
-  void visitParamCommandComment(const ParamCommandComment *C);
-  void visitTParamCommandComment(const TParamCommandComment *C);
-  void visitVerbatimBlockComment(const VerbatimBlockComment *C);
-  void visitVerbatimBlockLineComment(const VerbatimBlockLineComment *C);
-  void visitVerbatimLineComment(const VerbatimLineComment *C);
-
-  void visitFullComment(const FullComment *C);
-
-  // Helpers.
-
-  /// Convert a paragraph that is not a block by itself (an argument to some
-  /// command).
-  void visitNonStandaloneParagraphComment(const ParagraphComment *C);
-
-  void appendToResultWithHTMLEscaping(StringRef S);
-
-private:
-  const FullComment *FC;
-  /// Output stream for HTML.
-  llvm::raw_svector_ostream Result;
-
-  const CommandTraits &Traits;
-};
-} // end unnamed namespace
-
-void CommentASTToHTMLConverter::visitTextComment(const TextComment *C) {
-  appendToResultWithHTMLEscaping(C->getText());
-}
-
-void CommentASTToHTMLConverter::visitInlineCommandComment(
-                                  const InlineCommandComment *C) {
-  // Nothing to render if no arguments supplied.
-  if (C->getNumArgs() == 0)
-    return;
-
-  // Nothing to render if argument is empty.
-  StringRef Arg0 = C->getArgText(0);
-  if (Arg0.empty())
-    return;
-
-  switch (C->getRenderKind()) {
-  case InlineCommandComment::RenderNormal:
-    for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i) {
-      appendToResultWithHTMLEscaping(C->getArgText(i));
-      Result << " ";
-    }
-    return;
-
-  case InlineCommandComment::RenderBold:
-    assert(C->getNumArgs() == 1);
-    Result << "<b>";
-    appendToResultWithHTMLEscaping(Arg0);
-    Result << "</b>";
-    return;
-  case InlineCommandComment::RenderMonospaced:
-    assert(C->getNumArgs() == 1);
-    Result << "<tt>";
-    appendToResultWithHTMLEscaping(Arg0);
-    Result<< "</tt>";
-    return;
-  case InlineCommandComment::RenderEmphasized:
-    assert(C->getNumArgs() == 1);
-    Result << "<em>";
-    appendToResultWithHTMLEscaping(Arg0);
-    Result << "</em>";
-    return;
-  }
-}
-
-void CommentASTToHTMLConverter::visitHTMLStartTagComment(
-                                  const HTMLStartTagComment *C) {
-  printHTMLStartTagComment(C, Result);
-}
-
-void CommentASTToHTMLConverter::visitHTMLEndTagComment(
-                                  const HTMLEndTagComment *C) {
-  Result << "</" << C->getTagName() << ">";
-}
-
-void CommentASTToHTMLConverter::visitParagraphComment(
-                                  const ParagraphComment *C) {
-  if (C->isWhitespace())
-    return;
-
-  Result << "<p>";
-  for (Comment::child_iterator I = C->child_begin(), E = C->child_end();
-       I != E; ++I) {
-    visit(*I);
-  }
-  Result << "</p>";
-}
-
-void CommentASTToHTMLConverter::visitBlockCommandComment(
-                                  const BlockCommandComment *C) {
-  const CommandInfo *Info = Traits.getCommandInfo(C->getCommandID());
-  if (Info->IsBriefCommand) {
-    Result << "<p class=\"para-brief\">";
-    visitNonStandaloneParagraphComment(C->getParagraph());
-    Result << "</p>";
-    return;
-  }
-  if (Info->IsReturnsCommand) {
-    Result << "<p class=\"para-returns\">"
-              "<span class=\"word-returns\">Returns</span> ";
-    visitNonStandaloneParagraphComment(C->getParagraph());
-    Result << "</p>";
-    return;
-  }
-  // We don't know anything about this command.  Just render the paragraph.
-  visit(C->getParagraph());
-}
-
-void CommentASTToHTMLConverter::visitParamCommandComment(
-                                  const ParamCommandComment *C) {
-  if (C->isParamIndexValid()) {
-    if (C->isVarArgParam()) {
-      Result << "<dt class=\"param-name-index-vararg\">";
-      appendToResultWithHTMLEscaping(C->getParamNameAsWritten());
-    } else {
-      Result << "<dt class=\"param-name-index-"
-             << C->getParamIndex()
-             << "\">";
-      appendToResultWithHTMLEscaping(C->getParamName(FC));
-    }
-  } else {
-    Result << "<dt class=\"param-name-index-invalid\">";
-    appendToResultWithHTMLEscaping(C->getParamNameAsWritten());
-  }
-  Result << "</dt>";
-
-  if (C->isParamIndexValid()) {
-    if (C->isVarArgParam())
-      Result << "<dd class=\"param-descr-index-vararg\">";
-    else
-      Result << "<dd class=\"param-descr-index-"
-             << C->getParamIndex()
-             << "\">";
-  } else
-    Result << "<dd class=\"param-descr-index-invalid\">";
-
-  visitNonStandaloneParagraphComment(C->getParagraph());
-  Result << "</dd>";
-}
-
-void CommentASTToHTMLConverter::visitTParamCommandComment(
-                                  const TParamCommandComment *C) {
-  if (C->isPositionValid()) {
-    if (C->getDepth() == 1)
-      Result << "<dt class=\"tparam-name-index-"
-             << C->getIndex(0)
-             << "\">";
-    else
-      Result << "<dt class=\"tparam-name-index-other\">";
-    appendToResultWithHTMLEscaping(C->getParamName(FC));
-  } else {
-    Result << "<dt class=\"tparam-name-index-invalid\">";
-    appendToResultWithHTMLEscaping(C->getParamNameAsWritten());
-  }
-
-  Result << "</dt>";
-
-  if (C->isPositionValid()) {
-    if (C->getDepth() == 1)
-      Result << "<dd class=\"tparam-descr-index-"
-             << C->getIndex(0)
-             << "\">";
-    else
-      Result << "<dd class=\"tparam-descr-index-other\">";
-  } else
-    Result << "<dd class=\"tparam-descr-index-invalid\">";
-
-  visitNonStandaloneParagraphComment(C->getParagraph());
-  Result << "</dd>";
-}
-
-void CommentASTToHTMLConverter::visitVerbatimBlockComment(
-                                  const VerbatimBlockComment *C) {
-  unsigned NumLines = C->getNumLines();
-  if (NumLines == 0)
-    return;
-
-  Result << "<pre>";
-  for (unsigned i = 0; i != NumLines; ++i) {
-    appendToResultWithHTMLEscaping(C->getText(i));
-    if (i + 1 != NumLines)
-      Result << '\n';
-  }
-  Result << "</pre>";
-}
-
-void CommentASTToHTMLConverter::visitVerbatimBlockLineComment(
-                                  const VerbatimBlockLineComment *C) {
-  llvm_unreachable("should not see this AST node");
-}
-
-void CommentASTToHTMLConverter::visitVerbatimLineComment(
-                                  const VerbatimLineComment *C) {
-  Result << "<pre>";
-  appendToResultWithHTMLEscaping(C->getText());
-  Result << "</pre>";
-}
-
-void CommentASTToHTMLConverter::visitFullComment(const FullComment *C) {
-  FullCommentParts Parts(C, Traits);
-
-  bool FirstParagraphIsBrief = false;
-  if (Parts.Headerfile)
-    visit(Parts.Headerfile);
-  if (Parts.Brief)
-    visit(Parts.Brief);
-  else if (Parts.FirstParagraph) {
-    Result << "<p class=\"para-brief\">";
-    visitNonStandaloneParagraphComment(Parts.FirstParagraph);
-    Result << "</p>";
-    FirstParagraphIsBrief = true;
-  }
-
-  for (unsigned i = 0, e = Parts.MiscBlocks.size(); i != e; ++i) {
-    const Comment *C = Parts.MiscBlocks[i];
-    if (FirstParagraphIsBrief && C == Parts.FirstParagraph)
-      continue;
-    visit(C);
-  }
-
-  if (Parts.TParams.size() != 0) {
-    Result << "<dl>";
-    for (unsigned i = 0, e = Parts.TParams.size(); i != e; ++i)
-      visit(Parts.TParams[i]);
-    Result << "</dl>";
-  }
-
-  if (Parts.Params.size() != 0) {
-    Result << "<dl>";
-    for (unsigned i = 0, e = Parts.Params.size(); i != e; ++i)
-      visit(Parts.Params[i]);
-    Result << "</dl>";
-  }
-
-  if (Parts.Returns.size() != 0) {
-    Result << "<div class=\"result-discussion\">";
-    for (unsigned i = 0, e = Parts.Returns.size(); i != e; ++i)
-      visit(Parts.Returns[i]);
-    Result << "</div>";
-  }
-
-  Result.flush();
-}
-
-void CommentASTToHTMLConverter::visitNonStandaloneParagraphComment(
-                                  const ParagraphComment *C) {
-  if (!C)
-    return;
-
-  for (Comment::child_iterator I = C->child_begin(), E = C->child_end();
-       I != E; ++I) {
-    visit(*I);
-  }
-}
-
-void CommentASTToHTMLConverter::appendToResultWithHTMLEscaping(StringRef S) {
-  for (StringRef::iterator I = S.begin(), E = S.end(); I != E; ++I) {
-    const char C = *I;
-    switch (C) {
-    case '&':
-      Result << "&";
-      break;
-    case '<':
-      Result << "<";
-      break;
-    case '>':
-      Result << ">";
-      break;
-    case '"':
-      Result << """;
-      break;
-    case '\'':
-      Result << "'";
-      break;
-    case '/':
-      Result << "/";
-      break;
-    default:
-      Result << C;
-      break;
-    }
-  }
-}
-
-namespace {
-class CommentASTToXMLConverter :
-    public ConstCommentVisitor<CommentASTToXMLConverter> {
-public:
-  /// \param Str accumulator for XML.
-  CommentASTToXMLConverter(const FullComment *FC,
-                           SmallVectorImpl<char> &Str,
-                           const CommandTraits &Traits,
-                           const SourceManager &SM,
-                           SimpleFormatContext &SFC,
-                           unsigned FUID) :
-      FC(FC), Result(Str), Traits(Traits), SM(SM),
-      FormatRewriterContext(SFC),
-      FormatInMemoryUniqueId(FUID) { }
-
-  // Inline content.
-  void visitTextComment(const TextComment *C);
-  void visitInlineCommandComment(const InlineCommandComment *C);
-  void visitHTMLStartTagComment(const HTMLStartTagComment *C);
-  void visitHTMLEndTagComment(const HTMLEndTagComment *C);
-
-  // Block content.
-  void visitParagraphComment(const ParagraphComment *C);
-
-  void appendParagraphCommentWithKind(const ParagraphComment *C,
-                                      StringRef Kind);
-
-  void visitBlockCommandComment(const BlockCommandComment *C);
-  void visitParamCommandComment(const ParamCommandComment *C);
-  void visitTParamCommandComment(const TParamCommandComment *C);
-  void visitVerbatimBlockComment(const VerbatimBlockComment *C);
-  void visitVerbatimBlockLineComment(const VerbatimBlockLineComment *C);
-  void visitVerbatimLineComment(const VerbatimLineComment *C);
-
-  void visitFullComment(const FullComment *C);
-
-  // Helpers.
-  void appendToResultWithXMLEscaping(StringRef S);
-
-  void formatTextOfDeclaration(const DeclInfo *DI,
-                               SmallString<128> &Declaration);
-
-private:
-  const FullComment *FC;
-
-  /// Output stream for XML.
-  llvm::raw_svector_ostream Result;
-
-  const CommandTraits &Traits;
-  const SourceManager &SM;
-  SimpleFormatContext &FormatRewriterContext;
-  unsigned FormatInMemoryUniqueId;
-};
-
-void getSourceTextOfDeclaration(const DeclInfo *ThisDecl,
-                                SmallVectorImpl<char> &Str) {
-  ASTContext &Context = ThisDecl->CurrentDecl->getASTContext();
-  const LangOptions &LangOpts = Context.getLangOpts();
-  llvm::raw_svector_ostream OS(Str);
-  PrintingPolicy PPolicy(LangOpts);
-  PPolicy.PolishForDeclaration = true;
-  PPolicy.TerseOutput = true;
-  ThisDecl->CurrentDecl->print(OS, PPolicy,
-                               /*Indentation*/0, /*PrintInstantiation*/false);
-}
-
-void CommentASTToXMLConverter::formatTextOfDeclaration(
-    const DeclInfo *DI, SmallString<128> &Declaration) {
-  // FIXME. formatting API expects null terminated input string.
-  // There might be more efficient way of doing this.
-  std::string StringDecl = Declaration.str();
-
-  // Formatter specific code.
-  // Form a unique in memory buffer name.
-  SmallString<128> filename;
-  filename += "xmldecl";
-  filename += llvm::utostr(FormatInMemoryUniqueId);
-  filename += ".xd";
-  FileID ID = FormatRewriterContext.createInMemoryFile(filename, StringDecl);
-  SourceLocation Start = FormatRewriterContext.Sources.getLocForStartOfFile(ID)
-      .getLocWithOffset(0);
-  unsigned Length = Declaration.size();
-
-  std::vector<CharSourceRange> Ranges(
-      1, CharSourceRange::getCharRange(Start, Start.getLocWithOffset(Length)));
-  ASTContext &Context = DI->CurrentDecl->getASTContext();
-  const LangOptions &LangOpts = Context.getLangOpts();
-  Lexer Lex(ID, FormatRewriterContext.Sources.getBuffer(ID),
-            FormatRewriterContext.Sources, LangOpts);
-  tooling::Replacements Replace = reformat(
-      format::getLLVMStyle(), Lex, FormatRewriterContext.Sources, Ranges);
-  applyAllReplacements(Replace, FormatRewriterContext.Rewrite);
-  Declaration = FormatRewriterContext.getRewrittenText(ID);
-}
-
-} // end unnamed namespace
-
-void CommentASTToXMLConverter::visitTextComment(const TextComment *C) {
-  appendToResultWithXMLEscaping(C->getText());
-}
-
-void CommentASTToXMLConverter::visitInlineCommandComment(
-    const InlineCommandComment *C) {
-  // Nothing to render if no arguments supplied.
-  if (C->getNumArgs() == 0)
-    return;
-
-  // Nothing to render if argument is empty.
-  StringRef Arg0 = C->getArgText(0);
-  if (Arg0.empty())
-    return;
-
-  switch (C->getRenderKind()) {
-  case InlineCommandComment::RenderNormal:
-    for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i) {
-      appendToResultWithXMLEscaping(C->getArgText(i));
-      Result << " ";
-    }
-    return;
-  case InlineCommandComment::RenderBold:
-    assert(C->getNumArgs() == 1);
-    Result << "<bold>";
-    appendToResultWithXMLEscaping(Arg0);
-    Result << "</bold>";
-    return;
-  case InlineCommandComment::RenderMonospaced:
-    assert(C->getNumArgs() == 1);
-    Result << "<monospaced>";
-    appendToResultWithXMLEscaping(Arg0);
-    Result << "</monospaced>";
-    return;
-  case InlineCommandComment::RenderEmphasized:
-    assert(C->getNumArgs() == 1);
-    Result << "<emphasized>";
-    appendToResultWithXMLEscaping(Arg0);
-    Result << "</emphasized>";
-    return;
-  }
-}
-
-void CommentASTToXMLConverter::visitHTMLStartTagComment(
-    const HTMLStartTagComment *C) {
-  Result << "<rawHTML";
-  if (C->isSafeToPassThrough())
-    Result << " isSafeToPassThrough=\"1\"";
-  Result << "><![CDATA[";
-  printHTMLStartTagComment(C, Result);
-  Result << "]]></rawHTML>";
-}
-
-void
-CommentASTToXMLConverter::visitHTMLEndTagComment(const HTMLEndTagComment *C) {
-  Result << "<rawHTML";
-  if (C->isSafeToPassThrough())
-    Result << " isSafeToPassThrough=\"1\"";
-  Result << "></" << C->getTagName() << "></rawHTML>";
-}
-
-void
-CommentASTToXMLConverter::visitParagraphComment(const ParagraphComment *C) {
-  appendParagraphCommentWithKind(C, StringRef());
-}
-
-void CommentASTToXMLConverter::appendParagraphCommentWithKind(
-                                  const ParagraphComment *C,
-                                  StringRef ParagraphKind) {
-  if (C->isWhitespace())
-    return;
-
-  if (ParagraphKind.empty())
-    Result << "<Para>";
-  else
-    Result << "<Para kind=\"" << ParagraphKind << "\">";
-
-  for (Comment::child_iterator I = C->child_begin(), E = C->child_end();
-       I != E; ++I) {
-    visit(*I);
-  }
-  Result << "</Para>";
-}
-
-void CommentASTToXMLConverter::visitBlockCommandComment(
-    const BlockCommandComment *C) {
-  StringRef ParagraphKind;
-
-  switch (C->getCommandID()) {
-  case CommandTraits::KCI_attention:
-  case CommandTraits::KCI_author:
-  case CommandTraits::KCI_authors:
-  case CommandTraits::KCI_bug:
-  case CommandTraits::KCI_copyright:
-  case CommandTraits::KCI_date:
-  case CommandTraits::KCI_invariant:
-  case CommandTraits::KCI_note:
-  case CommandTraits::KCI_post:
-  case CommandTraits::KCI_pre:
-  case CommandTraits::KCI_remark:
-  case CommandTraits::KCI_remarks:
-  case CommandTraits::KCI_sa:
-  case CommandTraits::KCI_see:
-  case CommandTraits::KCI_since:
-  case CommandTraits::KCI_todo:
-  case CommandTraits::KCI_version:
-  case CommandTraits::KCI_warning:
-    ParagraphKind = C->getCommandName(Traits);
-  default:
-    break;
-  }
-
-  appendParagraphCommentWithKind(C->getParagraph(), ParagraphKind);
-}
-
-void CommentASTToXMLConverter::visitParamCommandComment(
-    const ParamCommandComment *C) {
-  Result << "<Parameter><Name>";
-  appendToResultWithXMLEscaping(C->isParamIndexValid()
-                                    ? C->getParamName(FC)
-                                    : C->getParamNameAsWritten());
-  Result << "</Name>";
-
-  if (C->isParamIndexValid()) {
-    if (C->isVarArgParam())
-      Result << "<IsVarArg />";
-    else
-      Result << "<Index>" << C->getParamIndex() << "</Index>";
-  }
-
-  Result << "<Direction isExplicit=\"" << C->isDirectionExplicit() << "\">";
-  switch (C->getDirection()) {
-  case ParamCommandComment::In:
-    Result << "in";
-    break;
-  case ParamCommandComment::Out:
-    Result << "out";
-    break;
-  case ParamCommandComment::InOut:
-    Result << "in,out";
-    break;
-  }
-  Result << "</Direction><Discussion>";
-  visit(C->getParagraph());
-  Result << "</Discussion></Parameter>";
-}
-
-void CommentASTToXMLConverter::visitTParamCommandComment(
-                                  const TParamCommandComment *C) {
-  Result << "<Parameter><Name>";
-  appendToResultWithXMLEscaping(C->isPositionValid() ? C->getParamName(FC)
-                                : C->getParamNameAsWritten());
-  Result << "</Name>";
-
-  if (C->isPositionValid() && C->getDepth() == 1) {
-    Result << "<Index>" << C->getIndex(0) << "</Index>";
-  }
-
-  Result << "<Discussion>";
-  visit(C->getParagraph());
-  Result << "</Discussion></Parameter>";
-}
-
-void CommentASTToXMLConverter::visitVerbatimBlockComment(
-                                  const VerbatimBlockComment *C) {
-  unsigned NumLines = C->getNumLines();
-  if (NumLines == 0)
-    return;
-
-  switch (C->getCommandID()) {
-  case CommandTraits::KCI_code:
-    Result << "<Verbatim xml:space=\"preserve\" kind=\"code\">";
-    break;
-  default:
-    Result << "<Verbatim xml:space=\"preserve\" kind=\"verbatim\">";
-    break;
-  }
-  for (unsigned i = 0; i != NumLines; ++i) {
-    appendToResultWithXMLEscaping(C->getText(i));
-    if (i + 1 != NumLines)
-      Result << '\n';
-  }
-  Result << "</Verbatim>";
-}
-
-void CommentASTToXMLConverter::visitVerbatimBlockLineComment(
-                                  const VerbatimBlockLineComment *C) {
-  llvm_unreachable("should not see this AST node");
-}
-
-void CommentASTToXMLConverter::visitVerbatimLineComment(
-                                  const VerbatimLineComment *C) {
-  Result << "<Verbatim xml:space=\"preserve\" kind=\"verbatim\">";
-  appendToResultWithXMLEscaping(C->getText());
-  Result << "</Verbatim>";
-}
-
-void CommentASTToXMLConverter::visitFullComment(const FullComment *C) {
-  FullCommentParts Parts(C, Traits);
-
-  const DeclInfo *DI = C->getDeclInfo();
-  StringRef RootEndTag;
-  if (DI) {
-    switch (DI->getKind()) {
-    case DeclInfo::OtherKind:
-      RootEndTag = "</Other>";
-      Result << "<Other";
-      break;
-    case DeclInfo::FunctionKind:
-      RootEndTag = "</Function>";
-      Result << "<Function";
-      switch (DI->TemplateKind) {
-      case DeclInfo::NotTemplate:
-        break;
-      case DeclInfo::Template:
-        Result << " templateKind=\"template\"";
-        break;
-      case DeclInfo::TemplateSpecialization:
-        Result << " templateKind=\"specialization\"";
-        break;
-      case DeclInfo::TemplatePartialSpecialization:
-        llvm_unreachable("partial specializations of functions "
-                         "are not allowed in C++");
-      }
-      if (DI->IsInstanceMethod)
-        Result << " isInstanceMethod=\"1\"";
-      if (DI->IsClassMethod)
-        Result << " isClassMethod=\"1\"";
-      break;
-    case DeclInfo::ClassKind:
-      RootEndTag = "</Class>";
-      Result << "<Class";
-      switch (DI->TemplateKind) {
-      case DeclInfo::NotTemplate:
-        break;
-      case DeclInfo::Template:
-        Result << " templateKind=\"template\"";
-        break;
-      case DeclInfo::TemplateSpecialization:
-        Result << " templateKind=\"specialization\"";
-        break;
-      case DeclInfo::TemplatePartialSpecialization:
-        Result << " templateKind=\"partialSpecialization\"";
-        break;
-      }
-      break;
-    case DeclInfo::VariableKind:
-      RootEndTag = "</Variable>";
-      Result << "<Variable";
-      break;
-    case DeclInfo::NamespaceKind:
-      RootEndTag = "</Namespace>";
-      Result << "<Namespace";
-      break;
-    case DeclInfo::TypedefKind:
-      RootEndTag = "</Typedef>";
-      Result << "<Typedef";
-      break;
-    case DeclInfo::EnumKind:
-      RootEndTag = "</Enum>";
-      Result << "<Enum";
-      break;
-    }
-
-    {
-      // Print line and column number.
-      SourceLocation Loc = DI->CurrentDecl->getLocation();
-      std::pair<FileID, unsigned> LocInfo = SM.getDecomposedLoc(Loc);
-      FileID FID = LocInfo.first;
-      unsigned FileOffset = LocInfo.second;
-
-      if (!FID.isInvalid()) {
-        if (const FileEntry *FE = SM.getFileEntryForID(FID)) {
-          Result << " file=\"";
-          appendToResultWithXMLEscaping(FE->getName());
-          Result << "\"";
-        }
-        Result << " line=\"" << SM.getLineNumber(FID, FileOffset)
-               << "\" column=\"" << SM.getColumnNumber(FID, FileOffset)
-               << "\"";
-      }
-    }
-
-    // Finish the root tag.
-    Result << ">";
-
-    bool FoundName = false;
-    if (const NamedDecl *ND = dyn_cast<NamedDecl>(DI->CommentDecl)) {
-      if (DeclarationName DeclName = ND->getDeclName()) {
-        Result << "<Name>";
-        std::string Name = DeclName.getAsString();
-        appendToResultWithXMLEscaping(Name);
-        FoundName = true;
-        Result << "</Name>";
-      }
-    }
-    if (!FoundName)
-      Result << "<Name><anonymous></Name>";
-
-    {
-      // Print USR.
-      SmallString<128> USR;
-      generateUSRForDecl(DI->CommentDecl, USR);
-      if (!USR.empty()) {
-        Result << "<USR>";
-        appendToResultWithXMLEscaping(USR);
-        Result << "</USR>";
-      }
-    }
-  } else {
-    // No DeclInfo -- just emit some root tag and name tag.
-    RootEndTag = "</Other>";
-    Result << "<Other><Name>unknown</Name>";
-  }
-
-  if (Parts.Headerfile) {
-    Result << "<Headerfile>";
-    visit(Parts.Headerfile);
-    Result << "</Headerfile>";
-  }
-
-  {
-    // Pretty-print the declaration.
-    Result << "<Declaration>";
-    SmallString<128> Declaration;
-    getSourceTextOfDeclaration(DI, Declaration);
-    formatTextOfDeclaration(DI, Declaration);
-    appendToResultWithXMLEscaping(Declaration);
-    Result << "</Declaration>";
-  }
-
-  bool FirstParagraphIsBrief = false;
-  if (Parts.Brief) {
-    Result << "<Abstract>";
-    visit(Parts.Brief);
-    Result << "</Abstract>";
-  } else if (Parts.FirstParagraph) {
-    Result << "<Abstract>";
-    visit(Parts.FirstParagraph);
-    Result << "</Abstract>";
-    FirstParagraphIsBrief = true;
-  }
-
-  if (Parts.TParams.size() != 0) {
-    Result << "<TemplateParameters>";
-    for (unsigned i = 0, e = Parts.TParams.size(); i != e; ++i)
-      visit(Parts.TParams[i]);
-    Result << "</TemplateParameters>";
-  }
-
-  if (Parts.Params.size() != 0) {
-    Result << "<Parameters>";
-    for (unsigned i = 0, e = Parts.Params.size(); i != e; ++i)
-      visit(Parts.Params[i]);
-    Result << "</Parameters>";
-  }
-
-  if (Parts.Exceptions.size() != 0) {
-    Result << "<Exceptions>";
-    for (unsigned i = 0, e = Parts.Exceptions.size(); i != e; ++i)
-      visit(Parts.Exceptions[i]);
-    Result << "</Exceptions>";
-  }
-
-  if (Parts.Returns.size() != 0) {
-    Result << "<ResultDiscussion>";
-    for (unsigned i = 0, e = Parts.Returns.size(); i != e; ++i)
-      visit(Parts.Returns[i]);
-    Result << "</ResultDiscussion>";
-  }
-
-  if (DI->CommentDecl->hasAttrs()) {
-    const AttrVec &Attrs = DI->CommentDecl->getAttrs();
-    for (unsigned i = 0, e = Attrs.size(); i != e; i++) {
-      const AvailabilityAttr *AA = dyn_cast<AvailabilityAttr>(Attrs[i]);
-      if (!AA) {
-        if (const DeprecatedAttr *DA = dyn_cast<DeprecatedAttr>(Attrs[i])) {
-          if (DA->getMessage().empty())
-            Result << "<Deprecated/>";
-          else {
-            Result << "<Deprecated>";
-            appendToResultWithXMLEscaping(DA->getMessage());
-            Result << "</Deprecated>";
-          }
-        }
-        else if (const UnavailableAttr *UA = dyn_cast<UnavailableAttr>(Attrs[i])) {
-          if (UA->getMessage().empty())
-            Result << "<Unavailable/>";
-          else {
-            Result << "<Unavailable>";
-            appendToResultWithXMLEscaping(UA->getMessage());
-            Result << "</Unavailable>";
-          }
-        }
-        continue;
-      }
-
-      // 'availability' attribute.
-      Result << "<Availability";
-      StringRef Distribution;
-      if (AA->getPlatform()) {
-        Distribution = AvailabilityAttr::getPrettyPlatformName(
-                                        AA->getPlatform()->getName());
-        if (Distribution.empty())
-          Distribution = AA->getPlatform()->getName();
-      }
-      Result << " distribution=\"" << Distribution << "\">";
-      VersionTuple IntroducedInVersion = AA->getIntroduced();
-      if (!IntroducedInVersion.empty()) {
-        Result << "<IntroducedInVersion>"
-               << IntroducedInVersion.getAsString()
-               << "</IntroducedInVersion>";
-      }
-      VersionTuple DeprecatedInVersion = AA->getDeprecated();
-      if (!DeprecatedInVersion.empty()) {
-        Result << "<DeprecatedInVersion>"
-               << DeprecatedInVersion.getAsString()
-               << "</DeprecatedInVersion>";
-      }
-      VersionTuple RemovedAfterVersion = AA->getObsoleted();
-      if (!RemovedAfterVersion.empty()) {
-        Result << "<RemovedAfterVersion>"
-               << RemovedAfterVersion.getAsString()
-               << "</RemovedAfterVersion>";
-      }
-      StringRef DeprecationSummary = AA->getMessage();
-      if (!DeprecationSummary.empty()) {
-        Result << "<DeprecationSummary>";
-        appendToResultWithXMLEscaping(DeprecationSummary);
-        Result << "</DeprecationSummary>";
-      }
-      if (AA->getUnavailable())
-        Result << "<Unavailable/>";
-      Result << "</Availability>";
-    }
-  }
-
-  {
-    bool StartTagEmitted = false;
-    for (unsigned i = 0, e = Parts.MiscBlocks.size(); i != e; ++i) {
-      const Comment *C = Parts.MiscBlocks[i];
-      if (FirstParagraphIsBrief && C == Parts.FirstParagraph)
-        continue;
-      if (!StartTagEmitted) {
-        Result << "<Discussion>";
-        StartTagEmitted = true;
-      }
-      visit(C);
-    }
-    if (StartTagEmitted)
-      Result << "</Discussion>";
-  }
-
-  Result << RootEndTag;
-
-  Result.flush();
-}
-
-void CommentASTToXMLConverter::appendToResultWithXMLEscaping(StringRef S) {
-  for (StringRef::iterator I = S.begin(), E = S.end(); I != E; ++I) {
-    const char C = *I;
-    switch (C) {
-    case '&':
-      Result << "&";
-      break;
-    case '<':
-      Result << "<";
-      break;
-    case '>':
-      Result << ">";
-      break;
-    case '"':
-      Result << """;
-      break;
-    case '\'':
-      Result << "'";
-      break;
-    default:
-      Result << C;
-      break;
-    }
-  }
-}
-
-void CommentToXMLConverter::convertCommentToHTML(const FullComment *FC,
-                                                 SmallVectorImpl<char> &HTML,
-                                                 const ASTContext &Context) {
-  CommentASTToHTMLConverter Converter(FC, HTML,
-                                      Context.getCommentCommandTraits());
-  Converter.visit(FC);
-}
-
-void CommentToXMLConverter::convertHTMLTagNodeToText(
-    const comments::HTMLTagComment *HTC, SmallVectorImpl<char> &Text,
-    const ASTContext &Context) {
-  CommentASTToHTMLConverter Converter(0, Text,
-                                      Context.getCommentCommandTraits());
-  Converter.visit(HTC);
-}
-
-void CommentToXMLConverter::convertCommentToXML(const FullComment *FC,
-                                                SmallVectorImpl<char> &XML,
-                                                const ASTContext &Context) {
-  if (!FormatContext) {
-    FormatContext = new SimpleFormatContext(Context.getLangOpts());
-  } else if ((FormatInMemoryUniqueId % 1000) == 0) {
-    // Delete after some number of iterations, so the buffers don't grow
-    // too large.
-    delete FormatContext;
-    FormatContext = new SimpleFormatContext(Context.getLangOpts());
-  }
-
-  CommentASTToXMLConverter Converter(FC, XML, Context.getCommentCommandTraits(),
-                                     Context.getSourceManager(), *FormatContext,
-                                     FormatInMemoryUniqueId++);
-  Converter.visit(FC);
-}
-
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index a0d64ac..4827cee 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -1139,7 +1139,9 @@ void Sema::ActOnComment(SourceRange Comment) {
       SourceMgr.isInSystemHeader(Comment.getBegin()))
     return;
   RawComment RC(SourceMgr, Comment, false,
-                LangOpts.CommentOpts.ParseAllComments);
+                false);
+  // FIXME: DOC
+                //LangOpts.ParseAllComments.ParseAllComments);
   if (RC.isAlmostTrailingComment()) {
     SourceRange MagicMarkerRange(Comment.getBegin(),
                                  Comment.getBegin().getLocWithOffset(3));
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 50462b7..506c4fa 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -18,7 +18,6 @@
 #include "clang/AST/ASTLambda.h"
 #include "clang/AST/CXXInheritance.h"
 #include "clang/AST/CharUnits.h"
-#include "clang/AST/CommentDiagnostic.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/DeclTemplate.h"
@@ -9179,43 +9178,7 @@ void Sema::ActOnDocumentableDecl(Decl *D) {
 }
 
 void Sema::ActOnDocumentableDecls(ArrayRef<Decl *> Group) {
-  // Don't parse the comment if Doxygen diagnostics are ignored.
-  if (Group.empty() || !Group[0])
-   return;
-
-  if (Diags.getDiagnosticLevel(diag::warn_doc_param_not_found,
-                               Group[0]->getLocation())
-        == DiagnosticsEngine::Ignored)
-    return;
-
-  if (Group.size() >= 2) {
-    // This is a decl group.  Normally it will contain only declarations
-    // produced from declarator list.  But in case we have any definitions or
-    // additional declaration references:
-    //   'typedef struct S {} S;'
-    //   'typedef struct S *S;'
-    //   'struct S *pS;'
-    // FinalizeDeclaratorGroup adds these as separate declarations.
-    Decl *MaybeTagDecl = Group[0];
-    if (MaybeTagDecl && isa<TagDecl>(MaybeTagDecl)) {
-      Group = Group.slice(1);
-    }
-  }
-
-  // See if there are any new comments that are not attached to a decl.
-  ArrayRef<RawComment *> Comments = Context.getRawCommentList().getComments();
-  if (!Comments.empty() &&
-      !Comments.back()->isAttached()) {
-    // There is at least one comment that not attached to a decl.
-    // Maybe it should be attached to one of these decls?
-    //
-    // Note that this way we pick up not only comments that precede the
-    // declaration, but also comments that *follow* the declaration -- thanks to
-    // the lookahead in the lexer: we've consumed the semicolon and looked
-    // ahead through comments.
-    for (unsigned i = 0, e = Group.size(); i != e; ++i)
-      Context.getCommentForDecl(Group[i], &PP);
-  }
+  // FIXME: DOC
 }
 
 /// ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator()
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp
index 1407546..db117bc 100644
--- a/lib/Serialization/ASTReader.cpp
+++ b/lib/Serialization/ASTReader.cpp
@@ -187,14 +187,6 @@ static bool checkLanguageOptions(const LangOptions &LangOpts,
     return true;
   }
 
-  if (ExistingLangOpts.CommentOpts.BlockCommandNames !=
-      LangOpts.CommentOpts.BlockCommandNames) {
-    if (Diags)
-      Diags->Report(diag::err_pch_langopt_value_mismatch)
-        << "block command names";
-    return true;
-  }
-
   return false;
 }
 
@@ -4448,15 +4440,6 @@ bool ASTReader::ParseLanguageOptions(const RecordData &Record,
   LangOpts.CurrentModule.assign(Record.begin() + Idx, 
                                 Record.begin() + Idx + Length);
 
-  Idx += Length;
-
-  // Comment options.
-  for (unsigned N = Record[Idx++]; N; --N) {
-    LangOpts.CommentOpts.BlockCommandNames.push_back(
-      ReadString(Record, Idx));
-  }
-  LangOpts.CommentOpts.ParseAllComments = Record[Idx++];
-
   return Listener.ReadLanguageOptions(LangOpts, Complain);
 }
 
@@ -7846,9 +7829,13 @@ void ASTReader::ReadComments() {
             (RawComment::CommentKind) Record[Idx++];
         bool IsTrailingComment = Record[Idx++];
         bool IsAlmostTrailingComment = Record[Idx++];
+
+
         Comments.push_back(new (Context) RawComment(
             SR, Kind, IsTrailingComment, IsAlmostTrailingComment,
-            Context.getLangOpts().CommentOpts.ParseAllComments));
+                                                    false));
+            //Context.getLangOpts().CommentOpts.ParseAllComments));
+        // FIXME: DOC
         break;
       }
       }
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp
index 7402961..09d29a3 100644
--- a/lib/Serialization/ASTWriter.cpp
+++ b/lib/Serialization/ASTWriter.cpp
@@ -1117,16 +1117,6 @@ void ASTWriter::WriteControlBlock(Preprocessor &PP, ASTContext &Context,
   Record.push_back(LangOpts.CurrentModule.size());
   Record.append(LangOpts.CurrentModule.begin(), LangOpts.CurrentModule.end());
 
-  // Comment options.
-  Record.push_back(LangOpts.CommentOpts.BlockCommandNames.size());
-  for (CommentOptions::BlockCommandNamesTy::const_iterator
-           I = LangOpts.CommentOpts.BlockCommandNames.begin(),
-           IEnd = LangOpts.CommentOpts.BlockCommandNames.end();
-       I != IEnd; ++I) {
-    AddString(*I, Record);
-  }
-  Record.push_back(LangOpts.CommentOpts.ParseAllComments);
-
   Stream.EmitRecord(LANGUAGE_OPTIONS, Record);
 
   // Target options.
diff --git a/test/CodeCompletion/documentation.cpp b/test/CodeCompletion/documentation.cpp
deleted file mode 100644
index d7dec9a..0000000
--- a/test/CodeCompletion/documentation.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-// Note: the run lines follow their respective tests, since line/column
-// matter in this test.
-
-/// Aaa.
-void T1(float x, float y);
-
-/// Bbb.
-class T2 {
-public:
-  /// Ccc.
-  void T3();
-
-  int T4; ///< Ddd.
-};
-
-/// Eee.
-namespace T5 {
-}
-
-void test() {
-
-  T2 t2;
-  t2.
-}
-
-// RUN: %clang_cc1 -fsyntax-only -code-completion-brief-comments -code-completion-at=%s:21:1 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: COMPLETION: T1 : [#void#]T1(<#float x#>, <#float y#>) : Aaa.
-// CHECK-CC1: COMPLETION: T2 : T2 : Bbb.
-// CHECK-CC1: COMPLETION: T5 : T5:: : Eee.
-
-// RUN: %clang_cc1 -fsyntax-only -code-completion-brief-comments -code-completion-at=%s:23:6 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: COMPLETION: T3 : [#void#]T3() : Ccc.
-// CHECK-CC2: COMPLETION: T4 : [#int#]T4 : Ddd.
diff --git a/test/Index/Inputs/CommentXML/invalid-function-01.xml b/test/Index/Inputs/CommentXML/invalid-function-01.xml
deleted file mode 100644
index 85f0669..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-01.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Parameters>
-</Parameters>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-02.xml b/test/Index/Inputs/CommentXML/invalid-function-02.xml
deleted file mode 100644
index 700711b..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-02.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Parameters>
-  <Parameter>
-  </Parameter>
-</Parameters>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-03.xml b/test/Index/Inputs/CommentXML/invalid-function-03.xml
deleted file mode 100644
index 0c4618f..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-03.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Parameters>
-  <Parameter>
-    <Term></Term>
-    <Definition><Para>Bbb.</Para></Definition>
-  </Parameter>
-</Parameters>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-04.xml b/test/Index/Inputs/CommentXML/invalid-function-04.xml
deleted file mode 100644
index 88dd5a8..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-04.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Parameters>
-  <Parameter>
-    <Term> </Term>
-    <Definition><Para>Bbb.</Para></Definition>
-  </Parameter>
-</Parameters>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-05.xml b/test/Index/Inputs/CommentXML/invalid-function-05.xml
deleted file mode 100644
index ce96b7d..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-05.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Parameters>
-  <Parameter>
-    <Term>x1</Term>
-  </Parameter>
-</Parameters>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-06.xml b/test/Index/Inputs/CommentXML/invalid-function-06.xml
deleted file mode 100644
index 5419c67..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-06.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa <monospaced></monospaced>.</Para></Abstract>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-07.xml b/test/Index/Inputs/CommentXML/invalid-function-07.xml
deleted file mode 100644
index ce7ecce..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-07.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Parameters>
-  <Parameter>
-    <Name>x1</Name>
-    <Index>-1</Index>
-    <Direction isExplicit="0">in</Direction>
-    <Discussion><Para>Bbb</Para></Discussion>
-  </Parameter>
-</Parameters>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-08.xml b/test/Index/Inputs/CommentXML/invalid-function-08.xml
deleted file mode 100644
index 66e69e8..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-08.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Parameters>
-  <Parameter>
-    <Name>x1</Name>
-    <Index>0</Index>
-    <Direction isExplicit="aaa">in</Direction>
-    <Discussion><Para>Bbb</Para></Discussion>
-  </Parameter>
-</Parameters>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-09.xml b/test/Index/Inputs/CommentXML/invalid-function-09.xml
deleted file mode 100644
index 39617b6..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-09.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Parameters>
-  <Parameter>
-    <Name>x1</Name>
-    <Index>0</Index>
-    <Direction isExplicit="0">aaa</Direction>
-    <Discussion><Para>Bbb</Para></Discussion>
-  </Parameter>
-</Parameters>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-10.xml b/test/Index/Inputs/CommentXML/invalid-function-10.xml
deleted file mode 100644
index ccce4bb..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-10.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<TemplateParameters>
-  <Parameter>
-    <Name>x1</Name>
-  </Parameter>
-</TemplateParameters>
-</Function>
-
diff --git a/test/Index/Inputs/CommentXML/invalid-function-11.xml b/test/Index/Inputs/CommentXML/invalid-function-11.xml
deleted file mode 100644
index 167911e..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-11.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<TemplateParameters>
-  <Parameter>
-    <Name>x1</Name>
-    <Index>aaa</Index>
-    <Discussion><Para>Bbb</Para></Discussion>
-  </Parameter>
-</TemplateParameters>
-</Function>
-
diff --git a/test/Index/Inputs/CommentXML/invalid-function-12.xml b/test/Index/Inputs/CommentXML/invalid-function-12.xml
deleted file mode 100644
index f5b5e03..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-12.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function templateKind="aaa">
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Function>
-
diff --git a/test/Index/Inputs/CommentXML/invalid-function-13.xml b/test/Index/Inputs/CommentXML/invalid-function-13.xml
deleted file mode 100644
index 14cd31b..0000000
--- a/test/Index/Inputs/CommentXML/invalid-function-13.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Parameters>
-  <Parameter>
-    <Name>x1</Name>
-    <IsVarArg />
-    <Discussion><Para>Bbb</Para></Discussion>
-  </Parameter>
-</Parameters>
-</Function>
-
diff --git a/test/Index/Inputs/CommentXML/invalid-para-kind-01.xml b/test/Index/Inputs/CommentXML/invalid-para-kind-01.xml
deleted file mode 100644
index 9b82042..0000000
--- a/test/Index/Inputs/CommentXML/invalid-para-kind-01.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Discussion>
-  <Para kind="">Bbb</Para>
-</Discussion>
-</Function>
-
diff --git a/test/Index/Inputs/CommentXML/invalid-para-kind-02.xml b/test/Index/Inputs/CommentXML/invalid-para-kind-02.xml
deleted file mode 100644
index a1a2900..0000000
--- a/test/Index/Inputs/CommentXML/invalid-para-kind-02.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Discussion>
-  <Para kind="zzz">Bbb</Para>
-</Discussion>
-</Function>
-
diff --git a/test/Index/Inputs/CommentXML/valid-availability-attr-01.xml b/test/Index/Inputs/CommentXML/valid-availability-attr-01.xml
deleted file mode 100644
index 20ce012..0000000
--- a/test/Index/Inputs/CommentXML/valid-availability-attr-01.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Availability distribution="OS X">
-  <IntroducedInVersion>8.0</IntroducedInVersion>
-  <DeprecatedInVersion>9.0</DeprecatedInVersion>
-  <RemovedAfterVersion>10.0</RemovedAfterVersion>
-  <DeprecationSummary>use availability_test</DeprecationSummary>
-</Availability>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-availability-attr-02.xml b/test/Index/Inputs/CommentXML/valid-availability-attr-02.xml
deleted file mode 100644
index 589262e..0000000
--- a/test/Index/Inputs/CommentXML/valid-availability-attr-02.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Availability distribution="OS X">
-  <IntroducedInVersion>8.0.1</IntroducedInVersion>
-  <DeprecatedInVersion>9.0.1</DeprecatedInVersion>
-  <RemovedAfterVersion>10.0.1</RemovedAfterVersion>
-  <DeprecationSummary>use availability_test</DeprecationSummary>
-</Availability>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-class-01.xml b/test/Index/Inputs/CommentXML/valid-class-01.xml
deleted file mode 100644
index bd893e6..0000000
--- a/test/Index/Inputs/CommentXML/valid-class-01.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Class>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Class>
diff --git a/test/Index/Inputs/CommentXML/valid-class-02.xml b/test/Index/Inputs/CommentXML/valid-class-02.xml
deleted file mode 100644
index 2e20a92..0000000
--- a/test/Index/Inputs/CommentXML/valid-class-02.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Class templateKind="template">
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Class>
diff --git a/test/Index/Inputs/CommentXML/valid-class-03.xml b/test/Index/Inputs/CommentXML/valid-class-03.xml
deleted file mode 100644
index 2ce1a2c..0000000
--- a/test/Index/Inputs/CommentXML/valid-class-03.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Class templateKind="specialization">
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Class>
diff --git a/test/Index/Inputs/CommentXML/valid-class-04.xml b/test/Index/Inputs/CommentXML/valid-class-04.xml
deleted file mode 100644
index da1522d..0000000
--- a/test/Index/Inputs/CommentXML/valid-class-04.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Class templateKind="partialSpecialization">
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Class>
diff --git a/test/Index/Inputs/CommentXML/valid-deprecated-attr.xml b/test/Index/Inputs/CommentXML/valid-deprecated-attr.xml
deleted file mode 100644
index 194720b..0000000
--- a/test/Index/Inputs/CommentXML/valid-deprecated-attr.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Deprecated>since OS X 10.6</Deprecated>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-enum-01.xml b/test/Index/Inputs/CommentXML/valid-enum-01.xml
deleted file mode 100644
index e346d73..0000000
--- a/test/Index/Inputs/CommentXML/valid-enum-01.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Enum>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Enum>
-
diff --git a/test/Index/Inputs/CommentXML/valid-function-01.xml b/test/Index/Inputs/CommentXML/valid-function-01.xml
deleted file mode 100644
index 02060e7..0000000
--- a/test/Index/Inputs/CommentXML/valid-function-01.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-function-02.xml b/test/Index/Inputs/CommentXML/valid-function-02.xml
deleted file mode 100644
index 98e4fd1..0000000
--- a/test/Index/Inputs/CommentXML/valid-function-02.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract>
-  <Para>Aaa
-    <bold>bbb</bold>
-    <monospaced>ccc</monospaced>
-    <emphasized>ddd</emphasized>
-    <rawHTML><eee></rawHTML>
-    <rawHTML isSafeToPassThrough="0"><fff></rawHTML>
-    <rawHTML isSafeToPassThrough="1"><ggg></rawHTML>.
-  </Para>
-</Abstract>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-function-03.xml b/test/Index/Inputs/CommentXML/valid-function-03.xml
deleted file mode 100644
index 891211d..0000000
--- a/test/Index/Inputs/CommentXML/valid-function-03.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Parameters>
-  <Parameter>
-    <Name>x1</Name>
-    <Direction isExplicit="0">in</Direction>
-    <Discussion><Para>Bbb</Para></Discussion>
-  </Parameter>
-</Parameters>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-function-04.xml b/test/Index/Inputs/CommentXML/valid-function-04.xml
deleted file mode 100644
index b65b3e9..0000000
--- a/test/Index/Inputs/CommentXML/valid-function-04.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Parameters>
-  <Parameter>
-    <Name>x1</Name>
-    <Index>0</Index>
-    <Direction isExplicit="0">in</Direction>
-    <Discussion><Para>Bbb</Para></Discussion>
-  </Parameter>
-</Parameters>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-function-05.xml b/test/Index/Inputs/CommentXML/valid-function-05.xml
deleted file mode 100644
index 2dddbd7..0000000
--- a/test/Index/Inputs/CommentXML/valid-function-05.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Discussion>
-  <Para>Ccc</Para>
-</Discussion>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-function-06.xml b/test/Index/Inputs/CommentXML/valid-function-06.xml
deleted file mode 100644
index 1df3aa4..0000000
--- a/test/Index/Inputs/CommentXML/valid-function-06.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<ResultDiscussion><Para>Ccc.</Para></ResultDiscussion>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-function-07.xml b/test/Index/Inputs/CommentXML/valid-function-07.xml
deleted file mode 100644
index b567e6b..0000000
--- a/test/Index/Inputs/CommentXML/valid-function-07.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Parameters>
-  <Parameter>
-    <Name>x2</Name>
-    <Index>0</Index>
-    <Direction isExplicit="0">in</Direction>
-    <Discussion><Para>Bbb</Para></Discussion>
-  </Parameter>
-  <Parameter>
-    <Name>x3</Name>
-    <Index>2</Index>
-    <Direction isExplicit="1">out</Direction>
-    <Discussion><Para>Ccc</Para></Discussion>
-  </Parameter>
-  <Parameter>
-    <Name>x1</Name>
-    <Direction isExplicit="1">in,out</Direction>
-    <Discussion><Para>Ddd</Para></Discussion>
-  </Parameter>
-  <Parameter>
-    <Name>x4</Name>
-    <IsVarArg />
-    <Direction isExplicit="0">in</Direction>
-    <Discussion><Para>Eee</Para></Discussion>
-  </Parameter>
-</Parameters>
-<Exceptions>
-  <Para>Fff.</Para>
-  <Para>Ggg</Para>
-</Exceptions>
-<ResultDiscussion>
-  <Para>Hhh.</Para>
-  <Para>Iii</Para>
-</ResultDiscussion>
-<Discussion>
-  <Para>Jjj</Para>
-  <Verbatim xml:space="preserve" kind="verbatim">Kkk</Verbatim>
-</Discussion>
-</Function>
-
diff --git a/test/Index/Inputs/CommentXML/valid-function-08.xml b/test/Index/Inputs/CommentXML/valid-function-08.xml
deleted file mode 100644
index 481a6c0..0000000
--- a/test/Index/Inputs/CommentXML/valid-function-08.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<TemplateParameters>
-  <Parameter>
-    <Name>x1</Name>
-    <Index>0</Index>
-    <Discussion><Para>Bbb</Para></Discussion>
-  </Parameter>
-  <Parameter>
-    <Name>x2</Name>
-    <Discussion><Para>Ccc</Para></Discussion>
-  </Parameter>
-</TemplateParameters>
-</Function>
-
diff --git a/test/Index/Inputs/CommentXML/valid-function-09.xml b/test/Index/Inputs/CommentXML/valid-function-09.xml
deleted file mode 100644
index cf4cc8f..0000000
--- a/test/Index/Inputs/CommentXML/valid-function-09.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function templateKind="template">
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Function>
-
diff --git a/test/Index/Inputs/CommentXML/valid-function-10.xml b/test/Index/Inputs/CommentXML/valid-function-10.xml
deleted file mode 100644
index 4fadf30..0000000
--- a/test/Index/Inputs/CommentXML/valid-function-10.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function templateKind="specialization">
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Function>
-
diff --git a/test/Index/Inputs/CommentXML/valid-namespace-01.xml b/test/Index/Inputs/CommentXML/valid-namespace-01.xml
deleted file mode 100644
index a73aad5..0000000
--- a/test/Index/Inputs/CommentXML/valid-namespace-01.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Namespace>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Namespace>
-
diff --git a/test/Index/Inputs/CommentXML/valid-other-01.xml b/test/Index/Inputs/CommentXML/valid-other-01.xml
deleted file mode 100644
index 46b8a46..0000000
--- a/test/Index/Inputs/CommentXML/valid-other-01.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Other>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Other>
diff --git a/test/Index/Inputs/CommentXML/valid-para-kind-01.xml b/test/Index/Inputs/CommentXML/valid-para-kind-01.xml
deleted file mode 100644
index 71fe277..0000000
--- a/test/Index/Inputs/CommentXML/valid-para-kind-01.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Discussion>
-  <Para>Bbb</Para>
-  <Para kind="attention">Bbb</Para>
-  <Para kind="author">Bbb</Para>
-  <Para kind="authors">Bbb</Para>
-  <Para kind="bug">Bbb</Para>
-  <Para kind="copyright">Bbb</Para>
-  <Para kind="date">Bbb</Para>
-  <Para kind="invariant">Bbb</Para>
-  <Para kind="note">Bbb</Para>
-  <Para kind="post">Bbb</Para>
-  <Para kind="pre">Bbb</Para>
-  <Para kind="remark">Bbb</Para>
-  <Para kind="remarks">Bbb</Para>
-  <Para kind="sa">Bbb</Para>
-  <Para kind="see">Bbb</Para>
-  <Para kind="since">Bbb</Para>
-  <Para kind="todo">Bbb</Para>
-  <Para kind="version">Bbb</Para>
-  <Para kind="warning">Bbb</Para>
-</Discussion>
-</Function>
-
diff --git a/test/Index/Inputs/CommentXML/valid-typedef-01.xml b/test/Index/Inputs/CommentXML/valid-typedef-01.xml
deleted file mode 100644
index 1b7da8d..0000000
--- a/test/Index/Inputs/CommentXML/valid-typedef-01.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Typedef>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Typedef>
-
diff --git a/test/Index/Inputs/CommentXML/valid-typedef-02.xml b/test/Index/Inputs/CommentXML/valid-typedef-02.xml
deleted file mode 100644
index 2a32189..0000000
--- a/test/Index/Inputs/CommentXML/valid-typedef-02.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Typedef>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<TemplateParameters>
-  <Parameter>
-    <Name>x1</Name>
-    <Index>0</Index>
-    <Discussion><Para>Bbb</Para></Discussion>
-  </Parameter>
-</TemplateParameters>
-<Parameters>
-  <Parameter>
-    <Name>x1</Name>
-    <Index>0</Index>
-    <Direction isExplicit="0">in</Direction>
-    <Discussion><Para>Ccc</Para></Discussion>
-  </Parameter>
-</Parameters>
-<ResultDiscussion><Para>Ddd.</Para></ResultDiscussion>
-<Discussion>
-  <Para>Eee.</Para>
-</Discussion>
-</Typedef>
-
diff --git a/test/Index/Inputs/CommentXML/valid-unavailable-attr.xml b/test/Index/Inputs/CommentXML/valid-unavailable-attr.xml
deleted file mode 100644
index 5811c34..0000000
--- a/test/Index/Inputs/CommentXML/valid-unavailable-attr.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Function>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-<Deprecated>Since iOS 4.0</Deprecated>
-<Unavailable/>
-</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-variable-01.xml b/test/Index/Inputs/CommentXML/valid-variable-01.xml
deleted file mode 100644
index e17da91..0000000
--- a/test/Index/Inputs/CommentXML/valid-variable-01.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Variable>
-<Name>aaa</Name>
-<Abstract><Para>Aaa.</Para></Abstract>
-</Variable>
-
diff --git a/test/Index/Inputs/Frameworks/DocCommentsA.framework/Headers/DocCommentsA.h b/test/Index/Inputs/Frameworks/DocCommentsA.framework/Headers/DocCommentsA.h
deleted file mode 100644
index d548f81..0000000
--- a/test/Index/Inputs/Frameworks/DocCommentsA.framework/Headers/DocCommentsA.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/// Comment for 'functionFromDocCommentsA1'.
-void functionFromDocCommentsA1(void);
-
-#import <DocCommentsC/DocCommentsC.h>
-
-/// Comment for 'functionFromDocCommentsA2'.
-void functionFromDocCommentsA2(void);
-
diff --git a/test/Index/Inputs/Frameworks/DocCommentsB.framework/Headers/DocCommentsB.h b/test/Index/Inputs/Frameworks/DocCommentsB.framework/Headers/DocCommentsB.h
deleted file mode 100644
index af279e3..0000000
--- a/test/Index/Inputs/Frameworks/DocCommentsB.framework/Headers/DocCommentsB.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/// Comment for 'functionFromDocCommentsB1'.
-void functionFromDocCommentsB1(void);
-
-#import <DocCommentsC/DocCommentsC.h>
-
-/// Comment for 'functionFromDocCommentsB2'.
-void functionFromDocCommentsB2(void);
diff --git a/test/Index/Inputs/Frameworks/DocCommentsC.framework/Headers/DocCommentsC.h b/test/Index/Inputs/Frameworks/DocCommentsC.framework/Headers/DocCommentsC.h
deleted file mode 100644
index db696a3..0000000
--- a/test/Index/Inputs/Frameworks/DocCommentsC.framework/Headers/DocCommentsC.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/// Comment for 'functionFromDocCommentsC'.
-void functionFromDocCommentsC(void);
diff --git a/test/Index/annotate-comments-availability-attrs.cpp b/test/Index/annotate-comments-availability-attrs.cpp
deleted file mode 100644
index 74a57b9..0000000
--- a/test/Index/annotate-comments-availability-attrs.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// rdar://12378879
-
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out
-// RUN: FileCheck %s < %t/out
-
-// Ensure that XML we generate is not invalid.
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out
-// WRONG-NOT: CommentXMLInvalid
-
-/// Aaa.
-void attr_availability_1() __attribute__((availability(macosx,obsoleted=10.0,introduced=8.0,deprecated=9.0, message="use availability_test in <foo.h>")))
-                           __attribute__((availability(ios,unavailable, message="not for iOS")));
-
-// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments-availability-attrs.cpp" line="[[@LINE-3]]" column="6"><Name>attr_availability_1</Name><USR>c:@F at attr_availability_1#</USR><Declaration>void attr_availability_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Availability distribution="iOS"><DeprecationSummary>not for iOS</DeprecationSummary><Unavailable/></Availability><Availability distribution="OS X"><IntroducedInVersion>8.0</IntroducedInVersion><DeprecatedInVersion>9.0</DeprecatedInVersion><RemovedAfterVersion>10.0</RemovedAfterVersion><DeprecationSummary>use availability_test in <foo.h></DeprecationSummary></Availability></Function>]
-
-/// Aaa.
-void attr_availability_2() __attribute__((availability(macosx,obsoleted=10.0.1,introduced=8.0.1,deprecated=9.0.1)));
-
-// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments-availability-attrs.cpp" line="[[@LINE-2]]" column="6"><Name>attr_availability_2</Name><USR>c:@F at attr_availability_2#</USR><Declaration>void attr_availability_2()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Availability distribution="OS X"><IntroducedInVersion>8.0.1</IntroducedInVersion><DeprecatedInVersion>9.0.1</DeprecatedInVersion><RemovedAfterVersion>10.0.1</RemovedAfterVersion></Availability></Function>]
-
-/// Aaa.
-void attr_deprecated_1() __attribute__((deprecated));
-
-// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments-availability-attrs.cpp" line="[[@LINE-2]]" column="6"><Name>attr_deprecated_1</Name><USR>c:@F at attr_deprecated_1#</USR><Declaration>void attr_deprecated_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Deprecated/></Function>]
-
-/// Aaa.
-void attr_deprecated_2() __attribute__((deprecated("message 1 <foo.h>")));
-
-// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments-availability-attrs.cpp" line="[[@LINE-2]]" column="6"><Name>attr_deprecated_2</Name><USR>c:@F at attr_deprecated_2#</USR><Declaration>void attr_deprecated_2()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Deprecated>message 1 <foo.h></Deprecated></Function>]
-
-
-/// Aaa.
-void attr_unavailable_1() __attribute__((unavailable));
-
-// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments-availability-attrs.cpp" line="[[@LINE-2]]" column="6"><Name>attr_unavailable_1</Name><USR>c:@F at attr_unavailable_1#</USR><Declaration>void attr_unavailable_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Unavailable/></Function>]
-
-/// Aaa.
-void attr_unavailable_2() __attribute__((unavailable("message 2 <foo.h>")));
-
-// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments-availability-attrs.cpp" line="[[@LINE-2]]" column="6"><Name>attr_unavailable_2</Name><USR>c:@F at attr_unavailable_2#</USR><Declaration>void attr_unavailable_2()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Unavailable>message 2 <foo.h></Unavailable></Function>]
-
diff --git a/test/Index/annotate-comments-objc.m b/test/Index/annotate-comments-objc.m
deleted file mode 100644
index a8eaa0b..0000000
--- a/test/Index/annotate-comments-objc.m
+++ /dev/null
@@ -1,124 +0,0 @@
-// Run lines are sensitive to line numbers and come below the code.
-
-#ifndef HEADER
-#define HEADER
-
-/// Comment for 'functionBeforeImports'.
-void functionBeforeImports(void);
-
-#import <DocCommentsA/DocCommentsA.h>
-#import <DocCommentsB/DocCommentsB.h>
-
- at class NSString;
-
-//===---
-// rdar://14258334
-// Check that we attach comments to properties correctly.
-//===---
-
- at interface MyClass {
-}
-
-/// property1_isdoxy1 IS_DOXYGEN_SINGLE
- at property (nonatomic, copy, readwrite) NSString *property1_isdoxy1;
- at property (nonatomic, copy, readwrite) NSString *property1_isdoxy2; ///< property1_isdoxy2 IS_DOXYGEN_SINGLE
- at property (nonatomic, copy, readwrite) NSString *property1_isdoxy3; /**< property1_isdoxy3 IS_DOXYGEN_SINGLE */
- at property (nonatomic, copy, readwrite) NSString *property1_isdoxy4; /*!< property1_isdoxy4 IS_DOXYGEN_SINGLE */
-
-/// method1_isdoxy1 IS_DOXYGEN_SINGLE
-- (void)method1_isdoxy1;
-- (void)method1_isdoxy2; ///< method1_isdoxy2 IS_DOXYGEN_SINGLE
-- (void)method1_isdoxy3; /**< method1_isdoxy3 IS_DOXYGEN_SINGLE */
-- (void)method1_isdoxy4; /*!< method1_isdoxy4 IS_DOXYGEN_SINGLE */
- at end
-
-//===---
-// rdar://14348912
-// Check that we attach comments to enums declared using the NS_ENUM macro.
-//===---
-
-#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
-
-/// An_NS_ENUM_isdoxy1 IS_DOXYGEN_SINGLE
-typedef NS_ENUM(int, An_NS_ENUM_isdoxy1) { Red, Green, Blue };
-
-// In the implementation of attaching comments to enums declared using the
-// NS_ENUM macro, it is tempting to use the fact that enum decl is embedded in
-// the typedef.  Make sure that the heuristic is strong enough that it does not
-// attach unrelated comments in the following cases where tag decls are
-// embedded in declarators.
-
-#define DECLARE_FUNCTION() \
-    void functionFromMacro() { \
-      typedef struct Struct_notdoxy Struct_notdoxy; \
-    }
-
-/// IS_DOXYGEN_NOT_ATTACHED
-DECLARE_FUNCTION()
-
-/// typedef_isdoxy1 IS_DOXYGEN_SINGLE
-typedef struct Struct_notdoxy *typedef_isdoxy1;
-
-#endif
-
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: mkdir %t/module-cache
-
-// Check that we serialize comment source locations properly.
-// RUN: %clang_cc1 -emit-pch -o %t/out.pch -F %S/Inputs/Frameworks %s
-// RUN: %clang_cc1 -include-pch %t/out.pch -F %S/Inputs/Frameworks -fsyntax-only %s
-
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -F %S/Inputs/Frameworks > %t/out.c-index-direct
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -F %S/Inputs/Frameworks -fmodules -fmodules-cache-path=%t/module-cache > %t/out.c-index-modules
-// RUN: c-index-test -test-load-tu %t/out.pch all -F %S/Inputs/Frameworks > %t/out.c-index-pch
-
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-modules
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-pch
-
-// Declarations without Doxygen comments should not pick up some Doxygen comments.
-// WRONG-NOT: notdoxy{{.*}}Comment=
-// WRONG-NOT: test{{.*}}Comment=
-
-// Non-Doxygen comments should not be attached to anything.
-// WRONG-NOT: NOT_DOXYGEN
-
-// Some Doxygen comments are not attached to anything.
-// WRONG-NOT: IS_DOXYGEN_NOT_ATTACHED
-
-// Ensure we don't pick up extra comments.
-// WRONG-NOT: IS_DOXYGEN_START{{.*}}IS_DOXYGEN_START{{.*}}BriefComment=
-// WRONG-NOT: IS_DOXYGEN_END{{.*}}IS_DOXYGEN_END{{.*}}BriefComment=
-//
-// Ensure that XML is not invalid
-// WRONG-NOT: CommentXMLInvalid
-
-// RUN: FileCheck %s < %t/out.c-index-direct
-// RUN: FileCheck %s < %t/out.c-index-modules
-// RUN: FileCheck %s < %t/out.c-index-pch
-
-// These CHECK lines are not located near the code on purpose.  This test
-// checks that documentation comments are attached to declarations correctly.
-// Adding a non-documentation comment with CHECK line between every two
-// documentation comments will only test a single code path.
-//
-// CHECK-DAG: annotate-comments-objc.m:7:6: FunctionDecl=functionBeforeImports:{{.*}} BriefComment=[Comment for 'functionBeforeImports'.]
-// CHECK-DAG: DocCommentsA.h:2:6: FunctionDecl=functionFromDocCommentsA1:{{.*}} BriefComment=[Comment for 'functionFromDocCommentsA1'.]
-// CHECK-DAG: DocCommentsA.h:7:6: FunctionDecl=functionFromDocCommentsA2:{{.*}} BriefComment=[Comment for 'functionFromDocCommentsA2'.]
-// CHECK-DAG: DocCommentsB.h:2:6: FunctionDecl=functionFromDocCommentsB1:{{.*}} BriefComment=[Comment for 'functionFromDocCommentsB1'.]
-// CHECK-DAG: DocCommentsB.h:7:6: FunctionDecl=functionFromDocCommentsB2:{{.*}} BriefComment=[Comment for 'functionFromDocCommentsB2'.]
-// CHECK-DAG: DocCommentsC.h:2:6: FunctionDecl=functionFromDocCommentsC:{{.*}} BriefComment=[Comment for 'functionFromDocCommentsC'.]
-// CHECK: annotate-comments-objc.m:23:50: ObjCPropertyDecl=property1_isdoxy1:{{.*}} property1_isdoxy1 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:24:50: ObjCPropertyDecl=property1_isdoxy2:{{.*}} property1_isdoxy2 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:25:50: ObjCPropertyDecl=property1_isdoxy3:{{.*}} property1_isdoxy3 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:26:50: ObjCPropertyDecl=property1_isdoxy4:{{.*}} property1_isdoxy4 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:29:9: ObjCInstanceMethodDecl=method1_isdoxy1:{{.*}} method1_isdoxy1 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:30:9: ObjCInstanceMethodDecl=method1_isdoxy2:{{.*}} method1_isdoxy2 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:31:9: ObjCInstanceMethodDecl=method1_isdoxy3:{{.*}} method1_isdoxy3 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:32:9: ObjCInstanceMethodDecl=method1_isdoxy4:{{.*}} method1_isdoxy4 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:43:22: EnumDecl=An_NS_ENUM_isdoxy1:{{.*}} An_NS_ENUM_isdoxy1 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:43:22: TypedefDecl=An_NS_ENUM_isdoxy1:{{.*}} An_NS_ENUM_isdoxy1 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:43:22: EnumDecl=An_NS_ENUM_isdoxy1:{{.*}} An_NS_ENUM_isdoxy1 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:60:32: TypedefDecl=typedef_isdoxy1:{{.*}} typedef_isdoxy1 IS_DOXYGEN_SINGLE
-
diff --git a/test/Index/annotate-comments-preprocessor.c b/test/Index/annotate-comments-preprocessor.c
deleted file mode 100644
index 202847f..0000000
--- a/test/Index/annotate-comments-preprocessor.c
+++ /dev/null
@@ -1,45 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -I%S/Inputs %s
-
-// As long as none of this crashes, we don't care about comments in
-// preprocessor directives.
-
-#include "annotate-comments-preprocessor.h" /* Aaa. */ /* Bbb. */
-#include "annotate-comments-preprocessor.h" /* Aaa. */
-#include "annotate-comments-preprocessor.h" /** Aaa. */
-#include "annotate-comments-preprocessor.h" /**< Aaa. */
-#include "annotate-comments-preprocessor.h" // Aaa.
-#include "annotate-comments-preprocessor.h" /// Aaa.
-#include "annotate-comments-preprocessor.h" ///< Aaa.
-
-#define A0 0
-#define A1 1 /* Aaa. */
-#define A2 1 /** Aaa. */
-#define A3 1 /**< Aaa. */
-#define A4 1 // Aaa.
-#define A5 1 /// Aaa.
-#define A6 1 ///< Aaa.
-
-int A[] = { A0, A1, A2, A3, A4, A5, A6 };
-
-#if A0 /** Aaa. */
-int f(int a1[A1], int a2[A2], int a3[A3], int a4[A4], int a5[A5], int a6[A6]);
-#endif /** Aaa. */
-
-#if A1 /** Aaa. */
-int g(int a1[A1], int a2[A2], int a3[A3], int a4[A4], int a5[A5], int a6[A6]);
-#endif /* Aaa. */
-
-#pragma once /** Aaa. */
-
-#define FOO      \
-  do {           \
-    /* Aaa. */   \
-    /** Aaa. */  \
-    /**< Aaa. */ \
-    ;            \
-  } while(0)
-
-void h(void) {
-  FOO;
-}
-
diff --git a/test/Index/annotate-comments-property-accessor.m b/test/Index/annotate-comments-property-accessor.m
deleted file mode 100644
index 2bd1d01..0000000
--- a/test/Index/annotate-comments-property-accessor.m
+++ /dev/null
@@ -1,62 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out
-// RUN: FileCheck %s < %t/out
-// rdar://12378879
-
-// Ensure that XML we generate is not invalid.
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out
-// WRONG-NOT: CommentXMLInvalid
-
- at interface AppDelegate
-/**
-  \brief This is ReadonlyProperty
-*/
- at property (readonly, getter = ReadonlyGetter) int MyProperty;
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-1]]" column="51"><Name>MyProperty</Name><USR>c:objc(cs)AppDelegate(py)MyProperty</USR><Declaration>- (int)ReadonlyGetter;</Declaration><Abstract><Para> This is ReadonlyProperty</Para></Abstract></Function>]
-
-/**
-  \brief This is GeneralProperty
-*/
- at property int GeneralProperty;
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-1]]" column="15"><Name>GeneralProperty</Name><USR>c:objc(cs)AppDelegate(py)GeneralProperty</USR><Declaration>- (int)GeneralProperty;</Declaration><Abstract><Para> This is GeneralProperty</Para></Abstract></Function>]
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-2]]" column="15"><Name>GeneralProperty</Name><USR>c:objc(cs)AppDelegate(py)GeneralProperty</USR><Declaration>- (void)setGeneralProperty:(int)GeneralProperty;</Declaration><Abstract><Para> This is GeneralProperty</Para></Abstract></Function>]
-
-/**
-  \brief This is PropertyInPrimaryClass
-*/
- at property (copy, nonatomic) id PropertyInPrimaryClass;
-- (void) setThisRecord : (id)arg;
-- (id) Record;
- at end
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-4]]" column="32"><Name>PropertyInPrimaryClass</Name><USR>c:objc(cs)AppDelegate(py)PropertyInPrimaryClass</USR><Declaration>- (id)PropertyInPrimaryClass;</Declaration><Abstract><Para> This is PropertyInPrimaryClass</Para></Abstract></Function>]
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-5]]" column="32"><Name>PropertyInPrimaryClass</Name><USR>c:objc(cs)AppDelegate(py)PropertyInPrimaryClass</USR><Declaration>- (void)setPropertyInPrimaryClass:(id)PropertyInPrimaryClass;</Declaration><Abstract><Para> This is PropertyInPrimaryClass</Para></Abstract></Function>]
-
- at interface AppDelegate()
-- (id) GetterInClassExtension;
-/**
-  \brief This is Record
-*/
- at property (copy, setter = setThisRecord:) id Record;
- at end
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-6]]" column="1"><Name>PropertyInClassExtension</Name><USR>c:objc(cs)AppDelegate(py)PropertyInClassExtension</USR><Declaration>- (id)GetterInClassExtension;</Declaration><Abstract><Para> This is PropertyInClassExtension</Para></Abstract></Function>]
-
- at interface AppDelegate()
-/**
-  \brief This is PropertyInClassExtension
-*/
- at property (copy, getter = GetterInClassExtension) id PropertyInClassExtension;
-
-- (id) PropertyInPrimaryClass;
- at end
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-4]]" column="54"><Name>PropertyInClassExtension</Name><USR>c:objc(cs)AppDelegate(py)PropertyInClassExtension</USR><Declaration>- (id)GetterInClassExtension;</Declaration><Abstract><Para> This is PropertyInClassExtension</Para></Abstract></Function>]
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-5]]" column="54"><Name>PropertyInClassExtension</Name><USR>c:objc(cs)AppDelegate(py)PropertyInClassExtension</USR><Declaration>- (void)setPropertyInClassExtension:(id)PropertyInClassExtension;</Declaration><Abstract><Para> This is PropertyInClassExtension</Para></Abstract></Function>]
-  
- at implementation AppDelegate
-- (id) PropertyInPrimaryClass { return 0; }
- at end
-
-
-
-
-
diff --git a/test/Index/annotate-comments-typedef.m b/test/Index/annotate-comments-typedef.m
deleted file mode 100644
index 751cfaa..0000000
--- a/test/Index/annotate-comments-typedef.m
+++ /dev/null
@@ -1,49 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out
-// RUN: FileCheck %s < %t/out
-// rdar://13067629
-
-// Ensure that XML we generate is not invalid.
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out
-// WRONG-NOT: CommentXMLInvalid
-
-/** Documentation for NSUInteger */
-typedef unsigned int NSUInteger;
-
-/** Documentation for MyEnum */
-typedef enum : NSUInteger {
-        MyEnumFoo, /**< value Foo */
-        MyEnumBar, /**< value Bar */
-        MyEnumBaz, /**< value Baz */
-} MyEnum;
-// CHECK: TypedefDecl=MyEnum:[[@LINE-1]]:3 (Definition) FullCommentAsHTML=[<p class="para-brief"> Documentation for MyEnum </p>] FullCommentAsXML=[<Typedef file="{{[^"]+}}annotate-comments-typedef.m" line="[[@LINE-1]]" column="3"><Name><anonymous></Name><USR>c:@EA at MyEnum</USR><Declaration>typedef enum MyEnum MyEnum</Declaration><Abstract><Para> Documentation for MyEnum </Para></Abstract></Typedef>]
-
-
-/** Documentation for E */
-enum E {
-        E_MyEnumFoo, /**< value Foo */
-        E_MyEnumBar, /**< value Bar */
-        E_MyEnumBaz, /**< value Baz */
-};
-typedef enum E E_T;
-// CHECK: EnumDecl=E:[[@LINE-6]]:6 (Definition) {{.*}} BriefComment=[Documentation for E] FullCommentAsHTML=[<p class="para-brief"> Documentation for E </p>] FullCommentAsXML=[<Enum file="{{[^"]+}}annotate-comments-typedef.m" line="[[@LINE-6]]" column="6"><Name>E</Name><USR>c:@E at E</USR><Declaration>enum E{{( : int)?}} {}</Declaration><Abstract><Para> Documentation for E </Para></Abstract></Enum>]
-// CHECK: TypedefDecl=E_T:[[@LINE-2]]:16 (Definition) FullCommentAsHTML=[<p class="para-brief"> Documentation for E </p>] FullCommentAsXML=[<Typedef file="{{[^"]+}}annotate-comments-typedef.m" line="[[@LINE-2]]" column="16"><Name>E</Name><USR>c:@E at E</USR><Declaration>typedef enum E E_T</Declaration><Abstract><Para> Documentation for E </Para></Abstract></Typedef>]
-
-
-/** Comment about Foo */
-typedef struct {
-         int iii;
-        } Foo;
-// CHECK: TypedefDecl=Foo:[[@LINE-1]]:11 (Definition) FullCommentAsHTML=[<p class="para-brief"> Comment about Foo </p>] FullCommentAsXML=[<Typedef file="{{[^"]+}}annotate-comments-typedef.m" line="[[@LINE-1]]" column="11"><Name><anonymous></Name><USR>c:@SA at Foo</USR><Declaration>typedef struct Foo Foo</Declaration><Abstract><Para> Comment about Foo </Para></Abstract></Typedef>]
-// CHECK: StructDecl=:[[@LINE-4]]:9 (Definition) {{.*}} BriefComment=[Comment about Foo] FullCommentAsHTML=[<p class="para-brief"> Comment about Foo </p>] FullCommentAsXML=[<Class file="{{[^"]+}}annotate-comments-typedef.m" line="[[@LINE-4]]" column="9"><Name><anonymous></Name><USR>c:@SA at Foo</USR><Declaration>struct {}</Declaration><Abstract><Para> Comment about Foo </Para></Abstract></Class>]
-
-
-struct Foo1 {
-  int iii;
-};
-/** About Foo1T */
-typedef struct Foo1 Foo1T;
-// FIXME: we don't attach this comment to 'struct Foo1'
-// CHECK: TypedefDecl=Foo1T:[[@LINE-2]]:21 (Definition) {{.*}} FullCommentAsHTML=[<p class="para-brief"> About Foo1T </p>] FullCommentAsXML=[<Typedef file="{{[^"]+}}annotate-comments-typedef.m" line="[[@LINE-2]]" column="21"><Name>Foo1T</Name><USR>c:annotate-comments-typedef.m at T@Foo1T</USR><Declaration>typedef struct Foo1 Foo1T</Declaration><Abstract><Para> About Foo1T </Para></Abstract></Typedef>]
-
diff --git a/test/Index/annotate-comments-unterminated.c b/test/Index/annotate-comments-unterminated.c
deleted file mode 100644
index 305cf23..0000000
--- a/test/Index/annotate-comments-unterminated.c
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: c-index-test -test-load-source all %s | FileCheck %s
-// RUN: not %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-ERR %s
-
-// CHECK: annotate-comments-unterminated.c:9:5: VarDecl=x:{{.*}} RawComment=[/** Aaa. */]{{.*}} BriefComment=[Aaa.]
-// CHECK: annotate-comments-unterminated.c:11:5: VarDecl=y:{{.*}} RawComment=[/**< Bbb. */]{{.*}} BriefComment=[Bbb.]
-// CHECK-ERR: error: unterminated
-
-/** Aaa. */
-int x;
-
-int y; /**< Bbb. */
-/**< Ccc.
- * Ddd.
diff --git a/test/Index/annotate-comments.cpp b/test/Index/annotate-comments.cpp
deleted file mode 100644
index 6612a44..0000000
--- a/test/Index/annotate-comments.cpp
+++ /dev/null
@@ -1,338 +0,0 @@
-// Run lines are sensitive to line numbers and come below the code.
-
-#ifndef HEADER
-#define HEADER
-
-// Not a Doxygen comment.  NOT_DOXYGEN
-void notdoxy1(void);
-
-/* Not a Doxygen comment.  NOT_DOXYGEN */
-void notdoxy2(void);
-
-/*/ Not a Doxygen comment.  NOT_DOXYGEN */
-void notdoxy3(void);
-
-/** Doxygen comment.  isdoxy4 IS_DOXYGEN_SINGLE */
-void isdoxy4(void);
-
-/**
- * Doxygen comment.  isdoxy5 IS_DOXYGEN_SINGLE */
-void isdoxy5(void);
-
-/**
- * Doxygen comment.
- * isdoxy6 IS_DOXYGEN_SINGLE */
-void isdoxy6(void);
-
-/**
- * Doxygen comment.
- * isdoxy7 IS_DOXYGEN_SINGLE
- */
-void isdoxy7(void);
-
-/*! Doxygen comment.  isdoxy8 IS_DOXYGEN_SINGLE */
-void isdoxy8(void);
-
-/// Doxygen comment.  isdoxy9 IS_DOXYGEN_SINGLE
-void isdoxy9(void);
-
-// Not a Doxygen comment.  NOT_DOXYGEN
-/// Doxygen comment.  isdoxy10 IS_DOXYGEN_SINGLE
-void isdoxy10(void);
-
-/// Doxygen comment.  isdoxy11 IS_DOXYGEN_SINGLE
-// Not a Doxygen comment.  NOT_DOXYGEN
-void isdoxy11(void);
-
-/** Doxygen comment.  isdoxy12  IS_DOXYGEN_SINGLE */
-/* Not a Doxygen comment.  NOT_DOXYGEN */
-void isdoxy12(void);
-
-/// Doxygen comment.  isdoxy13 IS_DOXYGEN_START
-/// Doxygen comment.  IS_DOXYGEN_END
-void isdoxy13(void);
-
-/// Doxygen comment.  isdoxy14 IS_DOXYGEN_START
-/// Blah-blah-blah.
-/// Doxygen comment.  IS_DOXYGEN_END
-void isdoxy14(void);
-
-/// Doxygen comment.  isdoxy15 IS_DOXYGEN_START
-/** Blah-blah-blah */
-/// Doxygen comment.  IS_DOXYGEN_END
-void isdoxy15(void);
-
-/** Blah-blah-blah. isdoxy16 IS_DOXYGEN_START *//** Blah */
-/// Doxygen comment.  IS_DOXYGEN_END
-void isdoxy16(void);
-
-/// NOT_DOXYGEN
-// NOT_DOXYGEN
-/// isdoxy17 IS_DOXYGEN_START IS_DOXYGEN_END
-void isdoxy17(void);
-
-unsigned
-// NOT_DOXYGEN
-/// NOT_DOXYGEN
-// NOT_DOXYGEN
-/// isdoxy18 IS_DOXYGEN_START IS_DOXYGEN_END
-// NOT_DOXYGEN
-int isdoxy18(void);
-
-//! It all starts here. isdoxy19 IS_DOXYGEN_START
-/*! It's a little odd to continue line this,
- *
- * but we need more multi-line comments. */
-/// This comment comes before my other comments
-/** This is a block comment that is associated with the function f. It
- *  runs for three lines.  IS_DOXYGEN_END
- */
-void isdoxy19(int, int);
-
-// NOT IN THE COMMENT  NOT_DOXYGEN
-/// This is a BCPL comment.  isdoxy20 IS_DOXYGEN_START
-/// It has only two lines.
-/** But there are other blocks that are part of the comment, too.  IS_DOXYGEN_END */
-void isdoxy20(int);
-
-void notdoxy21(int); ///< This is a member comment.  isdoxy21 IS_DOXYGEN_NOT_ATTACHED
-
-void notdoxy22(int); /*!< This is a member comment.  isdoxy22 IS_DOXYGEN_NOT_ATTACHED */
-
-void notdoxy23(int); /**< This is a member comment.  isdoxy23 IS_DOXYGEN_NOT_ATTACHED */
-
-void notdoxy24(int); // NOT_DOXYGEN
-
-/// IS_DOXYGEN_SINGLE
-struct isdoxy25 {
-};
-
-struct test26 {
-  /// IS_DOXYGEN_SINGLE
-  int isdoxy26;
-};
-
-struct test27 {
-  int isdoxy27; ///< IS_DOXYGEN_SINGLE
-};
-
-struct notdoxy28 {
-}; ///< IS_DOXYGEN_NOT_ATTACHED
-
-/// IS_DOXYGEN_SINGLE
-enum isdoxy29 {
-};
-
-enum notdoxy30 {
-}; ///< IS_DOXYGEN_NOT_ATTACHED
-
-/// IS_DOXYGEN_SINGLE
-namespace isdoxy31 {
-};
-
-namespace notdoxy32 {
-}; ///< IS_DOXYGEN_NOT_ATTACHED
-
-class test33 {
-                ///< IS_DOXYGEN_NOT_ATTACHED
-  int isdoxy33; ///< isdoxy33 IS_DOXYGEN_SINGLE
-  int isdoxy34; ///< isdoxy34 IS_DOXYGEN_SINGLE
-
-                ///< IS_DOXYGEN_NOT_ATTACHED
-  int isdoxy35, ///< isdoxy35 IS_DOXYGEN_SINGLE
-      isdoxy36; ///< isdoxy36 IS_DOXYGEN_SINGLE
-
-                ///< IS_DOXYGEN_NOT_ATTACHED
-  int isdoxy37  ///< isdoxy37 IS_DOXYGEN_SINGLE
-    , isdoxy38  ///< isdoxy38 IS_DOXYGEN_SINGLE
-    , isdoxy39; ///< isdoxy39 IS_DOXYGEN_SINGLE
-};
-
-// Verified that Doxygen attaches these.
-
-/// isdoxy40 IS_DOXYGEN_SINGLE
-// NOT_DOXYGEN
-void isdoxy40(int);
-
-unsigned
-/// isdoxy41 IS_DOXYGEN_SINGLE
-// NOT_DOXYGEN
-int isdoxy41(int);
-
-class test42 {
-  int isdoxy42; /* NOT_DOXYGEN */ ///< isdoxy42 IS_DOXYGEN_SINGLE
-};
-
-/// IS_DOXYGEN_START
-/// It is fine to have a command at the end of comment.
-///\brief
-///
-/// Some malformed command.
-/** \*/
-/**
- * \brief Aaa aaaaaaa aaaa.
- * IS_DOXYGEN_END
- */
-void isdoxy43(void);
-
-/// IS_DOXYGEN_START Aaa bbb
-/// ccc.
-///
-/// Ddd eee.
-/// Fff.
-///
-/// Ggg. IS_DOXYGEN_END
-void isdoxy44(void);
-
-/// IS_DOXYGEN_START Aaa bbb
-/// ccc.
-///
-/// \brief
-/// Ddd eee.
-/// Fff.
-///
-/// Ggg. IS_DOXYGEN_END
-void isdoxy45(void);
-
-/// IS_DOXYGEN_START Aaa bbb
-/// ccc.
-///
-/// \short
-/// Ddd eee.
-/// Fff.
-///
-/// Ggg. IS_DOXYGEN_END
-void isdoxy46(void);
-
-/// IS_DOXYGEN_NOT_ATTACHED
-#define FOO
-void notdoxy47(void);
-
-/// IS_DOXYGEN_START Aaa bbb
-/// \param ccc
-/// \returns ddd IS_DOXYGEN_END
-void isdoxy48(int);
-
-/// \brief IS_DOXYGEN_START Aaa
-/// \returns bbb IS_DOXYGEN_END
-void isdoxy49(void);
-
-/// \param ccc IS_DOXYGEN_START
-/// \returns ddd IS_DOXYGEN_END
-void isdoxy50(int);
-
-// One of the following lines has trailing whitespace.  It is intended, don't
-// fix it.
-/**
- * Aaa. IS_DOXYGEN_START
- * 
- * Bbb. IS_DOXYGEN_END
- */
-void isdoxy51(int);
-
-// One of the following lines has trailing whitespace.  It is intended, don't
-// fix it.
-/**
- * Aaa. IS_DOXYGEN_START
- * Bbb.
- *  
- * Ccc. IS_DOXYGEN_END
- */
-void isdoxy52(int);
-
-/**
- * \fn isdoxy53
- *
- * Aaa. IS_DOXYGEN_START IS_DOXYGEN_END
- */
-void isdoxy53(int);
-
-#define MYMAC(x,y)
-/**
- * Aaa. IS_DOXYGEN_START IS_DOXYGEN_END
- */
-MYMAC(0,0)
-void isdoxy54(int);
-
-#endif
-
-// RUN: rm -rf %t
-// RUN: mkdir %t
-
-// Check that we serialize comment source locations properly.
-// RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t/out.pch %s
-// RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t/out.pch -fsyntax-only %s
-
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 > %t/out.c-index-direct
-// RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch
-
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-pch
-
-// Declarations without Doxygen comments should not pick up some Doxygen comments.
-// WRONG-NOT: notdoxy{{.*}}Comment=
-// WRONG-NOT: test{{.*}}Comment=
-
-// Non-Doxygen comments should not be attached to anything.
-// WRONG-NOT: NOT_DOXYGEN
-
-// Some Doxygen comments are not attached to anything.
-// WRONG-NOT: IS_DOXYGEN_NOT_ATTACHED
-
-// Ensure we don't pick up extra comments.
-// WRONG-NOT: IS_DOXYGEN_START{{.*}}IS_DOXYGEN_START{{.*}}BriefComment=
-// WRONG-NOT: IS_DOXYGEN_END{{.*}}IS_DOXYGEN_END{{.*}}BriefComment=
-//
-// Ensure that XML is not invalid
-// WRONG-NOT: CommentXMLInvalid
-
-// RUN: FileCheck %s < %t/out.c-index-direct
-// RUN: FileCheck %s < %t/out.c-index-pch
-
-// These CHECK lines are not located near the code on purpose.  This test
-// checks that documentation comments are attached to declarations correctly.
-// Adding a non-documentation comment with CHECK line between every two
-// documentation comments will only test a single code path.
-//
-// CHECK: annotate-comments.cpp:16:6: FunctionDecl=isdoxy4:{{.*}} isdoxy4 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:20:6: FunctionDecl=isdoxy5:{{.*}} isdoxy5 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:25:6: FunctionDecl=isdoxy6:{{.*}} isdoxy6 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:31:6: FunctionDecl=isdoxy7:{{.*}} isdoxy7 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:34:6: FunctionDecl=isdoxy8:{{.*}} isdoxy8 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:37:6: FunctionDecl=isdoxy9:{{.*}} isdoxy9 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:41:6: FunctionDecl=isdoxy10:{{.*}} isdoxy10 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:53:6: FunctionDecl=isdoxy13:{{.*}} isdoxy13 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
-// CHECK: annotate-comments.cpp:58:6: FunctionDecl=isdoxy14:{{.*}} isdoxy14 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
-// CHECK: annotate-comments.cpp:63:6: FunctionDecl=isdoxy15:{{.*}} isdoxy15 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
-// CHECK: annotate-comments.cpp:67:6: FunctionDecl=isdoxy16:{{.*}} isdoxy16 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
-// CHECK: annotate-comments.cpp:72:6: FunctionDecl=isdoxy17:{{.*}} isdoxy17 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
-// CHECK: annotate-comments.cpp:80:5: FunctionDecl=isdoxy18:{{.*}} isdoxy18 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
-// CHECK: annotate-comments.cpp:90:6: FunctionDecl=isdoxy19:{{.*}} isdoxy19 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
-// CHECK: annotate-comments.cpp:96:6: FunctionDecl=isdoxy20:{{.*}} isdoxy20 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
-// CHECK: annotate-comments.cpp:107:8: StructDecl=isdoxy25:{{.*}} IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:112:7: FieldDecl=isdoxy26:{{.*}} IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:116:7: FieldDecl=isdoxy27:{{.*}} IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:123:6: EnumDecl=isdoxy29:{{.*}} IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:130:11: Namespace=isdoxy31:{{.*}} IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:138:7: FieldDecl=isdoxy33:{{.*}} isdoxy33 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:139:7: FieldDecl=isdoxy34:{{.*}} isdoxy34 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:142:7: FieldDecl=isdoxy35:{{.*}} isdoxy35 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:143:7: FieldDecl=isdoxy36:{{.*}} isdoxy36 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:146:7: FieldDecl=isdoxy37:{{.*}} isdoxy37 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:147:7: FieldDecl=isdoxy38:{{.*}} isdoxy38 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:148:7: FieldDecl=isdoxy39:{{.*}} isdoxy39 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:155:6: FunctionDecl=isdoxy40:{{.*}} isdoxy40 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:160:5: FunctionDecl=isdoxy41:{{.*}} isdoxy41 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:163:7: FieldDecl=isdoxy42:{{.*}} isdoxy42 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments.cpp:176:6: FunctionDecl=isdoxy43:{{.*}} IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
-
-// CHECK: annotate-comments.cpp:185:6: FunctionDecl=isdoxy44:{{.*}} BriefComment=[IS_DOXYGEN_START Aaa bbb ccc.]
-// CHECK: annotate-comments.cpp:195:6: FunctionDecl=isdoxy45:{{.*}} BriefComment=[Ddd eee. Fff.]
-// CHECK: annotate-comments.cpp:205:6: FunctionDecl=isdoxy46:{{.*}} BriefComment=[Ddd eee. Fff.]
-// CHECK: annotate-comments.cpp:214:6: FunctionDecl=isdoxy48:{{.*}} BriefComment=[IS_DOXYGEN_START Aaa bbb]
-// CHECK: annotate-comments.cpp:218:6: FunctionDecl=isdoxy49:{{.*}} BriefComment=[IS_DOXYGEN_START Aaa]
-// CHECK: annotate-comments.cpp:222:6: FunctionDecl=isdoxy50:{{.*}} BriefComment=[Returns ddd IS_DOXYGEN_END]
-// CHECK: annotate-comments.cpp:231:6: FunctionDecl=isdoxy51:{{.*}} BriefComment=[Aaa. IS_DOXYGEN_START]
-// CHECK: annotate-comments.cpp:241:6: FunctionDecl=isdoxy52:{{.*}} BriefComment=[Aaa. IS_DOXYGEN_START Bbb.]
-// CHECK: annotate-comments.cpp:248:6: FunctionDecl=isdoxy53:{{.*}} BriefComment=[Aaa. IS_DOXYGEN_START IS_DOXYGEN_END]
-// CHECK: annotate-comments.cpp:255:6: FunctionDecl=isdoxy54:{{.*}} BriefComment=[Aaa. IS_DOXYGEN_START IS_DOXYGEN_END]
diff --git a/test/Index/comment-c-decls.c b/test/Index/comment-c-decls.c
deleted file mode 100644
index 371e453..0000000
--- a/test/Index/comment-c-decls.c
+++ /dev/null
@@ -1,104 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 %s > %t/out
-// RUN: FileCheck %s < %t/out
-
-// Ensure that XML we generate is not invalid.
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out
-// WRONG-NOT: CommentXMLInvalid
-// rdar://12378714
-
-/**
- * \brief Aaa.
-*/
-int global_function();
-// CHECK: <Declaration>int global_function()</Declaration>
-
-/**
- * \param x1 Aaa.
-*/
-extern void external_function(int x1);
-// CHECK: <Declaration>extern void external_function(int x1)</Declaration>
-
-/**
- * \brief global variable;
-*/
-int global_variable;
-// CHECK: <Declaration>int global_variable</Declaration>
-
-/**
- * \brief local variable;
-*/
-static int static_variable;
-// CHECK: <Declaration>static int static_variable</Declaration>
-
-/**
- * \brief external variable
-*/
-extern int external_variable;
-// CHECK: <Declaration>extern int external_variable</Declaration>
-
-int global_function() {
-  /**
-   * \brief a local variable
-  */
-  int local = 10;
-  return local;
-}
-// CHECK: <Declaration>int global_function()</Declaration>
-// CHECK: <Declaration>int local = 10</Declaration>
-
-/**
- * \brief initialized decl.
-*/
-int initialized_global = 100;
-// CHECK: <Declaration>int initialized_global = 100</Declaration>
-
-/**
- * \brief typedef example
-*/
-typedef int INT_T;
-// CHECK: <Declaration>typedef int INT_T</Declaration>
-
-/**
- * \brief aggregate type example
-*/
-struct S {
-/**
- * \brief iS1;
-*/
-  int iS1;
-/**
- * \brief dS1;
-*/
-  double dS1;
-};
-// CHECK: <Declaration>struct S {}</Declaration>
-// CHECK: <Declaration>int iS1</Declaration>
-// CHECK: <Declaration>double dS1</Declaration>
-
-/**
- * \brief enum e;
-*/
-enum e {
-  One,
-/**
- * \brief Two;
-*/
-  Two,
-  Three
-};
-// CHECK: <Declaration>enum e {}</Declaration>
-// CHECK: <Declaration>Two</Declaration>
-
-/**
- *\brief block declaration
-*/
-int (^Block) (int i, int j);
-// CHECK: <Declaration>int (^Block)(int, int)</Declaration>
-
-/**
- *\brief block declaration
-*/
-int (^Block1) (int i, int j) = ^(int i, int j) { return i + j; };
-// CHECK: <Declaration>int (^Block1)(int, int) = ^(int i, int j) {}</Declaration>
diff --git a/test/Index/comment-cplus-decls.cpp b/test/Index/comment-cplus-decls.cpp
deleted file mode 100644
index 002482e..0000000
--- a/test/Index/comment-cplus-decls.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 %s > %t/out
-// RUN: FileCheck %s < %t/out
-
-// Ensure that XML we generate is not invalid.
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out
-// WRONG-NOT: CommentXMLInvalid
-// rdar://12378714
-
-/**
- * \brief plain c++ class
-*/
-class Test
-{
-public:
-/**
- * \brief plain c++ constructor
-*/
-    Test () : reserved (new data()) {}
-
-/**
- * \brief plain c++ member function
-*/
-    unsigned getID() const
-    {
-        return reserved->objectID;
-    }
-/**
- * \brief plain c++ destructor
-*/
-    ~Test () {}
-protected:
-    struct data {
-        unsigned objectID;
-    };
-/**
- * \brief plain c++ data field
-*/
-    data* reserved;
-};
-// CHECK: <Declaration>class Test {}</Declaration>
-// CHECK: <Declaration>Test() : reserved(new Test::data())</Declaration>
-// CHECK: <Declaration>unsigned int getID() const</Declaration>
-// CHECK: <Declaration>~Test()</Declaration>
-// CHECK: <Declaration>Test::data *reserved</Declaration>
-
-
-class S {
-/**
- * \brief Aaa
-*/
-  friend class Test;
-/**
- * \brief Bbb
-*/
-  friend void foo() {}
-
-/**
- * \brief Ccc
-*/
-  friend int int_func();
-
-/**
- * \brief Ddd
-*/
-  friend bool operator==(const Test &, const Test &);
-
-/**
- * \brief Eee
-*/
-template <typename T> friend void TemplateFriend();
-
-/**
- * \brief Eee
-*/
-  template <typename T> friend class TemplateFriendClass;
-
-};
-// CHECK: <Declaration>friend class Test</Declaration>
-// CHECK: <Declaration>friend void foo()</Declaration>
-// CHECK: <Declaration>friend int int_func()</Declaration>
-// CHECK: <Declaration>friend bool operator==(const Test &, const Test &)</Declaration>
-// CHECK: <Declaration>friend template <typename T> void TemplateFriend()</Declaration>
-// CHECK: <Declaration>friend template <typename T> class TemplateFriendClass</Declaration>
-
-namespace test0 {
-  namespace ns {
-    void f(int);
-  }
-
-  struct A {
-/**
- * \brief Fff
-*/
-    friend void ns::f(int a);
-  };
-}
-// CHECK: <Declaration>friend void f(int a)</Declaration>
-
-namespace test1 {
-  template <class T> struct Outer {
-    void foo(T);
-    struct Inner {
-/**
- * \brief Ggg
-*/
-      friend void Outer::foo(T);
-    };
-  };
-}
-// CHECK: <Declaration>friend void foo(T)</Declaration>
-
-namespace test2 {
-  namespace foo {
-    void Func(int x);
-  }
-
-  class Bar {
-/**
- * \brief Hhh
-*/
-    friend void ::test2::foo::Func(int x);
-  };
-}
-// CHECK: <Declaration>friend void Func(int x)</Declaration>
-
-namespace test3 {
-  template<class T> class vector {
-   public:
-    vector(int i) {}
-/**
- * \brief Iii
-*/
-    void f(const T& t = T()) {}
-  };
-  class A {
-   private:
-/**
- * \brief Jjj
-*/
-    friend void vector<A>::f(const A&);
-  };
-}
-// CHECK: <Declaration>void f(const T &t = T())</Declaration>
-// CHECK: <Declaration>friend void f(const test3::A &)</Declaration>
-
-class MyClass
-{
-/**
- * \brief plain friend test.
-*/
-  friend class MyClass;
-};
-// CHECK: <Declaration>friend  class MyClass</Declaration>
-
-template<class _Tp> class valarray
-{
-private:
-/**
- * \brief template friend test.
-*/
-    template <class T> friend class valarray;
-};
-// CHECK: <Declaration>template <class T> class valarray</Declaration>
-// CHECK: <Declaration>friend template <class T> class valarray</Declaration>
-
-class gslice
-{
-  valarray<unsigned> __size_;
-};
diff --git a/test/Index/comment-cplus-template-decls.cpp b/test/Index/comment-cplus-template-decls.cpp
deleted file mode 100644
index 9510c7c..0000000
--- a/test/Index/comment-cplus-template-decls.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 std=c++11 %s > %t/out
-// RUN: FileCheck %s < %t/out
-
-// Ensure that XML we generate is not invalid.
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out
-// WRONG-NOT: CommentXMLInvalid
-// rdar://12378714
-
-/**
- * \brief Aaa
-*/
-template<typename T> struct A {
-/**
- * \brief Bbb
-*/
-  A();
-/**
- * \brief Ccc
-*/
-  ~A();
-/**
- * \brief Ddd
-*/
-  void f() { }
-};
-// CHECK: <Declaration>template <typename T> struct A {}</Declaration>
-// CHECK: <Declaration>A<T>()</Declaration>
-// CHECK: <Declaration>~A<T>()</Declaration>
-
-/**
- * \Brief Eee
-*/
-template <typename T> struct D : A<T> {
-/**
- * \brief
-*/
-  using A<T>::f;
-  
-  void f();
-};
-// CHECK: <Declaration>template <typename T> struct D :  A<T> {}</Declaration>
-// CHECK: <Declaration>using A<T>::f</Declaration>
-
-struct Base {
-    int foo;
-};
-/**
- * \brief
-*/
-template<typename T> struct E : Base {
-/**
- * \brief
-*/
-  using Base::foo;
-};
-// CHECK: <Declaration>template <typename T> struct E :  Base {}</Declaration>
-// CHECK: <Declaration>using Base::foo</Declaration>
-
-/// \tparam
-/// \param AAA Blah blah
-template<typename T>
-void func_template_1(T AAA);
-// CHECK: <Declaration>template <typename T> void func_template_1(T AAA)</Declaration>
-
-template<template<template<typename CCC> class DDD, class BBB> class AAA>
-void func_template_2();
-// FIXME: There is not Declaration field in the generated output.
diff --git a/test/Index/comment-cplus11-specific.cpp b/test/Index/comment-cplus11-specific.cpp
deleted file mode 100644
index fa0db91..0000000
--- a/test/Index/comment-cplus11-specific.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng std=c++11 %s > %t/out
-// RUN: FileCheck %s < %t/out
-// rdar://13752382
-
-namespace inner {
-  //! This documentation should be inherited.
-  struct Opaque;
-}
-// CHECK:         (CXComment_Text Text=[ This documentation should be inherited.])))] 
-
-namespace borrow {
-  //! This is documentation for the typedef (which shows up).
-  typedef inner::Opaque Typedef;
-// CHECK:         (CXComment_Text Text=[ This is documentation for the typedef (which shows up).])))] 
-
-  //! This is documentation for the alias (which shows up).
-  using Alias = inner::Opaque;
-// CHECK:         (CXComment_Text Text=[ This is documentation for the alias (which shows up).])))] 
-
-  typedef inner::Opaque NoDocTypedef;
-// CHECK:         (CXComment_Text Text=[ This documentation should be inherited.])))] 
-
-  using NoDocAlias = inner::Opaque;
-// CHECK:         (CXComment_Text Text=[ This documentation should be inherited.])))] 
-}
diff --git a/test/Index/comment-custom-block-command.cpp b/test/Index/comment-custom-block-command.cpp
deleted file mode 100644
index f87cef9..0000000
--- a/test/Index/comment-custom-block-command.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-
-// Check that custom block commands are defined correctly.
-// RUN: %clang_cc1 -fcomment-block-commands=CustomCommand -x c++ -std=c++11 -emit-pch -o %t/out.pch %s
-// RUN: %clang_cc1 -x c++ -std=c++11 -fcomment-block-commands=CustomCommand -include-pch %t/out.pch -fsyntax-only %s
-
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 -fcomment-block-commands=CustomCommand > %t/out.c-index-direct
-// RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch
-
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-pch
-
-// Ensure that XML is not invalid
-// WRONG-NOT: CommentXMLInvalid
-
-// RUN: FileCheck %s < %t/out.c-index-direct
-// RUN: FileCheck %s < %t/out.c-index-pch
-
-// XFAIL: vg_leak
-
-#ifndef HEADER
-#define HEADER
-
-/// \CustomCommand Aaa.
-void comment_custom_block_command_1();
-
-// CHECK: comment-custom-block-command.cpp:[[@LINE-2]]:6: FunctionDecl=comment_custom_block_command_1:{{.*}} FullCommentAsHTML=[<p> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-custom-block-command.cpp" line="[[@LINE-2]]" column="6"><Name>comment_custom_block_command_1</Name><USR>c:@F at comment_custom_block_command_1#</USR><Declaration>void comment_custom_block_command_1()</Declaration><Discussion><Para> Aaa.</Para></Discussion></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[CustomCommand]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.]))))]
-
-#endif
-
diff --git a/test/Index/comment-misc-tags.m b/test/Index/comment-misc-tags.m
deleted file mode 100644
index bb16ea9..0000000
--- a/test/Index/comment-misc-tags.m
+++ /dev/null
@@ -1,111 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out
-// RUN: FileCheck %s < %t/out
-// rdar://12379114
-
-/*!
-     @interface IOCommandGate
-     @brief    This is a brief
-     @abstract Single-threaded work-loop client request mechanism.
-     @discussion An IOCommandGate instance is an extremely light weight mechanism that
-         executes an action on the driver's work-loop...
-     @textblock
-       Many discussions about text
-       Many1 discussions about text
-       Many2 discussions about text
-     @/textblock
-     @link //un_ref/c/func/function_name link text goes here @/link
-     @see  //un_ref/doc/uid/XX0000011 I/O Kit Fundamentals
-     @seealso //k_ref/doc/uid/XX30000905-CH204 Programming
- */
- at interface IOCommandGate
- at end
-
-// CHECK:       (CXComment_BlockCommand CommandName=[abstract]
-// CHECK-NEXT:    (CXComment_Paragraph
-// CHECK-NEXT:       (CXComment_Text Text=[ Single-threaded work-loop client request mechanism.] HasTrailingNewline)
-// CHECK:       (CXComment_BlockCommand CommandName=[discussion]
-// CHECK-NEXT:     (CXComment_Paragraph
-// CHECK-NEXT:       (CXComment_Text Text=[ An IOCommandGate instance is an extremely light weight mechanism that] HasTrailingNewline)
-// CHECK-NEXT:       (CXComment_Text Text=[         executes an action on the driver's work-loop...] HasTrailingNewline)
-// CHECK:       (CXComment_VerbatimBlockCommand CommandName=[textblock]
-// CHECK-NEXT:     (CXComment_VerbatimBlockLine Text=[       Many discussions about text])
-// CHECK-NEXT:       (CXComment_VerbatimBlockLine Text=[       Many1 discussions about text])
-// CHECK-NEXT:       (CXComment_VerbatimBlockLine Text=[       Many2 discussions about text]))
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-
-// CHECK:       (CXComment_VerbatimBlockCommand CommandName=[link]
-// CHECK-NEXT:     (CXComment_VerbatimBlockLine Text=[ //un_ref/c/func/function_name link text goes here ]))
-// CHECK-NEXT:     (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:     (CXComment_Text Text=[     ] IsWhitespace))
-// CHECK:       (CXComment_BlockCommand CommandName=[see]
-// CHECK-NEXT:     (CXComment_Paragraph
-// CHECK-NEXT:     (CXComment_Text Text=[  //un_ref/doc/uid/XX0000011 I/O Kit Fundamentals] HasTrailingNewline)
-// CHECK-NEXT:     (CXComment_Text Text=[     ] IsWhitespace)))
-// CHECK:       (CXComment_BlockCommand CommandName=[seealso]
-// CHECK-NEXT:     (CXComment_Paragraph
-// CHECK-NEXT:     (CXComment_Text Text=[ //k_ref/doc/uid/XX30000905-CH204 Programming])
-
-// rdar://12379053
-/*!
-\arg \c AlignLeft left alignment.
-\li \c AlignRight right alignment.
-
-  No other types of alignment are supported.
-*/
-struct S {
-  int AlignLeft;
-  int AlignRight;
-};
-
-// CHECK:       (CXComment_BlockCommand CommandName=[arg]
-// CHECK-NEXT:    (CXComment_Paragraph
-// CHECK-NEXT:    (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:    (CXComment_InlineCommand CommandName=[c] RenderMonospaced Arg[0]=AlignLeft)
-// CHECK-NEXT:    (CXComment_Text Text=[ left alignment.] HasTrailingNewline)))
-// CHECK:       (CXComment_BlockCommand CommandName=[li]
-// CHECK-NEXT:    (CXComment_Paragraph
-// CHECK-NEXT:    (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:    (CXComment_InlineCommand CommandName=[c] RenderMonospaced Arg[0]=AlignRight)
-// CHECK-NEXT:    (CXComment_Text Text=[ right alignment.])))
-// CHECK:       (CXComment_Paragraph
-// CHECK-NEXT:    (CXComment_Text Text=[  No other types of alignment are supported.]))
-
-// rdar://12379053
-/*! \struct Test
- * Normal text.
- *
- * \par User defined paragraph:
- * Contents of the paragraph.
- *
- * \par
- * New paragraph under the same heading.
- *
- * \note
- * This note consists of two paragraphs.
- * This is the first paragraph.
- *
- * \par
- * And this is the second paragraph.
- *
- * More normal text.
- */
-  
-struct Test {int filler;};
-
-// CHECK:       (CXComment_BlockCommand CommandName=[par]
-// CHECK-NEXT:     (CXComment_Paragraph
-// CHECK-NEXT:        (CXComment_Text Text=[ User defined paragraph:] HasTrailingNewline)
-// CHECK-NEXT:        (CXComment_Text Text=[ Contents of the paragraph.])))
-// CHECK:       (CXComment_BlockCommand CommandName=[par]
-// CHECK-NEXT:     (CXComment_Paragraph
-// CHECK-NEXT:        (CXComment_Text Text=[ New paragraph under the same heading.])))
-// CHECK:       (CXComment_BlockCommand CommandName=[note]
-// CHECK-NEXT:     (CXComment_Paragraph
-// CHECK-NEXT:        (CXComment_Text Text=[ This note consists of two paragraphs.] HasTrailingNewline)
-// CHECK-NEXT:        (CXComment_Text Text=[ This is the first paragraph.])))
-// CHECK:       (CXComment_BlockCommand CommandName=[par]
-// CHECK-NEXT:     (CXComment_Paragraph
-// CHECK-NEXT:     (CXComment_Text Text=[ And this is the second paragraph.])))
-
diff --git a/test/Index/comment-objc-decls.m b/test/Index/comment-objc-decls.m
deleted file mode 100644
index ae3b0bb..0000000
--- a/test/Index/comment-objc-decls.m
+++ /dev/null
@@ -1,175 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 %s > %t/out
-// RUN: FileCheck %s < %t/out
-
-// Ensure that XML we generate is not invalid.
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out
-// WRONG-NOT: CommentXMLInvalid
-
-// rdar://12378714
-
-/**
- * \brief This is a protocol definition
-*/
- at protocol MyProto
- at optional
-/**
- * \brief MethodMyProto method
- * \param[in] anObject input value
- * \param[in] range output value is unsigned int
- * \result return index
- */
-- (unsigned int)MethodMyProto:(id)anObject inRange:(unsigned int)range;
-/**
- * \brief PropertyMyProto - This is protocol's property.
-*/
- at property (copy) id PropertyMyProto;
-/**
- * \brief ClassMethodMyProto
-*/
-+ ClassMethodMyProto;
- at end
-// CHECK: <Declaration>@protocol MyProto\n at end</Declaration>
-// CHECK: <Declaration>- (unsigned int)MethodMyProto:(id)anObject inRange:(unsigned int)range;</Declaration>
-// CHECK: <Declaration>@optional\n at property(readwrite, copy, atomic) id PropertyMyProto;</Declaration>
-// CHECK: <Declaration>+ (id)ClassMethodMyProto;</Declaration>
-
-/**
- * \brief NSObject is the root class.
-*/
- at interface NSObject {
-/**
- * \brief IvarNSObject
-*/
-  id IvarNSObject;
-}
- at end
-// CHECK: Declaration>@interface NSObject {\n  id IvarNSObject;\n}\n at end</Declaration>
-// CHECK: <Declaration>id IvarNSObject</Declaration>
-
-/**
- * \brief MyClass - primary class.
-*/
- at interface MyClass : NSObject<MyProto>
-{
-/**
- * \brief IvarMyClass - IvarMyClass of values.
-*/
-  id IvarMyClass;
-}
-/**
- * \brief MethodMyClass is instance method.
-*/
-- MethodMyClass;
-
-/**
- * \brief ClassMethodMyClass is class method.
-*/
-+ ClassMethodMyClass;
-
-/**
- * \brief PropertyMyClass - This is class's property.
-*/
- at property (copy) id PropertyMyClass;
- at end
-// CHECK: <Declaration>@interface MyClass : NSObject <MyProto> {\n    id IvarMyClass;\n}\n at end</Declaration>
-// CHECK: <Declaration>id IvarMyClass</Declaration>
-// CHECK: <Declaration>- (id)MethodMyClass;</Declaration>
-// CHECK: <Declaration>+ (id)ClassMethodMyClass;</Declaration>
-// CHECK: <Declaration>@property(readwrite, copy, atomic) id PropertyMyClass;</Declaration
-
-/**
- * \brief - This is class extension of MyClass
-*/
- at interface MyClass()
-{
-/**
- * \brief IvarMyClassExtension - IvarMyClassExtension private to class extension
-*/
-  id IvarMyClassExtension;
-}
- at end
-// CHECK: <Declaration>@interface MyClass () {\n  id IvarMyClassExtension;\n}\n at end</Declaration>
-// CHECK: <Declaration>id IvarMyClassExtension</Declaration>
-
-
-/**
- * \brief MyClass (Category) is private to MyClass.
-*/
- at interface MyClass (Category)
-/**
- * \brief This is private to MyClass
- */
-- (void)MethodMyClassCategory;
-
-/**
- * \brief PropertyMyClassCategory - This is class's private property.
-*/
- at property (copy) id PropertyMyClassCategory;
- at end
-// CHECK: <Declaration>@interface MyClass (Category)\n at end</Declaration>
-// CHECK: <Declaration>- (void)MethodMyClassCategory;</Declaration>
-// CHECK: <Declaration>@property(readwrite, copy, atomic) id PropertyMyClassCategory;</Declaration>
-// CHECK: <Declaration>- (id)PropertyMyClassCategory;</Declaration>
-// CHECK: <Declaration>- (void)setPropertyMyClassCategory:(id)arg;</Declaration>
-
-/// @implementation's
-
-/**
- * \brief implementation of MyClass class.
-*/
- at implementation MyClass {
-/**
- * \brief IvarPrivateToMyClassImpl.
-*/
-  id IvarPrivateToMyClassImpl;
-}
-/**
- * \brief MethodMyClass is instance method implementation.
-*/
-- MethodMyClass {
-  return 0;
-}
-
-/**
- * \brief ClassMethodMyClass is class method implementation.
-*/
-+ ClassMethodMyClass {
-  return 0;
-}
- at end
-// CHECK: <Declaration>@implementation MyClass {\n  id IvarPrivateToMyClassImpl;\n  id _PropertyMyClass;\n}\n at end</Declaration>
-// CHECK: <Declaration>id IvarPrivateToMyClassImpl</Declaration>
-// CHECK: <Declaration>- (id)MethodMyClass;</Declaration>
-// CHECK: <Declaration>+ (id)ClassMethodMyClass;</Declaration>
-
-/**
- * \brief MyClass (Category) is implementation of private to MyClass.
-*/
- at implementation MyClass (Category)
-/**
- * \brief This is private to MyClass
- */
-- (void)MethodMyClassCategory {}
-/**
- * \brief property getter
-*/
-- (id) PropertyMyClassCategory { return 0; }
-
-/**
- * \brief property setter
-*/
-- (void) setPropertyMyClassCategory : (id) arg {}
- at end
-// CHECK: <Declaration>@implementation MyClass (Category)\n at end</Declaration>
-// CHECK: <Declaration>- (void)MethodMyClassCategory;</Declaration>
-// CHECK: <Declaration>- (id)PropertyMyClassCategory;</Declaration>
-// CHECK: <Declaration>- (void)setPropertyMyClassCategory:(id)arg;</Declaration>
-
-/**
- * \brief NSObject implementation
-*/
- at implementation NSObject
- at end
-// CHECK: <Declaration>@implementation NSObject\n at end</Declaration>
diff --git a/test/Index/comment-to-html-xml-conversion.cpp b/test/Index/comment-to-html-xml-conversion.cpp
deleted file mode 100644
index 590e187..0000000
--- a/test/Index/comment-to-html-xml-conversion.cpp
+++ /dev/null
@@ -1,1047 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-
-// This file contains UTF-8 sequences.  Please don't "fix" them!
-
-// Check that we serialize comment source locations properly.
-// RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t/out.pch %s
-// RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t/out.pch -fsyntax-only %s
-
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 > %t/out.c-index-direct
-// RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch
-
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-pch
-
-// Ensure that XML is not invalid
-// WRONG-NOT: CommentXMLInvalid
-
-// RUN: FileCheck %s < %t/out.c-index-direct
-// RUN: FileCheck %s < %t/out.c-index-pch
-
-// XFAIL: msan
-// XFAIL: valgrind
-
-#ifndef HEADER
-#define HEADER
-
-//===---
-// Tests for \brief and its aliases.
-//===---
-
-/// Aaa.
-void test_cmd_brief_like_1();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_1:{{.*}} BriefComment=[Aaa.] FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_1</Name><USR>c:@F at test_cmd_brief_like_1#</USR><Declaration>void test_cmd_brief_like_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Aaa.])))]
-
-/// \brief Aaa.
-void test_cmd_brief_like_2();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_2:{{.*}} BriefComment=[Aaa.] FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_2</Name><USR>c:@F at test_cmd_brief_like_2#</USR><Declaration>void test_cmd_brief_like_2()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[brief]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.]))))]
-
-/// \short Aaa.
-void test_cmd_brief_like_3();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_3:{{.*}} BriefComment=[Aaa.] FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_3</Name><USR>c:@F at test_cmd_brief_like_3#</USR><Declaration>void test_cmd_brief_like_3()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[short]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.]))))]
-
-/// Aaa.
-///
-/// \brief Bbb.
-void test_cmd_brief_like_4();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_4:{{.*}} BriefComment=[Bbb.] FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_4</Name><USR>c:@F at test_cmd_brief_like_4#</USR><Declaration>void test_cmd_brief_like_4()</Declaration><Abstract><Para> Bbb.</Para></Abstract><Discussion><Para> Aaa.</Para></Discussion></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Aaa.]))
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[brief]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.]))))]
-
-/// Aaa.
-///
-/// \brief Bbb.
-///
-/// Ccc.
-void test_cmd_brief_like_5();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_5:{{.*}} BriefComment=[Bbb.] FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p><p> Ccc.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_5</Name><USR>c:@F at test_cmd_brief_like_5#</USR><Declaration>void test_cmd_brief_like_5()</Declaration><Abstract><Para> Bbb.</Para></Abstract><Discussion><Para> Aaa.</Para><Para> Ccc.</Para></Discussion></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Aaa.]))
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[brief]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.])))
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Ccc.])))]
-
-/// \brief Aaa.
-/// \brief Bbb.
-void test_cmd_brief_like_6();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_6:{{.*}} BriefComment=[Bbb.] FullCommentAsHTML=[<p class="para-brief"> Aaa. </p><p class="para-brief"> Bbb.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_6</Name><USR>c:@F at test_cmd_brief_like_6#</USR><Declaration>void test_cmd_brief_like_6()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para> Bbb.</Para></Discussion></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[brief]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[brief]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.]))))]
-
-/// \abstract Aaa.
-///
-/// Bbb.
-void test_cmd_brief_like_7();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_7:{{.*}} BriefComment=[Aaa.] FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p> Bbb.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_7</Name><USR>c:@F at test_cmd_brief_like_7#</USR><Declaration>void test_cmd_brief_like_7()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Discussion><Para> Bbb.</Para></Discussion></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[abstract]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.])))
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Bbb.])))]
-
-//===---
-// Tests for \returns and its aliases.
-//===---
-
-/// Aaa.
-///
-/// \return Bbb.
-void test_cmd_returns_like_1();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_1:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span>  Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_1</Name><USR>c:@F at test_cmd_returns_like_1#</USR><Declaration>void test_cmd_returns_like_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Bbb.</Para></ResultDiscussion></Function>]
-
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Aaa.]))
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[return]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.]))))]
-
-/// Aaa.
-///
-/// \returns Bbb.
-void test_cmd_returns_like_2();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_2:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span>  Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_2</Name><USR>c:@F at test_cmd_returns_like_2#</USR><Declaration>void test_cmd_returns_like_2()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Bbb.</Para></ResultDiscussion></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Aaa.]))
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[returns]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.]))))]
-
-/// Aaa.
-///
-/// \result Bbb.
-void test_cmd_returns_like_3();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_3:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span>  Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_3</Name><USR>c:@F at test_cmd_returns_like_3#</USR><Declaration>void test_cmd_returns_like_3()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Bbb.</Para></ResultDiscussion></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Aaa.]))
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[result]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.]))))]
-
-/// \returns Aaa.
-/// \returns Bbb.
-void test_cmd_returns_like_4();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_4:{{.*}} FullCommentAsHTML=[<div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span>  Aaa. </p><p class="para-returns"><span class="word-returns">Returns</span>  Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_4</Name><USR>c:@F at test_cmd_returns_like_4#</USR><Declaration>void test_cmd_returns_like_4()</Declaration><ResultDiscussion><Para> Aaa. </Para><Para> Bbb.</Para></ResultDiscussion></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[returns]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[returns]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.]))))]
-
-/// Aaa.
-///
-/// Bbb.
-///
-/// \returns Ccc.
-void test_cmd_returns_like_5();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_5:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p> Bbb.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span>  Ccc.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_5</Name><USR>c:@F at test_cmd_returns_like_5#</USR><Declaration>void test_cmd_returns_like_5()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Ccc.</Para></ResultDiscussion><Discussion><Para> Bbb.</Para></Discussion></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Aaa.]))
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Bbb.]))
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[returns]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Ccc.]))))]
-
-//===---
-// Tests for \param.
-//===---
-
-/// \param
-void test_cmd_param_1(int x1);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_1:{{.*}} FullCommentAsHTML=[] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_1</Name><USR>c:@F at test_cmd_param_1#I#</USR><Declaration>void test_cmd_param_1(int x1)</Declaration></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[] ParamIndex=Invalid
-// CHECK-NEXT:         (CXComment_Paragraph IsWhitespace)))]
-
-/// \param x1 Aaa.
-void test_cmd_param_2(int x1);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_2:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_2</Name><USR>c:@F at test_cmd_param_2#I#</USR><Declaration>void test_cmd_param_2(int x1)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter></Parameters></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.]))))]
-
-/// \param zzz Aaa.
-void test_cmd_param_3(int x1);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_3:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-invalid">zzz</dt><dd class="param-descr-index-invalid"> Aaa.</dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_3</Name><USR>c:@F at test_cmd_param_3#I#</USR><Declaration>void test_cmd_param_3(int x1)</Declaration><Parameters><Parameter><Name>zzz</Name><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter></Parameters></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[zzz] ParamIndex=Invalid
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.]))))]
-
-/// \param x2 Bbb.
-/// \param x1 Aaa.
-void test_cmd_param_4(int x1, int x2);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_4:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd><dt class="param-name-index-1">x2</dt><dd class="param-descr-index-1"> Bbb. </dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_4</Name><USR>c:@F at test_cmd_param_4#I#I#</USR><Declaration>void test_cmd_param_4(int x1, int x2)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter><Parameter><Name>x2</Name><Index>1</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Bbb. </Para></Discussion></Parameter></Parameters></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[x2] ParamIndex=1
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.]))))]
-
-/// \param x2 Bbb.
-/// \param zzz Aaa.
-/// \param x1 Aaa.
-void test_cmd_param_5(int x1, int x2);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_5:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd><dt class="param-name-index-1">x2</dt><dd class="param-descr-index-1"> Bbb. </dd><dt class="param-name-index-invalid">zzz</dt><dd class="param-descr-index-invalid"> Aaa. </dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_5</Name><USR>c:@F at test_cmd_param_5#I#I#</USR><Declaration>void test_cmd_param_5(int x1, int x2)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter><Parameter><Name>x2</Name><Index>1</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Bbb. </Para></Discussion></Parameter><Parameter><Name>zzz</Name><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa. </Para></Discussion></Parameter></Parameters></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[x2] ParamIndex=1
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[zzz] ParamIndex=Invalid
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.]))))]
-
-/// \param x1 Aaa.
-/// \param ... Bbb.
-void test_cmd_param_6(int x1, ...);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_6:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa. </dd><dt class="param-name-index-vararg">...</dt><dd class="param-descr-index-vararg"> Bbb.</dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_6</Name><USR>c:@F at test_cmd_param_6#I.#</USR><Declaration>void test_cmd_param_6(int x1, ...)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa. </Para></Discussion></Parameter><Parameter><Name>...</Name><IsVarArg /><Direction isExplicit="0">in</Direction><Discussion><Para> Bbb.</Para></Discussion></Parameter></Parameters></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[...] ParamIndex=4294967295
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.]))))]
-
-//===---
-// Tests for \tparam.
-//===---
-
-/// \tparam
-/// \param aaa Blah blah
-template<typename T>
-void test_cmd_tparam_1(T aaa);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_1:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">aaa</dt><dd class="param-descr-index-0"> Blah blah</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_1</Name><USR>c:@FT@>1#Ttest_cmd_tparam_1#t0.0#</USR><Declaration>template <typename T> void test_cmd_tparam_1(T aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah</Para></Discussion></Parameter></Parameters></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[] ParamPosition=Invalid
-// CHECK-NEXT:         (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[aaa] ParamIndex=0
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Blah blah]))))]
-
-/// \tparam T
-/// \param aaa Blah blah
-template<typename T>
-void test_cmd_tparam_2(T aaa);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_2:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">aaa</dt><dd class="param-descr-index-0"> Blah blah</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_2</Name><USR>c:@FT@>1#Ttest_cmd_tparam_2#t0.0#</USR><Declaration>template <typename T> void test_cmd_tparam_2(T aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah</Para></Discussion></Parameter></Parameters></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[T] ParamPosition={0}
-// CHECK-NEXT:         (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[aaa] ParamIndex=0
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Blah blah]))))]
-
-/// \tparam T2 Bbb
-/// \tparam T1 Aaa
-template<typename T1, typename T2>
-void test_cmd_tparam_3(T1 aaa, T2 bbb);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_3:{{.*}} FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">T1</dt><dd class="tparam-descr-index-0"> Aaa</dd><dt class="tparam-name-index-1">T2</dt><dd class="tparam-descr-index-1"> Bbb </dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_3</Name><USR>c:@FT@>2#T#Ttest_cmd_tparam_3#t0.0#t0.1#</USR><Declaration>template <typename T1, typename T2> void test_cmd_tparam_3(T1 aaa, T2 bbb)</Declaration><TemplateParameters><Parameter><Name>T1</Name><Index>0</Index><Discussion><Para> Aaa</Para></Discussion></Parameter><Parameter><Name>T2</Name><Index>1</Index><Discussion><Para> Bbb </Para></Discussion></Parameter></TemplateParameters></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[T2] ParamPosition={1}
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[T1] ParamPosition={0}
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa]))))]
-
-/// \tparam T2 Bbb
-/// \tparam U Zzz
-/// \tparam V Ccc
-/// \tparam T1 Aaa
-template<typename T1, typename T2, int V>
-void test_cmd_tparam_4(T1 aaa, T2 bbb);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_4:{{.*}} FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">T1</dt><dd class="tparam-descr-index-0"> Aaa</dd><dt class="tparam-name-index-1">T2</dt><dd class="tparam-descr-index-1"> Bbb </dd><dt class="tparam-name-index-2">V</dt><dd class="tparam-descr-index-2"> Ccc </dd><dt class="tparam-name-index-invalid">U</dt><dd class="tparam-descr-index-invalid"> Zzz </dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_4</Name><USR>c:@FT@>3#T#T#NItest_cmd_tparam_4#t0.0#t0.1#</USR><Declaration>template <typename T1, typename T2, int V>\nvoid test_cmd_tparam_4(T1 aaa, T2 bbb)</Declaration><TemplateParameters><Parameter><Name>T1</Name><Index>0</Index><Discussion><Para> Aaa</Para></Discussion></Parameter><Parameter><Name>T2</Name><Index>1</Index><Discussion><Para> Bbb </Para></Discussion></Parameter><Parameter><Name>V</Name><Index>2</Index><Discussion><Para> Ccc </Para></Discussion></Parameter><Parameter><Name>U</Name><Discussion><Para> Zzz </Para></Discussion></Parameter></TemplateParameters></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[T2] ParamPosition={1}
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[U] ParamPosition=Invalid
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Zzz] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[V] ParamPosition={2}
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Ccc] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[T1] ParamPosition={0}
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa]))))]
-
-/// \tparam TTT Ddd
-/// \tparam C Ccc
-/// \tparam T Aaa
-/// \tparam TT Bbb
-template<template<template<typename T> class TT, class C> class TTT>
-void test_cmd_tparam_5();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_5:{{.*}} FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">TTT</dt><dd class="tparam-descr-index-0"> Ddd </dd><dt class="tparam-name-index-other">C</dt><dd class="tparam-descr-index-other"> Ccc </dd><dt class="tparam-name-index-other">T</dt><dd class="tparam-descr-index-other"> Aaa </dd><dt class="tparam-name-index-other">TT</dt><dd class="tparam-descr-index-other"> Bbb</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_5</Name><USR>c:@FT@>1#t>2#t>1#T#Ttest_cmd_tparam_5#</USR><Declaration>template <template <template <typename T> class TT, class C> class TTT>\nvoid test_cmd_tparam_5()</Declaration><TemplateParameters><Parameter><Name>TTT</Name><Index>0</Index><Discussion><Para> Ddd </Para></Discussion></Parameter><Parameter><Name>C</Name><Discussion><Para> Ccc </Para></Discussion></Parameter><Parameter><Name>T</Name><Discussion><Para> Aaa </Para></Discussion></Parameter><Parameter><Name>TT</Name><Discussion><Para> Bbb</Para></Discussion></Parameter></TemplateParameters></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[TTT] ParamPosition={0}
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Ddd] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[C] ParamPosition={0, 1}
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Ccc] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[T] ParamPosition={0, 0, 0}
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[TT] ParamPosition={0, 0}
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb]))))]
-
-//===---
-// Tests for interaction between commands.
-//===---
-
-/// \brief Aaa.
-///
-/// Bbb.
-///
-/// \param x2 Ddd.
-/// \param x1 Ccc.
-/// \returns Eee.
-void test_full_comment_1(int x1, int x2);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_full_comment_1:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p> Bbb.</p><dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Ccc. </dd><dt class="param-name-index-1">x2</dt><dd class="param-descr-index-1"> Ddd. </dd></dl><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span>  Eee.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_full_comment_1</Name><USR>c:@F at test_full_comment_1#I#I#</USR><Declaration>void test_full_comment_1(int x1, int x2)</Declaration><Abstract><Para> Aaa.</Para></Abstract><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Ccc. </Para></Discussion></Parameter><Parameter><Name>x2</Name><Index>1</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Ddd. </Para></Discussion></Parameter></Parameters><ResultDiscussion><Para> Eee.</Para></ResultDiscussion><Discussion><Para> Bbb.</Para></Discussion></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[brief]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.])))
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Bbb.]))
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[x2] ParamIndex=1
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Ddd.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Ccc.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[returns]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Eee.]))))]
-
-//===---
-// Misc tests.
-//===---
-
-/// <br><a href="http://example.com/">Aaa</a>
-void comment_to_html_conversion_24();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_24:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <br><a href="http://example.com/">Aaa</a></p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_24</Name><USR>c:@F at comment_to_html_conversion_24#</USR><Declaration>void comment_to_html_conversion_24()</Declaration><Abstract><Para> <rawHTML isSafeToPassThrough="1"><![CDATA[<br>]]></rawHTML><rawHTML isSafeToPassThrough="1"><![CDATA[<a href="http://example.com/">]]></rawHTML>Aaa<rawHTML isSafeToPassThrough="1"></a></rawHTML></Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_HTMLStartTag Name=[br])
-// CHECK-NEXT:         (CXComment_HTMLStartTag Name=[a] Attrs: href=http://example.com/)
-// CHECK-NEXT:         (CXComment_Text Text=[Aaa])
-// CHECK-NEXT:         (CXComment_HTMLEndTag Name=[a])))]
-
-/// \verbatim
-/// <a href="http://example.com/">Aaa</a>
-/// <a href='http://example.com/'>Aaa</a>
-/// \endverbatim
-void comment_to_html_conversion_25();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_25:{{.*}} FullCommentAsHTML=[<pre> <a href="http://example.com/">Aaa</a>\n <a href='http://example.com/'>Aaa</a></pre>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_25</Name><USR>c:@F at comment_to_html_conversion_25#</USR><Declaration>void comment_to_html_conversion_25()</Declaration><Discussion><Verbatim xml:space="preserve" kind="verbatim"> <a href="http://example.com/">Aaa</a>\n <a href='http://example.com/'>Aaa</a></Verbatim></Discussion></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_VerbatimBlockCommand CommandName=[verbatim]
-// CHECK-NEXT:         (CXComment_VerbatimBlockLine Text=[ <a href="http://example.com/">Aaa</a>])
-// CHECK-NEXT:         (CXComment_VerbatimBlockLine Text=[ <a href='http://example.com/'>Aaa</a>])))]
-
-/// \def foo_def
-/// \fn foo_fn
-/// \namespace foo_namespace
-/// \overload foo_overload
-/// \property foo_property
-/// \typedef foo_typedef
-/// \var foo_var
-/// \function foo_function
-/// \class foo_class
-/// \method foo_method
-/// \interface foo_interface
-/// Blah blah.
-void comment_to_html_conversion_26();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_26:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Blah blah.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_26</Name><USR>c:@F at comment_to_html_conversion_26#</USR><Declaration>void comment_to_html_conversion_26()</Declaration><Abstract><Para> Blah blah.</Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_VerbatimLine Text=[ foo_def])
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_VerbatimLine Text=[ foo_fn])
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_VerbatimLine Text=[ foo_namespace])
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_VerbatimLine Text=[ foo_overload])
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_VerbatimLine Text=[ foo_property])
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_VerbatimLine Text=[ foo_typedef])
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_VerbatimLine Text=[ foo_var])
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_VerbatimLine Text=[ foo_function])
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_VerbatimLine Text=[ foo_class])
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_VerbatimLine Text=[ foo_method])
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_VerbatimLine Text=[ foo_interface])
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Blah blah.])))]
-
-/// \unknown
-void comment_to_html_conversion_27();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_27:{{.*}} FullCommentAsHTML=[<p class="para-brief"> </p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_27</Name><USR>c:@F at comment_to_html_conversion_27#</USR><Declaration>void comment_to_html_conversion_27()</Declaration><Abstract><Para> </Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_InlineCommand CommandName=[unknown] RenderNormal)))]
-
-/// \b Aaa
-void comment_to_html_conversion_28();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_28:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <b>Aaa</b></p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_28</Name><USR>c:@F at comment_to_html_conversion_28#</USR><Declaration>void comment_to_html_conversion_28()</Declaration><Abstract><Para> <bold>Aaa</bold></Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_InlineCommand CommandName=[b] RenderBold Arg[0]=Aaa)))]
-
-/// \c Aaa \p Bbb
-void comment_to_html_conversion_29();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_29:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <tt>Aaa</tt> <tt>Bbb</tt></p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_29</Name><USR>c:@F at comment_to_html_conversion_29#</USR><Declaration>void comment_to_html_conversion_29()</Declaration><Abstract><Para> <monospaced>Aaa</monospaced> <monospaced>Bbb</monospaced></Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_InlineCommand CommandName=[c] RenderMonospaced Arg[0]=Aaa)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_InlineCommand CommandName=[p] RenderMonospaced Arg[0]=Bbb)))]
-
-/// \a Aaa \e Bbb \em Ccc
-void comment_to_html_conversion_30();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_30:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <em>Aaa</em> <em>Bbb</em> <em>Ccc</em></p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_30</Name><USR>c:@F at comment_to_html_conversion_30#</USR><Declaration>void comment_to_html_conversion_30()</Declaration><Abstract><Para> <emphasized>Aaa</emphasized> <emphasized>Bbb</emphasized> <emphasized>Ccc</emphasized></Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_InlineCommand CommandName=[a] RenderEmphasized Arg[0]=Aaa)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_InlineCommand CommandName=[e] RenderEmphasized Arg[0]=Bbb)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_InlineCommand CommandName=[em] RenderEmphasized Arg[0]=Ccc)))]
-
-/// \a 1<2 \e 3<4 \em 5<6 \param 7<8 aaa \tparam 9<10 bbb
-void comment_to_html_conversion_31();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_31:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <em>1<2</em> <em>3<4</em> <em>5<6</em> </p><dl><dt class="tparam-name-index-invalid">9<10</dt><dd class="tparam-descr-index-invalid"> bbb</dd></dl><dl><dt class="param-name-index-invalid">7<8</dt><dd class="param-descr-index-invalid"> aaa </dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_31</Name><USR>c:@F at comment_to_html_conversion_31#</USR><Declaration>void comment_to_html_conversion_31()</Declaration><Abstract><Para> <emphasized>1<2</emphasized> <emphasized>3<4</emphasized> <emphasized>5<6</emphasized> </Para></Abstract><TemplateParameters><Parameter><Name>9<10</Name><Discussion><Para> bbb</Para></Discussion></Parameter></TemplateParameters><Parameters><Parameter><Name>7<8</Name><Direction isExplicit="0">in</Direction><Discussion><Para> aaa </Para></Discussion></Parameter></Parameters></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_InlineCommand CommandName=[a] RenderEmphasized Arg[0]=1<2)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_InlineCommand CommandName=[e] RenderEmphasized Arg[0]=3<4)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_InlineCommand CommandName=[em] RenderEmphasized Arg[0]=5<6)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_ParamCommand in implicitly ParamName=[7<8] ParamIndex=Invalid
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ aaa ])))
-// CHECK-NEXT:       (CXComment_TParamCommand ParamName=[9<10] ParamPosition=Invalid
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ bbb]))))]
-
-/// \\ \@ \& \$ \# \< \> \% \" \. \::
-void comment_to_html_conversion_32();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_32:{{.*}} FullCommentAsHTML=[<p class="para-brief"> \ @ & $ # < > % " . ::</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_32</Name><USR>c:@F at comment_to_html_conversion_32#</USR><Declaration>void comment_to_html_conversion_32()</Declaration><Abstract><Para> \ @ & $ # < > % " . ::</Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[\])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[@])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[&])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[$])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[#])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[<])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[>])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[%])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=["])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[.])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[::])))]
-
-/// & < > " ' meow &#x6d;&#x65;&#x6F;&#X77;
-void comment_to_html_conversion_33();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_33:{{.*}} FullCommentAsHTML=[<p class="para-brief"> & < > " ' meow meow</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_33</Name><USR>c:@F at comment_to_html_conversion_33#</USR><Declaration>void comment_to_html_conversion_33()</Declaration><Abstract><Para> & < > " ' meow  meow</Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[&])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[<])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[>])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=["])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=['])
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[m])
-// CHECK-NEXT:         (CXComment_Text Text=[e])
-// CHECK-NEXT:         (CXComment_Text Text=[o])
-// CHECK-NEXT:         (CXComment_Text Text=[w])
-// CHECK-NEXT:         (CXComment_Text Text=[  ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[m])
-// CHECK-NEXT:         (CXComment_Text Text=[e])
-// CHECK-NEXT:         (CXComment_Text Text=[o])
-// CHECK-NEXT:         (CXComment_Text Text=[w])))]
-
-/// <em>0<i</em>
-void comment_to_html_conversion_34();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_34:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <em>0<i</em></p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_34</Name><USR>c:@F at comment_to_html_conversion_34#</USR><Declaration>void comment_to_html_conversion_34()</Declaration><Abstract><Para> <rawHTML isSafeToPassThrough="1"><![CDATA[<em>]]></rawHTML>0<i<rawHTML isSafeToPassThrough="1"></em></rawHTML></Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_HTMLStartTag Name=[em])
-// CHECK-NEXT:         (CXComment_Text Text=[0])
-// CHECK-NEXT:         (CXComment_Text Text=[<])
-// CHECK-NEXT:         (CXComment_Text Text=[i])
-// CHECK-NEXT:         (CXComment_HTMLEndTag Name=[em])))]
-
-// rdar://12392215
-/// © the copyright symbol
-/// ™ the trade mark symbol
-/// ® the registered trade mark symbol
-///   a non-breakable space.
-/// Δ Greek letter Delta Δ.
-/// Γ Greek letter Gamma Γ.
-void comment_to_html_conversion_35();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_35:{{.*}} FullCommentAsHTML=[<p class="para-brief"> © the copyright symbol ™ the trade mark symbol ® the registered trade mark symbol   a non-breakable space. Δ Greek letter Delta Δ. Γ Greek letter Gamma Γ.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_35</Name><USR>c:@F at comment_to_html_conversion_35#</USR><Declaration>void comment_to_html_conversion_35()</Declaration><Abstract><Para> © the copyright symbol ™ the trade mark symbol ® the registered trade mark symbol   a non-breakable space. Δ Greek letter Delta Δ. Γ Greek letter Gamma Γ.</Para></Abstract></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[©])
-// CHECK-NEXT:         (CXComment_Text Text=[ the copyright symbol] HasTrailingNewline)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[â„¢])
-// CHECK-NEXT:         (CXComment_Text Text=[ the trade mark symbol] HasTrailingNewline)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[®])
-// CHECK-NEXT:         (CXComment_Text Text=[ the registered trade mark symbol] HasTrailingNewline)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[ ])
-// CHECK-NEXT:         (CXComment_Text Text=[ a non-breakable space.] HasTrailingNewline)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[Δ])
-// CHECK-NEXT:         (CXComment_Text Text=[ Greek letter Delta Δ.] HasTrailingNewline)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=[Γ])
-// CHECK-NEXT:         (CXComment_Text Text=[ Greek letter Gamma Γ.])))]
-
-
-/// Aaa.
-class comment_to_xml_conversion_01 {
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>comment_to_xml_conversion_01</Name><USR>c:@C at comment_to_xml_conversion_01</USR><Declaration>class comment_to_xml_conversion_01 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
-
-  /// \param aaa Blah blah.
-  comment_to_xml_conversion_01(int aaa);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXConstructor=comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="3"><Name>comment_to_xml_conversion_01</Name><USR>c:@C at comment_to_xml_conversion_01@F at comment_to_xml_conversion_01#I#</USR><Declaration>comment_to_xml_conversion_01(int aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah.</Para></Discussion></Parameter></Parameters></Function>]
-
-  /// Aaa.
-  ~comment_to_xml_conversion_01();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXDestructor=~comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="3"><Name>~comment_to_xml_conversion_01</Name><USR>c:@C at comment_to_xml_conversion_01@F@~comment_to_xml_conversion_01#</USR><Declaration>~comment_to_xml_conversion_01()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
-
-  /// \param aaa Blah blah.
-  int comment_to_xml_conversion_02(int aaa);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: CXXMethod=comment_to_xml_conversion_02:{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_02</Name><USR>c:@C at comment_to_xml_conversion_01@F at comment_to_xml_conversion_02#I#</USR><Declaration>int comment_to_xml_conversion_02(int aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah.</Para></Discussion></Parameter></Parameters></Function>]
-
-  /// \param aaa Blah blah.
-  static int comment_to_xml_conversion_03(int aaa);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:14: CXXMethod=comment_to_xml_conversion_03:{{.*}} FullCommentAsXML=[<Function isClassMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="14"><Name>comment_to_xml_conversion_03</Name><USR>c:@C at comment_to_xml_conversion_01@F at comment_to_xml_conversion_03#I#S</USR><Declaration>static int comment_to_xml_conversion_03(int aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah.</Para></Discussion></Parameter></Parameters></Function>]
-
-  /// Aaa.
-  int comment_to_xml_conversion_04;
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: FieldDecl=comment_to_xml_conversion_04:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_04</Name><USR>c:@C at comment_to_xml_conversion_01@FI at comment_to_xml_conversion_04</USR><Declaration>int comment_to_xml_conversion_04</Declaration><Abstract><Para> Aaa.</Para></Abstract></Variable>]
-
-  /// Aaa.
-  static int comment_to_xml_conversion_05;
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:14: VarDecl=comment_to_xml_conversion_05:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="14"><Name>comment_to_xml_conversion_05</Name><USR>c:@C at comment_to_xml_conversion_01@comment_to_xml_conversion_05</USR><Declaration>static int comment_to_xml_conversion_05</Declaration><Abstract><Para> Aaa.</Para></Abstract></Variable>]
-
-  /// \param aaa Blah blah.
-  void operator()(int aaa);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:8: CXXMethod=operator():{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="8"><Name>operator()</Name><USR>c:@C at comment_to_xml_conversion_01@F at operator()#I#</USR><Declaration>void operator()(int aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah.</Para></Discussion></Parameter></Parameters></Function>]
-
-  /// Aaa.
-  operator bool();
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXConversion=operator bool:{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="3"><Name>operator bool</Name><USR>c:@C at comment_to_xml_conversion_01@F at operator bool#</USR><Declaration>operator bool()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
-
-  /// Aaa.
-  typedef int comment_to_xml_conversion_06;
-
-// USR is line-dependent here, so filter it with a regexp.
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-3]]:15: TypedefDecl=comment_to_xml_conversion_06:{{.*}} FullCommentAsXML=[<Typedef file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-3]]" column="15"><Name>comment_to_xml_conversion_06</Name><USR>{{[^<]+}}</USR><Declaration>typedef int comment_to_xml_conversion_06</Declaration><Abstract><Para> Aaa.</Para></Abstract></Typedef>]
-
-  /// Aaa.
-  using comment_to_xml_conversion_07 = int;
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:9: TypeAliasDecl=comment_to_xml_conversion_07:{{.*}} FullCommentAsXML=[<Typedef file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="9"><Name>comment_to_xml_conversion_07</Name><USR>c:@C at comment_to_xml_conversion_01@comment_to_xml_conversion_07</USR><Declaration>using comment_to_xml_conversion_07 = int</Declaration><Abstract><Para> Aaa.</Para></Abstract></Typedef>]
-
-  /// Aaa.
-  template<typename T, typename U>
-  class comment_to_xml_conversion_08 { };
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:9: ClassTemplate=comment_to_xml_conversion_08:{{.*}} FullCommentAsXML=[<Class templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="9"><Name>comment_to_xml_conversion_08</Name><USR>c:@C at comment_to_xml_conversion_01@CT>2#T#T at comment_to_xml_conversion_08</USR><Declaration>template <typename T, typename U> class comment_to_xml_conversion_08 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
-
-  /// Aaa.
-  template<typename T>
-  using comment_to_xml_conversion_09 = comment_to_xml_conversion_08<T, int>;
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: UnexposedDecl=comment_to_xml_conversion_09:{{.*}} FullCommentAsXML=[<Typedef file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="3"><Name>comment_to_xml_conversion_09</Name><USR>c:@C at comment_to_xml_conversion_01@comment_to_xml_conversion_09</USR><Declaration>template <typename T>\nusing comment_to_xml_conversion_09 = comment_to_xml_conversion_08<T, int></Declaration><Abstract><Para> Aaa.</Para></Abstract></Typedef>]
-};
-
-/// Aaa.
-template<typename T, typename U>
-void comment_to_xml_conversion_10(T aaa, U bbb);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=comment_to_xml_conversion_10:{{.*}} FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_xml_conversion_10</Name><USR>c:@FT@>2#T#Tcomment_to_xml_conversion_10#t0.0#t0.1#</USR><Declaration>template <typename T, typename U>\nvoid comment_to_xml_conversion_10(T aaa, U bbb)</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
-
-/// Aaa.
-template<>
-void comment_to_xml_conversion_10(int aaa, int bbb);
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_xml_conversion_10:{{.*}} FullCommentAsXML=[<Function templateKind="specialization" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_xml_conversion_10</Name><USR>c:@F at comment_to_xml_conversion_10<#I#I>#I#I#</USR><Declaration>void comment_to_xml_conversion_10(int aaa, int bbb)</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
-
-/// Aaa.
-template<typename T, typename U>
-class comment_to_xml_conversion_11 { };
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplate=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[<Class templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_11</Name><USR>c:@CT>2#T#T at comment_to_xml_conversion_11</USR><Declaration>template <typename T, typename U> class comment_to_xml_conversion_11 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
-
-/// Aaa.
-template<typename T>
-class comment_to_xml_conversion_11<T, int> { };
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplatePartialSpecialization=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[<Class templateKind="partialSpecialization" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_11</Name><USR>c:@CP>1#T at comment_to_xml_conversion_11>#t0.0#I</USR><Declaration>class comment_to_xml_conversion_11 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
-
-/// Aaa.
-template<>
-class comment_to_xml_conversion_11<int, int> { };
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassDecl=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[<Class templateKind="specialization" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_11</Name><USR>c:@C at comment_to_xml_conversion_11>#I#I</USR><Declaration>class comment_to_xml_conversion_11 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
-
-/// Aaa.
-int comment_to_xml_conversion_12;
-
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:5: VarDecl=comment_to_xml_conversion_12:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="5"><Name>comment_to_xml_conversion_12</Name><USR>c:@comment_to_xml_conversion_12</USR><Declaration>int comment_to_xml_conversion_12</Declaration><Abstract><Para> Aaa.</Para></Abstract></Variable>]
-
-/// Aaa.
-namespace comment_to_xml_conversion_13 {
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:11: Namespace=comment_to_xml_conversion_13:{{.*}} FullCommentAsXML=[<Namespace file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="11"><Name>comment_to_xml_conversion_13</Name><USR>c:@N at comment_to_xml_conversion_13</USR><Declaration>namespace comment_to_xml_conversion_13 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Namespace>]
-
-  /// Aaa.
-  namespace comment_to_xml_conversion_14 {
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:13: Namespace=comment_to_xml_conversion_14:{{.*}} FullCommentAsXML=[<Namespace file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="13"><Name>comment_to_xml_conversion_14</Name><USR>c:@N at comment_to_xml_conversion_13@N at comment_to_xml_conversion_14</USR><Declaration>namespace comment_to_xml_conversion_14 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Namespace>]
-  }
-}
-
-/// Aaa.
-enum comment_to_xml_conversion_15 {
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: EnumDecl=comment_to_xml_conversion_15:{{.*}} FullCommentAsXML=[<Enum file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_15</Name><USR>c:@E at comment_to_xml_conversion_15</USR><Declaration>enum comment_to_xml_conversion_15{{( : int)?}} {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Enum>]
-
-  /// Aaa.
-  comment_to_xml_conversion_16
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:3: EnumConstantDecl=comment_to_xml_conversion_16:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="3"><Name>comment_to_xml_conversion_16</Name><USR>c:@E at comment_to_xml_conversion_15@comment_to_xml_conversion_16</USR><Declaration>comment_to_xml_conversion_16</Declaration><Abstract><Para> Aaa.</Para></Abstract></Variable>]
-};
-
-/// Aaa.
-enum class comment_to_xml_conversion_17 {
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:12: EnumDecl=comment_to_xml_conversion_17:{{.*}} FullCommentAsXML=[<Enum file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="12"><Name>comment_to_xml_conversion_17</Name><USR>c:@E at comment_to_xml_conversion_17</USR><Declaration>enum class comment_to_xml_conversion_17 : int {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Enum>]
-
-  /// Aaa.
-  comment_to_xml_conversion_18
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:3: EnumConstantDecl=comment_to_xml_conversion_18:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="3"><Name>comment_to_xml_conversion_18</Name><USR>c:@E at comment_to_xml_conversion_17@comment_to_xml_conversion_18</USR><Declaration>comment_to_xml_conversion_18</Declaration><Abstract><Para> Aaa.</Para></Abstract></Variable>]
-};
-
-/// <a href="http://example.org/">
-void comment_to_xml_conversion_unsafe_html_01();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_01:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_01</Name><USR>c:@F at comment_to_xml_conversion_unsafe_html_01#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_01()</Declaration><Abstract><Para> <rawHTML><![CDATA[<a href="http://example.org/">]]></rawHTML></Para></Abstract></Function>]
-
-/// <a href="http://example.org/"><em>Aaa</em>
-void comment_to_xml_conversion_unsafe_html_02();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_02:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_02</Name><USR>c:@F at comment_to_xml_conversion_unsafe_html_02#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_02()</Declaration><Abstract><Para> <rawHTML><![CDATA[<a href="http://example.org/">]]></rawHTML><rawHTML isSafeToPassThrough="1"><![CDATA[<em>]]></rawHTML>Aaa<rawHTML isSafeToPassThrough="1"></em></rawHTML></Para></Abstract></Function>]
-
-/// <em>Aaa
-void comment_to_xml_conversion_unsafe_html_03();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_03:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_03</Name><USR>c:@F at comment_to_xml_conversion_unsafe_html_03#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_03()</Declaration><Abstract><Para> <rawHTML><![CDATA[<em>]]></rawHTML>Aaa</Para></Abstract></Function>]
-
-/// <em>Aaa</b></em>
-void comment_to_xml_conversion_unsafe_html_04();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_04:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_04</Name><USR>c:@F at comment_to_xml_conversion_unsafe_html_04#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_04()</Declaration><Abstract><Para> <rawHTML isSafeToPassThrough="1"><![CDATA[<em>]]></rawHTML>Aaa<rawHTML></b></rawHTML><rawHTML isSafeToPassThrough="1"></em></rawHTML></Para></Abstract></Function>]
-
-/// <em>Aaa</em></b>
-void comment_to_xml_conversion_unsafe_html_05();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_05:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_05</Name><USR>c:@F at comment_to_xml_conversion_unsafe_html_05#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_05()</Declaration><Abstract><Para> <rawHTML isSafeToPassThrough="1"><![CDATA[<em>]]></rawHTML>Aaa<rawHTML isSafeToPassThrough="1"></em></rawHTML><rawHTML></b></rawHTML></Para></Abstract></Function>]
-
-/// </table>
-void comment_to_xml_conversion_unsafe_html_06();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_06:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_06</Name><USR>c:@F at comment_to_xml_conversion_unsafe_html_06#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_06()</Declaration><Abstract><Para> <rawHTML></table></rawHTML></Para></Abstract></Function>]
-
-/// <div onclick="alert('meow');">Aaa</div>
-void comment_to_xml_conversion_unsafe_html_07();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_07:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_07</Name><USR>c:@F at comment_to_xml_conversion_unsafe_html_07#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_07()</Declaration><Abstract><Para> <rawHTML><![CDATA[<div onclick="alert('meow');">]]></rawHTML>Aaa<rawHTML></div></rawHTML></Para></Abstract></Function>]
-
-//===---
-// Check that we attach comments from the base class to derived classes if they don't have a comment.
-// rdar://13647476
-//===---
-
-/// BaseToSuper1_Base
-class BaseToSuper1_Base {};
-
-class BaseToSuper1_Derived : public BaseToSuper1_Base {};
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper1_Derived:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>BaseToSuper1_Base</Name><USR>c:@C at BaseToSuper1_Base</USR><Declaration>class BaseToSuper1_Derived : public BaseToSuper1_Base {}</Declaration><Abstract><Para> BaseToSuper1_Base</Para></Abstract></Class>]
-
-
-/// BaseToSuper2_Base
-class BaseToSuper2_Base {};
-
-/// BaseToSuper2_Derived
-class BaseToSuper2_Derived : public BaseToSuper2_Base {};
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper2_Derived:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>BaseToSuper2_Derived</Name><USR>c:@C at BaseToSuper2_Derived</USR><Declaration>class BaseToSuper2_Derived : public BaseToSuper2_Base {}</Declaration><Abstract><Para> BaseToSuper2_Derived</Para></Abstract></Class>]
-
-class BaseToSuper2_MoreDerived : public BaseToSuper2_Derived {};
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper2_MoreDerived:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>BaseToSuper2_Derived</Name><USR>c:@C at BaseToSuper2_Derived</USR><Declaration>class BaseToSuper2_MoreDerived : public BaseToSuper2_Derived {}</Declaration><Abstract><Para> BaseToSuper2_Derived</Para></Abstract></Class>]
-
-
-/// BaseToSuper3_Base
-class BaseToSuper3_Base {};
-
-class BaseToSuper3_DerivedA : public virtual BaseToSuper3_Base {};
-
-class BaseToSuper3_DerivedB : public virtual BaseToSuper3_Base {};
-
-class BaseToSuper3_MoreDerived : public BaseToSuper3_DerivedA, public BaseToSuper3_DerivedB {};
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper3_MoreDerived:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>BaseToSuper3_Base</Name><USR>c:@C at BaseToSuper3_Base</USR><Declaration>class BaseToSuper3_MoreDerived : public BaseToSuper3_DerivedA,\n                                 public BaseToSuper3_DerivedB {}</Declaration><Abstract><Para> BaseToSuper3_Base</Para></Abstract></Class>]
-
-
-// Check that we propagate comments only through public inheritance.
-
-/// BaseToSuper4_Base
-class BaseToSuper4_Base {};
-
-/// BaseToSuper4_DerivedA
-class BaseToSuper4_DerivedA : virtual BaseToSuper4_Base {};
-
-class BaseToSuper4_DerivedB : public virtual BaseToSuper4_Base {};
-
-class BaseToSuper4_MoreDerived : BaseToSuper4_DerivedA, public BaseToSuper4_DerivedB {};
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper4_MoreDerived:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>BaseToSuper4_Base</Name><USR>c:@C at BaseToSuper4_Base</USR><Declaration>class BaseToSuper4_MoreDerived : BaseToSuper4_DerivedA,\n                                 public BaseToSuper4_DerivedB {}</Declaration><Abstract><Para> BaseToSuper4_Base</Para></Abstract></Class>]
-
-//===---
-// Check the representation of \todo in XML.
-//===---
-
-/// Aaa.
-/// \todo Bbb.
-void comment_to_xml_conversion_todo_1();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_todo_1:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_todo_1</Name><USR>c:@F at comment_to_xml_conversion_todo_1#</USR><Declaration>void comment_to_xml_conversion_todo_1()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para kind="todo"> Bbb.</Para></Discussion></Function>]
-
-/// Aaa.
-/// \todo Bbb.
-///
-/// Ccc.
-void comment_to_xml_conversion_todo_2();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_todo_2:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_todo_2</Name><USR>c:@F at comment_to_xml_conversion_todo_2#</USR><Declaration>void comment_to_xml_conversion_todo_2()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para kind="todo"> Bbb.</Para><Para> Ccc.</Para></Discussion></Function>]
-
-/// Aaa.
-/// \todo Bbb.
-///
-/// Ccc.
-/// \todo Ddd.
-void comment_to_xml_conversion_todo_3();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_todo_3:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_todo_3</Name><USR>c:@F at comment_to_xml_conversion_todo_3#</USR><Declaration>void comment_to_xml_conversion_todo_3()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para kind="todo"> Bbb.</Para><Para> Ccc. </Para><Para kind="todo"> Ddd.</Para></Discussion></Function>]
-
-/// Aaa.
-/// \todo Bbb.
-/// \todo Ccc.
-void comment_to_xml_conversion_todo_4();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_todo_4:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_todo_4</Name><USR>c:@F at comment_to_xml_conversion_todo_4#</USR><Declaration>void comment_to_xml_conversion_todo_4()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para kind="todo"> Bbb. </Para><Para kind="todo"> Ccc.</Para></Discussion></Function>]
-
-
-//===---
-// Test the representation of exception specifications in AST and XML.
-//===---
-
-/// Aaa.
-/// \throws Bbb.
-void comment_to_xml_conversion_exceptions_1();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_exceptions_1:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_exceptions_1</Name><USR>c:@F at comment_to_xml_conversion_exceptions_1#</USR><Declaration>void comment_to_xml_conversion_exceptions_1()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Exceptions><Para> Bbb.</Para></Exceptions></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[throws]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.]))))]
-
-/// Aaa.
-/// \throw Bbb.
-void comment_to_xml_conversion_exceptions_2();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_exceptions_2:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_exceptions_2</Name><USR>c:@F at comment_to_xml_conversion_exceptions_2#</USR><Declaration>void comment_to_xml_conversion_exceptions_2()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Exceptions><Para> Bbb.</Para></Exceptions></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[throw]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.]))))]
-
-/// Aaa.
-/// \exception Bbb.
-void comment_to_xml_conversion_exceptions_3();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_exceptions_3:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_exceptions_3</Name><USR>c:@F at comment_to_xml_conversion_exceptions_3#</USR><Declaration>void comment_to_xml_conversion_exceptions_3()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Exceptions><Para> Bbb.</Para></Exceptions></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[exception]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.]))))]
-
-/// Aaa.
-/// \throws Bbb.
-/// \throws Ccc.
-/// \throws Ddd.
-void comment_to_xml_conversion_exceptions_4();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_exceptions_4:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_exceptions_4</Name><USR>c:@F at comment_to_xml_conversion_exceptions_4#</USR><Declaration>void comment_to_xml_conversion_exceptions_4()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Exceptions><Para> Bbb. </Para><Para> Ccc. </Para><Para> Ddd.</Para></Exceptions></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[throws]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[throws]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Ccc.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[throws]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Ddd.]))))]
-
-/// Aaa.
-/// \throws Bbb.
-/// \throw Ccc.
-void comment_to_xml_conversion_exceptions_5();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_exceptions_5:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_exceptions_5</Name><USR>c:@F at comment_to_xml_conversion_exceptions_5#</USR><Declaration>void comment_to_xml_conversion_exceptions_5()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Exceptions><Para> Bbb. </Para><Para> Ccc.</Para></Exceptions></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
-// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[throws]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Bbb.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[ ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[throw]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Ccc.]))))]
-
-#endif
-
diff --git a/test/Index/comment-unqualified-objc-pointer.m b/test/Index/comment-unqualified-objc-pointer.m
deleted file mode 100644
index e9e1cee..0000000
--- a/test/Index/comment-unqualified-objc-pointer.m
+++ /dev/null
@@ -1,36 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 -fobjc-arc %s > %t/out
-// RUN: FileCheck %s < %t/out
-// rdar://13757500
-
- at class NSString;
-
- at interface NSArray @end
-
- at interface NSMutableArray : NSArray 
-{
-//! This is the name.
-  NSString *Name;
-}
-//! This is WithLabel comment.
-- (NSString *)WithLabel:(NSString * const)label;
-// CHECK: <Declaration>- (NSString *)WithLabel:(NSString *const)label;</Declaration> 
-
-//! This is a property to get the Name.
- at property (copy) NSString *Name;
-// CHECK: <Declaration>@property(readwrite, copy, atomic) NSString *Name;</Declaration>
- at end
-
- at implementation NSMutableArray
-{
-//! This is private ivar
-  NSString *NickName;
-// CHECK: <Declaration>NSString *NickName</Declaration>
-}
-
-- (NSString *)WithLabel:(NSString * const)label {
-    return 0;
-}
- at synthesize Name = Name;
- at end
diff --git a/test/Index/comment-with-preamble.c b/test/Index/comment-with-preamble.c
deleted file mode 100644
index 72e6140..0000000
--- a/test/Index/comment-with-preamble.c
+++ /dev/null
@@ -1,13 +0,0 @@
-// Make sure the preable does not truncate comments.
-
-#ifndef BAZ
-#define BAZ 3
-#endif
-
-//! Foo’s description.
-void Foo();
-
-// RUN: c-index-test -test-load-source-reparse 1 local %s | FileCheck %s
-// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 1 local %s | FileCheck %s
-
-// CHECK: FunctionDecl=Foo:8:6 RawComment=[//! Foo’s description.] RawCommentRange=[7:1 - 7:25] BriefComment=[Foo’s description.]
diff --git a/test/Index/comment-xml-schema.c b/test/Index/comment-xml-schema.c
deleted file mode 100644
index 37cb47c..0000000
--- a/test/Index/comment-xml-schema.c
+++ /dev/null
@@ -1,55 +0,0 @@
-// REQUIRES: xmllint
-
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-other-01.xml
-//
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-01.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-02.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-03.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-04.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-05.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-06.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-07.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-08.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-09.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-10.xml
-//
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-availability-attr-01.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-availability-attr-02.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-deprecated-attr.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-unavailable-attr.xml
-//
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-class-01.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-class-02.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-class-03.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-class-04.xml
-//
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-variable-01.xml
-//
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-namespace-01.xml
-//
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-typedef-01.xml
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-typedef-02.xml
-//
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-enum-01.xml
-//
-// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-para-kind-01.xml
-
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-01.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-02.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-03.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-04.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-05.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-06.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-07.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-08.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-09.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-10.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-11.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-12.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-13.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-//
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-para-kind-01.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-para-kind-02.xml 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID
-
-// CHECK-INVALID: fails to validate
-
diff --git a/test/Index/complete-documentation-properties.m b/test/Index/complete-documentation-properties.m
deleted file mode 100644
index 21ddf80..0000000
--- a/test/Index/complete-documentation-properties.m
+++ /dev/null
@@ -1,92 +0,0 @@
-// Note: the run lines follow their respective tests, since line/column numbers
-// matter in this test.
-// This test is for when property accessors do not have their own code 
-// completion comments. Use those in their properties in this case. 
-// rdar://12791315
-
- at interface AppDelegate
-/**
-  \brief This is ReadonlyProperty
-*/
- at property (readonly, getter = ReadonlyGetter) id MyProperty;
-
-/**
-  \brief This is GeneralProperty
-*/
- at property int GeneralProperty;
-
-/**
-  \brief This is PropertyInPrimaryClass
-*/
- at property (copy, nonatomic) id PropertyInPrimaryClass;
-
-- (void) setThisRecord : (id)arg;
-- (id) Record;
- at end
-
-
- at interface AppDelegate()
-- (id) GetterInClassExtension;
-/**
-  \brief This is Record
-*/
- at property (copy, setter = setThisRecord:) id Record;
- at end
-
- at interface AppDelegate()
-/**
-  \brief This is PropertyInClassExtension
-*/
- at property (copy, getter = GetterInClassExtension) id PropertyInClassExtension;
-
-- (id) PropertyInPrimaryClass;
- at end
-  
- at implementation AppDelegate
-- (id) PropertyInPrimaryClass { 
-  id p = [self ReadonlyGetter];
-  p = [self GetterInClassExtension];
-  p = [self PropertyInPrimaryClass];
-  p = [self Record];
-  [self setThisRecord : (id)0 ];
-  p = self.GetterInClassExtension;
-  return 0; 
-}
- at end
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:47:16 %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: {TypedText ReadonlyGetter}{{.*}}(brief comment: This is ReadonlyProperty)
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:48:13 %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: {TypedText GetterInClassExtension}{{.*}}(brief comment: This is PropertyInClassExtension) 
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:49:13 %s | FileCheck -check-prefix=CHECK-CC3 %s
-// CHECK-CC3: {TypedText PropertyInPrimaryClass}{{.*}}(brief comment: This is PropertyInPrimaryClass)
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:50:13 %s | FileCheck -check-prefix=CHECK-CC4 %s
-// CHECK-CC4: {TypedText Record}{{.*}}(brief comment: This is Record)
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:51:9 %s | FileCheck -check-prefix=CHECK-CC5 %s
-// CHECK-CC5: {TypedText setThisRecord:}{Placeholder (id)}{{.*}}(brief comment: This is Record)
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:52:12 %s | FileCheck -check-prefix=CHECK-CC6 %s
-// CHECK-CC6: {TypedText GetterInClassExtension}{{.*}}(brief comment: This is PropertyInClassExtension) 
-
- at interface AnotherAppDelegate
-/**
-  \brief This is ReadonlyProperty
-*/
- at property (getter = ReadonlyGetter) int MyProperty;
-/**
-  \brief This is getter = ReadonlyGetter
-*/
-- (int) ReadonlyGetter;
- at end
-
- at implementation AnotherAppDelegate
-- (int) PropertyInPrimaryClass { 
-self.ReadonlyGetter;
-}
- at end
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:87:6 %s | FileCheck -check-prefix=CHECK-CC7 %s
-// CHECK-CC7: {TypedText ReadonlyGetter}{{.*}}(brief comment: This is getter = ReadonlyGetter) 
-
diff --git a/test/Index/complete-documentation-templates.cpp b/test/Index/complete-documentation-templates.cpp
deleted file mode 100644
index ca24bc3..0000000
--- a/test/Index/complete-documentation-templates.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-// Note: the run lines follow their respective tests, since line/column numbers
-// matter in this test.
-
-/// This is T1.
-template<typename T>
-void T1(T t) { }
-
-/// This is T2.
-template<typename T>
-void T2(T t) { }
-
-/// This is T2<int>.
-template<>
-void T2(int t) { }
-
-void test_CC1() {
-
-}
-
-// Check that implicit instantiations of class templates and members pick up
-// comments from class templates and specializations.
-
-/// This is T3.
-template<typename T>
-class T3 {
-public:
-  /// This is T4.
-  static void T4();
-
-  /// This is T5.
-  static int T5;
-
-  /// This is T6.
-  void T6();
-
-  /// This is T7.
-  int T7;
-
-  /// This is T8.
-  class T8 {};
-
-  /// This is T9.
-  enum T9 {
-    /// This is T10.
-    T10
-  };
-
-  /// This is T11.
-  template<typename U>
-  void T11(U t) {}
-
-  typedef T3<double> T12;
-};
-
-void test_CC2_CC3_CC4() {
-  T3<int>::T4();
-  T3<int> t3;
-  t3.T6();
-  T3<int>::T8 t8;
-}
-
-/// This is T100.
-template<typename T, typename U>
-class T100 {
-};
-
-/// This is T100<int, T>.
-template<typename T>
-class T100<int, T> {
-public:
-  /// This is T101.
-  static void T101();
-
-  /// This is T102.
-  static int T102;
-
-  /// This is T103.
-  void T103();
-
-  /// This is T104.
-  int T104;
-
-  /// This is T105.
-  class T105 {};
-
-  /// This is T106.
-  enum T106 {
-    /// This is T107.
-    T107
-  };
-
-  /// This is T108.
-  template<typename U>
-  void T108(U t) {}
-
-  typedef T100<double, T> T109;
-
-  typedef T100<double, double> T110;
-};
-
-void test_CC5_CC6_CC7() {
-  T100<int, long>::T101();
-  T100<int, long> t100;
-  t100.T103();
-  T100<int, long>::T105 t105;
-}
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:17:1 %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: FunctionTemplate:{ResultType void}{TypedText T1}{{.*}}(brief comment: This is T1.)
-// CHECK-CC1: FunctionTemplate:{ResultType void}{TypedText T2}{{.*}}(brief comment: This is T2.)
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:56:12 %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: CXXMethod:{ResultType void}{TypedText T4}{{.*}}(brief comment: This is T4.)
-// CHECK-CC2: VarDecl:{ResultType int}{TypedText T5}{{.*}}(brief comment: This is T5.)
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:58:6 %s | FileCheck -check-prefix=CHECK-CC3 %s
-// CHECK-CC3: FunctionTemplate:{ResultType void}{TypedText T11}{{.*}}(brief comment: This is T11.)
-// CHECK-CC3: CXXMethod:{ResultType void}{TypedText T6}{{.*}}(brief comment: This is T6.)
-// CHECK-CC3: FieldDecl:{ResultType int}{TypedText T7}{{.*}}(brief comment: This is T7.)
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:59:12 %s | FileCheck -check-prefix=CHECK-CC4 %s
-// CHECK-CC4: EnumConstantDecl:{ResultType T3<int>::T9}{TypedText T10}{{.*}}(brief comment: This is T10.)
-// FIXME: after we implement propagating comments through typedefs, this
-// typedef for implicit instantiation should pick up the documentation
-// comment from class template.
-// CHECK-CC4: TypedefDecl:{TypedText T12}
-// CHECK-CC4-SHOULD-BE: TypedefDecl:{TypedText T12}{{.*}}(brief comment: This is T3.)
-// CHECK-CC4: ClassDecl:{TypedText T8}{{.*}}(brief comment: This is T8.)
-// CHECK-CC4: EnumDecl:{TypedText T9}{{.*}}(brief comment: This is T9.)
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:102:20 %s | FileCheck -check-prefix=CHECK-CC5 %s
-// CHECK-CC5: CXXMethod:{ResultType void}{TypedText T101}{{.*}}(brief comment: This is T101.)
-// CHECK-CC5: VarDecl:{ResultType int}{TypedText T102}{{.*}}(brief comment: This is T102.)
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:104:8 %s | FileCheck -check-prefix=CHECK-CC6 %s
-// CHECK-CC6: CXXMethod:{ResultType void}{TypedText T103}{{.*}}(brief comment: This is T103.)
-// CHECK-CC6: FieldDecl:{ResultType int}{TypedText T104}{{.*}}(brief comment: This is T104.)
-// CHECK-CC6: FunctionTemplate:{ResultType void}{TypedText T108}{{.*}}(brief comment: This is T108.)
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:105:20 %s | FileCheck -check-prefix=CHECK-CC7 %s
-// CHECK-CC7: ClassDecl:{TypedText T105}{{.*}}(brief comment: This is T105.)
-// CHECK-CC7: EnumDecl:{TypedText T106}{{.*}}(brief comment: This is T106.)
-// CHECK-CC7: EnumConstantDecl:{ResultType T100<int, long>::T106}{TypedText T107}{{.*}}(brief comment: This is T107.)
-// FIXME: after we implement propagating comments through typedefs, these two
-// typedefs for implicit instantiations should pick up the documentation
-// comment from class template.
-// CHECK-CC7: TypedefDecl:{TypedText T109}
-// CHECK-CC7: TypedefDecl:{TypedText T110}
-// CHECK-CC7-SHOULD-BE: TypedefDecl:{TypedText T109}{{.*}}(brief comment: This is T100.)
-// CHECK-CC7-SHOULD-BE: TypedefDecl:{TypedText T110}{{.*}}(brief comment: This is T100.)
-
diff --git a/test/Index/complete-documentation.cpp b/test/Index/complete-documentation.cpp
deleted file mode 100644
index 553660a..0000000
--- a/test/Index/complete-documentation.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// Note: the run lines follow their respective tests, since line/column
-// matter in this test.
-
-/// Aaa.
-void T1(float x, float y);
-
-/// Bbb.
-class T2 {
-public:
-  /// Ccc.
-  void T3();
-
-  int T4; ///< Ddd.
-};
-
-/// Eee.
-namespace T5 {
-}
-
-struct T6 {
- /// \brief Fff.
- void T7();
-
- /// \brief Ggg.
- void T8();
-};
-
-void T6::T7() {
-}
-
-void test1() {
-
-  T2 t2;
-  t2.T4;
-
-  T6 t6;
-  t6.T8();
-}
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:32:1 %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: FunctionDecl:{ResultType void}{TypedText T1}{{.*}}(brief comment: Aaa.)
-// CHECK-CC1: ClassDecl:{TypedText T2}{{.*}}(brief comment: Bbb.)
-// CHECK-CC1: Namespace:{TypedText T5}{{.*}}(brief comment: Eee.)
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:34:6 %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: CXXMethod:{ResultType void}{TypedText T3}{{.*}}(brief comment: Ccc.)
-// CHECK-CC2: FieldDecl:{ResultType int}{TypedText T4}{{.*}}(brief comment: Ddd.)
-
-// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:37:6 %s | FileCheck -check-prefix=CHECK-CC3 %s
-// CHECK-CC3: CXXMethod:{ResultType void}{TypedText T7}{LeftParen (}{RightParen )} (34)(brief comment: Fff.)
-// CHECK-CC3: CXXMethod:{ResultType void}{TypedText T8}{LeftParen (}{RightParen )} (34)(brief comment: Ggg.)
diff --git a/test/Index/format-comment-cdecls.c b/test/Index/format-comment-cdecls.c
deleted file mode 100644
index 471be2b..0000000
--- a/test/Index/format-comment-cdecls.c
+++ /dev/null
@@ -1,99 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 %s \ 
-// RUN: | FileCheck %s 
-
-/**
- * \brief Aaa.
-*/
-int global_function();
-// CHECK: <Declaration>int global_function()</Declaration>
-
-/**
- * \param x1 Aaa.
-*/
-extern void external_function(int x1);
-// CHECK: <Declaration>extern void external_function(int x1)</Declaration>
-
-/**
- * \brief global variable;
-*/
-int global_variable;
-// CHECK: <Declaration>int global_variable</Declaration>
-
-/**
- * \brief local variable;
-*/
-static int static_variable;
-// CHECK: <Declaration>static int static_variable</Declaration>
-
-/**
- * \brief external variable
-*/
-extern int external_variable;
-// CHECK: <Declaration>extern int external_variable</Declaration>
-
-int global_function() {
-  /**
-   * \brief a local variable
-  */
-  int local = 10;
-  return local;
-}
-// CHECK: <Declaration>int global_function()</Declaration>
-// CHECK: <Declaration>int local = 10</Declaration>
-
-/**
- * \brief initialized decl.
-*/
-int initialized_global = 100;
-// CHECK: <Declaration>int initialized_global = 100</Declaration>
-
-/**
- * \brief typedef example
-*/
-typedef int INT_T;
-// CHECK: <Declaration>typedef int INT_T</Declaration>
-
-/**
- * \brief aggregate type example
-*/
-struct S {
-/**
- * \brief iS1;
-*/
-  int iS1;
-/**
- * \brief dS1;
-*/
-  double dS1;
-};
-// CHECK: <Declaration>struct S {}</Declaration>
-// CHECK: <Declaration>int iS1</Declaration>
-// CHECK: <Declaration>double dS1</Declaration>
-
-/**
- * \brief enum e;
-*/
-enum e {
-  One,
-/**
- * \brief Two;
-*/
-  Two,
-  Three
-};
-// CHECK: <Declaration>enum e {}</Declaration>
-// CHECK: <Declaration>Two</Declaration>
-
-/**
- *\brief block declaration
-*/
-int (^Block) (int i, int j);
-// CHECK: <Declaration>int (^Block)(int, int)</Declaration>
-
-/**
- *\brief block declaration
-*/
-int (^Block1) (int i, int j) = ^(int i, int j) { return i + j; };
-// CHECK: <Declaration>int (^Block1)(int, int) = ^(int i, int j) {}</Declaration>
diff --git a/test/Index/headerfile-comment-to-html.m b/test/Index/headerfile-comment-to-html.m
deleted file mode 100644
index 8326a90..0000000
--- a/test/Index/headerfile-comment-to-html.m
+++ /dev/null
@@ -1,111 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out
-// RUN: FileCheck %s < %t/out
-// rdar://13067629
-
-// Ensure that XML we generate is not invalid.
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out
-// WRONG-NOT: CommentXMLInvalid
-
-// rdar://12397511
-
-/*!
-     \headerfile Device.h <Foundation/Device.h>
-
-      A Device represents a remote or local computer or device with which the Developer Tools can interact.  Each Device supports blah blah blah from doing blah blah blah.
-*/
- at interface Device
- at end
-// CHECK: headerfile-comment-to-html.m:[[@LINE-2]]:12: ObjCInterfaceDecl=Device:{{.*}} FullCommentAsXML=[<Other file="{{[^"]+}}headerfile-comment-to-html.m" line="[[@LINE-2]]" column="12"><Name>Device</Name><USR>c:objc(cs)Device</USR><Headerfile><Para> Device.h <Foundation/Device.h></Para></Headerfile><Declaration>@interface Device\n at end</Declaration><Abstract><Para>      A Device represents a remote or local computer or device with which the Developer Tools can interact.  Each Device supports blah blah blah from doing blah blah blah.</Para></Abstract></Other>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[     ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[headerfile]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Device.h ])
-// CHECK-NEXT:           (CXComment_Text Text=[<Foundation])
-// CHECK-NEXT:           (CXComment_Text Text=[/Device.h>])))
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[      A Device represents a remote or local computer or device with which the Developer Tools can interact.  Each Device supports blah blah blah from doing blah blah blah.])))]
-
-/*!
-    \headerfile Sensor.h "Sensor.h"
-
-    \brief This is Sensor on the Device.
-    Its purpose is not to Sense Device's heat.
-*/
-
- at interface Sensor
- at end
-// CHECK: headerfile-comment-to-html.m:[[@LINE-2]]:12: ObjCInterfaceDecl=Sensor:{{.*}} FullCommentAsXML=[<Other file="{{[^"]+}}headerfile-comment-to-html.m" line="[[@LINE-2]]" column="12"><Name>Sensor</Name><USR>c:objc(cs)Sensor</USR><Headerfile><Para> Sensor.h "Sensor.h"</Para></Headerfile><Declaration>@interface Sensor\n at end</Declaration><Abstract><Para> This is Sensor on the Device.    Its purpose is not to Sense Device's heat.</Para></Abstract></Other>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[    ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[headerfile]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Sensor.h "Sensor.h"])))
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[    ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[brief]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ This is Sensor on the Device.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[    Its purpose is not to Sense Device's heat.]))))]
-
-/*!
-    \brief Test that headerfile can come after brief.
-    \headerfile VTDevice.h <VTFoundation/VTDevice.h>
-
-    More property decription goes here.
-*/
- at interface VTDevice : Device
- at end
-// CHECK: headerfile-comment-to-html.m:[[@LINE-2]]:12: ObjCInterfaceDecl=VTDevice:{{.*}} FullCommentAsXML=[<Other file="{{[^"]+}}headerfile-comment-to-html.m" line="[[@LINE-2]]" column="12"><Name>VTDevice</Name><USR>c:objc(cs)VTDevice</USR><Headerfile><Para> VTDevice.h <VTFoundation/VTDevice.h></Para></Headerfile><Declaration>@interface VTDevice : Device\n at end</Declaration><Abstract><Para> Test that headerfile can come after brief.    </Para></Abstract><Discussion><Para>    More property decription goes here.</Para></Discussion></Other>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[    ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[brief]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ Test that headerfile can come after brief.] HasTrailingNewline)
-// CHECK-NEXT:           (CXComment_Text Text=[    ] IsWhitespace)))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[headerfile]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[ VTDevice.h ])
-// CHECK-NEXT:           (CXComment_Text Text=[<VTFoundation])
-// CHECK-NEXT:           (CXComment_Text Text=[/VTDevice.h>])))
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[    More property decription goes here.])))]
-
-/*!
-  \headerfile  <stdio.h>
-*/
-extern void uses_stdio_h();
-// CHECK: headerfile-comment-to-html.m:[[@LINE-1]]:13: FunctionDecl=uses_stdio_h:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}headerfile-comment-to-html.m" line="[[@LINE-1]]" column="13"><Name>uses_stdio_h</Name><USR>c:@F at uses_stdio_h</USR><Headerfile><Para>  <stdio.h></Para></Headerfile><Declaration>extern void uses_stdio_h()</Declaration></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[  ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[headerfile]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[  ] IsWhitespace)
-// CHECK-NEXT:           (CXComment_Text Text=[<stdio])
-// CHECK-NEXT:           (CXComment_Text Text=[.h>]))))]
-
-
-/*!
-  \headerfile  <algorithm>
-*/
-extern void uses_argorithm();
-// CHECK: headerfile-comment-to-html.m:[[@LINE-1]]:13: FunctionDecl=uses_argorithm:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}headerfile-comment-to-html.m" line="[[@LINE-1]]" column="13"><Name>uses_argorithm</Name><USR>c:@F at uses_argorithm</USR><Headerfile><Para>  <algorithm></Para></Headerfile><Declaration>extern void uses_argorithm()</Declaration></Function>]
-// CHECK-NEXT:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace
-// CHECK-NEXT:         (CXComment_Text Text=[  ] IsWhitespace))
-// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[headerfile]
-// CHECK-NEXT:         (CXComment_Paragraph
-// CHECK-NEXT:           (CXComment_Text Text=[  ] IsWhitespace)
-// CHECK-NEXT:           (CXComment_Text Text=[<algorithm])
-// CHECK-NEXT:           (CXComment_Text Text=[>]))))]
diff --git a/test/Index/overriding-ftemplate-comments.cpp b/test/Index/overriding-ftemplate-comments.cpp
deleted file mode 100644
index 0bc3c2f..0000000
--- a/test/Index/overriding-ftemplate-comments.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out
-// RUN: FileCheck %s < %t/out
-// Test to search overridden methods for documentation when overriding method has none. rdar://12378793
-
-// Ensure that XML we generate is not invalid.
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out
-// WRONG-NOT: CommentXMLInvalid
-
-/// \tparam
-/// \param AAA Blah blah
-template<typename T>
-void comment_to_html_conversion_17(T AAA);
-
-// CHECK: FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-ftemplate-comments.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_17</Name><USR>c:@FT@>1#Tcomment_to_html_conversion_17#t0.0#</USR><Declaration>template <typename T> void comment_to_html_conversion_17(T AAA)</Declaration><Parameters><Parameter><Name>AAA</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah</Para></Discussion></Parameter></Parameters></Function>]
-
-template<typename T>
-void comment_to_html_conversion_17(T PPP);
-
-// CHECK: FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-ftemplate-comments.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_17</Name><USR>c:@FT@>1#Tcomment_to_html_conversion_17#t0.0#</USR><Declaration>template <typename T> void comment_to_html_conversion_17(T PPP)</Declaration><Parameters><Parameter><Name>PPP</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah</Para></Discussion></Parameter></Parameters></Function>]
-
-//===----------------------------------------------------------------------===//
-
-/// \tparam BBB Bbb
-/// \tparam AAA Aaa
-template<typename AAA, typename BBB>
-void comment_to_html_conversion_19(AAA aaa, BBB bbb);
-
-// CHECK: FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-ftemplate-comments.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_19</Name><USR>c:@FT@>2#T#Tcomment_to_html_conversion_19#t0.0#t0.1#</USR><Declaration>template <typename AAA, typename BBB>\nvoid comment_to_html_conversion_19(AAA aaa, BBB bbb)</Declaration><TemplateParameters><Parameter><Name>AAA</Name><Index>0</Index><Discussion><Para> Aaa</Para></Discussion></Parameter><Parameter><Name>BBB</Name><Index>1</Index><Discussion><Para> Bbb </Para></Discussion></Parameter></TemplateParameters></Function>]
-
-template<typename PPP, typename QQQ>
-void comment_to_html_conversion_19(PPP aaa, QQQ bbb);
-
-// CHECK: FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-ftemplate-comments.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_19</Name><USR>c:@FT@>2#T#Tcomment_to_html_conversion_19#t0.0#t0.1#</USR><Declaration>template <typename PPP, typename QQQ>\nvoid comment_to_html_conversion_19(PPP aaa, QQQ bbb)</Declaration><TemplateParameters><Parameter><Name>PPP</Name><Index>0</Index><Discussion><Para> Aaa</Para></Discussion></Parameter><Parameter><Name>QQQ</Name><Index>1</Index><Discussion><Para> Bbb </Para></Discussion></Parameter></TemplateParameters></Function>]
-
-//===----------------------------------------------------------------------===//
-
-/// \tparam BBB Bbb
-/// \tparam UUU Zzz
-/// \tparam CCC Ccc
-/// \tparam AAA Aaa
-template<typename AAA, typename BBB, int CCC>
-void comment_to_html_conversion_20(AAA aaa, BBB bbb);
-
-// CHECK: FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-ftemplate-comments.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_20</Name><USR>c:@FT@>3#T#T#NIcomment_to_html_conversion_20#t0.0#t0.1#</USR><Declaration>template <typename AAA, typename BBB, int CCC>\nvoid comment_to_html_conversion_20(AAA aaa, BBB bbb)</Declaration><TemplateParameters><Parameter><Name>AAA</Name><Index>0</Index><Discussion><Para> Aaa</Para></Discussion></Parameter><Parameter><Name>BBB</Name><Index>1</Index><Discussion><Para> Bbb </Para></Discussion></Parameter><Parameter><Name>CCC</Name><Index>2</Index><Discussion><Para> Ccc </Para></Discussion></Parameter><Parameter><Name>UUU</Name><Discussion><Para> Zzz </Para></Discussion></Parameter></TemplateParameters></Function>]
-
-template<typename PPP, typename QQQ, int RRR>
-void comment_to_html_conversion_20(PPP aaa, QQQ bbb);
-
-// CHECK: FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-ftemplate-comments.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_20</Name><USR>c:@FT@>3#T#T#NIcomment_to_html_conversion_20#t0.0#t0.1#</USR><Declaration>template <typename PPP, typename QQQ, int RRR>\nvoid comment_to_html_conversion_20(PPP aaa, QQQ bbb)</Declaration><TemplateParameters><Parameter><Name>PPP</Name><Index>0</Index><Discussion><Para> Aaa</Para></Discussion></Parameter><Parameter><Name>QQQ</Name><Index>1</Index><Discussion><Para> Bbb </Para></Discussion></Parameter><Parameter><Name>RRR</Name><Index>2</Index><Discussion><Para> Ccc </Para></Discussion></Parameter><Parameter><Name>UUU</Name><Discussion><Para> Zzz </Para></Discussion></Parameter></TemplateParameters></Function>]
-
-//===----------------------------------------------------------------------===//
-
-/// \tparam AAA Aaa
-/// \tparam BBB Bbb
-/// \tparam CCC Ccc
-/// \tparam DDD Ddd
-template<template<template<typename CCC> class DDD, class BBB> class AAA>
-void comment_to_html_conversion_21();
-
-// CHECK: FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-ftemplate-comments.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_21</Name><USR>c:@FT@>1#t>2#t>1#T#Tcomment_to_html_conversion_21#</USR><Declaration>template <template <template <typename CCC> class DDD, class BBB> class AAA>\nvoid comment_to_html_conversion_21()</Declaration><TemplateParameters><Parameter><Name>AAA</Name><Index>0</Index><Discussion><Para> Aaa </Para></Discussion></Parameter><Parameter><Name>BBB</Name><Discussion><Para> Bbb </Para></Discussion></Parameter><Parameter><Name>CCC</Name><Discussion><Para> Ccc </Para></Discussion></Parameter><Parameter><Name>DDD</Name><Discussion><Para> Ddd</Para></Discussion></Parameter></TemplateParameters></Function>]
-
-template<template<template<typename RRR> class SSS, class QQQ> class PPP>
-void comment_to_html_conversion_21();
-
-// CHECK: FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-ftemplate-comments.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_21</Name><USR>c:@FT@>1#t>2#t>1#T#Tcomment_to_html_conversion_21#</USR><Declaration>template <template <template <typename RRR> class SSS, class QQQ> class PPP>\nvoid comment_to_html_conversion_21()</Declaration><TemplateParameters><Parameter><Name>PPP</Name><Index>0</Index><Discussion><Para> Aaa </Para></Discussion></Parameter><Parameter><Name>QQQ</Name><Discussion><Para> Bbb </Para></Discussion></Parameter><Parameter><Name>RRR</Name><Discussion><Para> Ccc </Para></Discussion></Parameter><Parameter><Name>SSS</Name><Discussion><Para> Ddd</Para></Discussion></Parameter></TemplateParameters></Function>]
-
-//===----------------------------------------------------------------------===//
-
-/// \tparam C1 Ccc 1
-/// \tparam AAA Zzz
-/// \tparam C2 Ccc 2
-/// \tparam C3 Ccc 3
-/// \tparam C4 Ccc 4
-/// \tparam BBB Bbb
-template <class C1, template <class C2, template <class C3, class C4> class BBB > class AAA>
-void comment_to_html_conversion_22();
-
-// CHECK: FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-ftemplate-comments.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_22</Name><USR>c:@FT@>2#T#t>2#T#t>2#T#Tcomment_to_html_conversion_22#</USR><Declaration>template <class C1, template <class C2, template <class C3, class C4> class BBB>\n      class AAA>\nvoid comment_to_html_conversion_22()</Declaration><TemplateParameters><Parameter><Name>C1</Name><Index>0</Index><Discussion><Para> Ccc 1 </Para></Discussion></Parameter><Parameter><Name>AAA</Name><Index>1</Index><Discussion><Para> Zzz </Para></Discussion></Parameter><Parameter><Name>C2</Name><Discussion><Para> Ccc 2 </Para></Discussion></Parameter><Parameter><Name>C3</Name><Discussion><Para> Ccc 3 </Para></Discussion></Parameter><Parameter><Name>C4</Name><Discussion><Para> Ccc 4 </Para></Discussion></Parameter><Parameter><Name>BBB</Name><Discussion><Para> Bbb</Para></Discussion></Parameter></TemplateParameters></Function>]
-
-template<class CCC1, template<class CCC2, template<class CCC3, class CCC4> class QQQ> class PPP>
-void comment_to_html_conversion_22();
-
-// CHECK: FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-ftemplate-comments.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_22</Name><USR>c:@FT@>2#T#t>2#T#t>2#T#Tcomment_to_html_conversion_22#</USR><Declaration>template <class CCC1, template <class CCC2, template <class CCC3, class CCC4>\n                            class QQQ> class PPP>\nvoid comment_to_html_conversion_22()</Declaration><TemplateParameters><Parameter><Name>CCC1</Name><Index>0</Index><Discussion><Para> Ccc 1 </Para></Discussion></Parameter><Parameter><Name>PPP</Name><Index>1</Index><Discussion><Para> Zzz </Para></Discussion></Parameter><Parameter><Name>CCC2</Name><Discussion><Para> Ccc 2 </Para></Discussion></Parameter><Parameter><Name>CCC3</Name><Discussion><Para> Ccc 3 </Para></Discussion></Parameter><Parameter><Name>CCC4</Name><Discussion><Para> Ccc 4 </Para></Discussion></Parameter><Parameter><Name>QQQ</Name><Discussion><Para> Bbb</Para></Discussion></Parameter></TemplateParameters></Function>]
-
diff --git a/test/Index/overriding-method-comments.mm b/test/Index/overriding-method-comments.mm
deleted file mode 100644
index 9285693..0000000
--- a/test/Index/overriding-method-comments.mm
+++ /dev/null
@@ -1,125 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out
-// RUN: FileCheck %s < %t/out
-// Test to search overridden methods for documentation when overriding method has none. rdar://12378793
-
-// Ensure that XML we generate is not invalid.
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out
-// WRONG-NOT: CommentXMLInvalid
-
- at protocol P
-- (void)METH:(id)PPP;
- at end
-
- at interface Root<P>
-/**
- * \param[in] AAA ZZZ
- */
-- (void)METH:(id)AAA;
- at end
-
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-3]]" column="1"><Name>METH:</Name><USR>c:objc(cs)Root(im)METH:</USR><Declaration>- (void)METH:(id)AAA;</Declaration><Parameters><Parameter><Name>AAA</Name><Index>0</Index><Direction isExplicit="1">in</Direction><Discussion><Para> ZZZ</Para></Discussion></Parameter></Parameters></Function>]
-
- at interface Sub : Root
- at end
-
- at interface Sub (CAT)
-- (void)METH:(id)BBB;
- at end
-
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-3]]" column="1"><Name>METH:</Name><USR>c:objc(cs)Root(im)METH:</USR><Declaration>- (void)METH:(id)BBB;</Declaration><Parameters><Parameter><Name>BBB</Name><Index>0</Index><Direction isExplicit="1">in</Direction><Discussion><Para> ZZZ</Para></Discussion></Parameter></Parameters></Function>]
-
- at implementation Sub(CAT)
-- (void)METH:(id)III {}
- at end
-
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-3]]" column="1"><Name>METH:</Name><USR>c:objc(cs)Root(im)METH:</USR><Declaration>- (void)METH:(id)III;</Declaration><Parameters><Parameter><Name>III</Name><Index>0</Index><Direction isExplicit="1">in</Direction><Discussion><Para> ZZZ</Para></Discussion></Parameter></Parameters></Function>]
-
- at interface Redec : Root
- at end
-
- at interface Redec()
-/**
- * \param[in] AAA input value
- * \param[out] CCC output value is int
- * \param[in] BBB 2nd input value is double
- */
-- (void)EXT_METH:(id)AAA : (double)BBB : (int)CCC;
- at end
-
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-3]]" column="1"><Name>EXT_METH:::</Name><USR>c:objc(cs)Redec(im)EXT_METH:::</USR><Declaration>- (void)EXT_METH:(id)AAA:(double)BBB:(int)CCC;</Declaration><Parameters><Parameter><Name>AAA</Name><Index>0</Index><Direction isExplicit="1">in</Direction><Discussion><Para> input value </Para></Discussion></Parameter><Parameter><Name>BBB</Name><Index>1</Index><Direction isExplicit="1">in</Direction><Discussion><Para> 2nd input value is double</Para></Discussion></Parameter><Parameter><Name>CCC</Name><Index>2</Index><Direction isExplicit="1">out</Direction><Discussion><Para> output value is int </Para></Discussion></Parameter></Parameters></Function>]
-
- at implementation Redec
-- (void)EXT_METH:(id)PPP : (double)QQQ : (int)RRR {}
- at end
-
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-3]]" column="1"><Name>EXT_METH:::</Name><USR>c:objc(cs)Redec(im)EXT_METH:::</USR><Declaration>- (void)EXT_METH:(id)PPP:(double)QQQ:(int)RRR;</Declaration><Parameters><Parameter><Name>PPP</Name><Index>0</Index><Direction isExplicit="1">in</Direction><Discussion><Para> input value </Para></Discussion></Parameter><Parameter><Name>QQQ</Name><Index>1</Index><Direction isExplicit="1">in</Direction><Discussion><Para> 2nd input value is double</Para></Discussion></Parameter><Parameter><Name>RRR</Name><Index>2</Index><Direction isExplicit="1">out</Direction><Discussion><Para> output value is int </Para></Discussion></Parameter></Parameters></Function>]
-
-struct Base {
-  /// \brief Does something.
-  /// \param AAA argument to foo_pure.
-  virtual void foo_pure(int AAA) = 0;
-
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-2]]" column="16"><Name>foo_pure</Name><USR>c:@S at Base@F at foo_pure#I#</USR><Declaration>virtual void foo_pure(int AAA) = 0</Declaration><Abstract><Para> Does something. </Para></Abstract><Parameters><Parameter><Name>AAA</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> argument to foo_pure.</Para></Discussion></Parameter></Parameters></Function>]
-
-  /// \brief Does something.
-  /// \param BBB argument to defined virtual.
-  virtual void foo_inline(int BBB) {}
-
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-2]]" column="16"><Name>foo_inline</Name><USR>c:@S at Base@F at foo_inline#I#</USR><Declaration>virtual void foo_inline(int BBB)</Declaration><Abstract><Para> Does something. </Para></Abstract><Parameters><Parameter><Name>BBB</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> argument to defined virtual.</Para></Discussion></Parameter></Parameters></Function>]
-
-  /// \brief Does something.
-  /// \param CCC argument to undefined virtual.
-  virtual void foo_outofline(int CCC);
-
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-2]]" column="16"><Name>foo_outofline</Name><USR>c:@S at Base@F at foo_outofline#I#</USR><Declaration>virtual void foo_outofline(int CCC)</Declaration><Abstract><Para> Does something. </Para></Abstract><Parameters><Parameter><Name>CCC</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> argument to undefined virtual.</Para></Discussion></Parameter></Parameters></Function>]
-};
-
-void Base::foo_outofline(int RRR) {}
-
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-2]]" column="12"><Name>foo_outofline</Name><USR>c:@S at Base@F at foo_outofline#I#</USR><Declaration>void foo_outofline(int RRR)</Declaration><Abstract><Para> Does something. </Para></Abstract><Parameters><Parameter><Name>RRR</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> argument to undefined virtual.</Para></Discussion></Parameter></Parameters></Function>]
-
-struct Derived : public Base {
-  virtual void foo_pure(int PPP);
-
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-2]]" column="16"><Name>foo_pure</Name><USR>c:@S at Base@F at foo_pure#I#</USR><Declaration>virtual void foo_pure(int PPP)</Declaration><Abstract><Para> Does something. </Para></Abstract><Parameters><Parameter><Name>PPP</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> argument to foo_pure.</Para></Discussion></Parameter></Parameters></Function>]
-
-  virtual void foo_inline(int QQQ) {}
-
-// CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-2]]" column="16"><Name>foo_inline</Name><USR>c:@S at Base@F at foo_inline#I#</USR><Declaration>virtual void foo_inline(int QQQ)</Declaration><Abstract><Para> Does something. </Para></Abstract><Parameters><Parameter><Name>QQQ</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> argument to defined virtual.</Para></Discussion></Parameter></Parameters></Function>]
-};
-
-/// \brief Does something.
-/// \param DDD a value.
-void foo(int DDD);
-
-// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-2]]" column="6"><Name>foo</Name><USR>c:@F at foo#I#</USR><Declaration>void foo(int DDD)</Declaration><Abstract><Para> Does something. </Para></Abstract><Parameters><Parameter><Name>DDD</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> a value.</Para></Discussion></Parameter></Parameters></Function>]
-
-void foo(int SSS) {}
-
-// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-2]]" column="6"><Name>foo</Name><USR>c:@F at foo#I#</USR><Declaration>void foo(int SSS)</Declaration><Abstract><Para> Does something. </Para></Abstract><Parameters><Parameter><Name>SSS</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> a value.</Para></Discussion></Parameter></Parameters></Function>]
-
-/// \brief Does something.
-/// \param EEE argument to function decl.
-void foo1(int EEE);
-
-// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-2]]" column="6"><Name>foo1</Name><USR>c:@F at foo1#I#</USR><Declaration>void foo1(int EEE)</Declaration><Abstract><Para> Does something. </Para></Abstract><Parameters><Parameter><Name>EEE</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> argument to function decl.</Para></Discussion></Parameter></Parameters></Function>]
-
-void foo1(int TTT);
-
-// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-2]]" column="6"><Name>foo1</Name><USR>c:@F at foo1#I#</USR><Declaration>void foo1(int TTT)</Declaration><Abstract><Para> Does something. </Para></Abstract><Parameters><Parameter><Name>TTT</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> argument to function decl.</Para></Discussion></Parameter></Parameters></Function>]
-
-/// \brief Documentation
-/// \tparam BBB The type, silly.
-/// \tparam AAA The type, silly as well.
-template<typename AAA, typename BBB>
-void foo(AAA, BBB);
-
-// CHECK: FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-2]]" column="6"><Name>foo</Name><USR>c:@FT@>2#T#Tfoo#t0.0#t0.1#</USR><Declaration>template <typename AAA, typename BBB> void foo(AAA, BBB)</Declaration><Abstract><Para> Documentation </Para></Abstract><TemplateParameters><Parameter><Name>AAA</Name><Index>0</Index><Discussion><Para> The type, silly as well.</Para></Discussion></Parameter><Parameter><Name>BBB</Name><Index>1</Index><Discussion><Para> The type, silly. </Para></Discussion></Parameter></TemplateParameters></Function>]
-
-template<typename PPP, typename QQQ>
-void foo(PPP, QQQ);
-
-// CHECK: FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-method-comments.mm" line="[[@LINE-2]]" column="6"><Name>foo</Name><USR>c:@FT@>2#T#Tfoo#t0.0#t0.1#</USR><Declaration>template <typename PPP, typename QQQ> void foo(PPP, QQQ)</Declaration><Abstract><Para> Documentation </Para></Abstract><TemplateParameters><Parameter><Name>PPP</Name><Index>0</Index><Discussion><Para> The type, silly as well.</Para></Discussion></Parameter><Parameter><Name>QQQ</Name><Index>1</Index><Discussion><Para> The type, silly. </Para></Discussion></Parameter></TemplateParameters></Function>]
-
diff --git a/test/Index/parse-all-comments.c b/test/Index/parse-all-comments.c
deleted file mode 100644
index f8b0449..0000000
--- a/test/Index/parse-all-comments.c
+++ /dev/null
@@ -1,62 +0,0 @@
-// Run lines are sensitive to line numbers and come below the code.
-
-#ifndef HEADER
-#define HEADER
-
-// Not a Doxygen comment.  notdoxy1 NOT_DOXYGEN
-void notdoxy1(void);
-
-/* Not a Doxygen comment.  notdoxy2 NOT_DOXYGEN */
-void notdoxy2(void);
-
-/*/ Not a Doxygen comment.  notdoxy3 NOT_DOXYGEN */
-void notdoxy3(void);
-
-/** Doxygen comment.  isdoxy4 IS_DOXYGEN_SINGLE */
-void isdoxy4(void);
-
-/*! Doxygen comment.  isdoxy5 IS_DOXYGEN_SINGLE */
-void isdoxy5(void);
-
-/// Doxygen comment.  isdoxy6 IS_DOXYGEN_SINGLE
-void isdoxy6(void);
-
-/* BLOCK_ORDINARY_COMMENT */
-// ORDINARY COMMENT
-/// This is a BCPL comment. IS_DOXYGEN_START
-/// It has only two lines.
-/** But there are other blocks that are part of the comment, too.  IS_DOXYGEN_END */
-void multi_line_comment_plus_ordinary(int);
-
-// MULTILINE COMMENT
-//
-// WITH EMPTY LINE
-void multi_line_comment_empty_line(int);
-
-#endif
-
-// RUN: rm -rf %t
-// RUN: mkdir %t
-
-// RUN: %clang_cc1 -fparse-all-comments -x c++ -std=c++11 -emit-pch -o %t/out.pch %s
-
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 -fparse-all-comments > %t/out.c-index-direct
-// RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch
-
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct
-// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-pch
-
-// Ensure that XML is not invalid
-// WRONG-NOT: CommentXMLInvalid
-
-// RUN: FileCheck %s < %t/out.c-index-direct
-// RUN: FileCheck %s < %t/out.c-index-pch
-
-// CHECK: parse-all-comments.c:7:6: FunctionDecl=notdoxy1:{{.*}} notdoxy1 NOT_DOXYGEN
-// CHECK: parse-all-comments.c:10:6: FunctionDecl=notdoxy2:{{.*}} notdoxy2 NOT_DOXYGEN
-// CHECK: parse-all-comments.c:13:6: FunctionDecl=notdoxy3:{{.*}} notdoxy3 NOT_DOXYGEN
-// CHECK: parse-all-comments.c:16:6: FunctionDecl=isdoxy4:{{.*}} isdoxy4 IS_DOXYGEN_SINGLE
-// CHECK: parse-all-comments.c:19:6: FunctionDecl=isdoxy5:{{.*}} isdoxy5 IS_DOXYGEN_SINGLE
-// CHECK: parse-all-comments.c:22:6: FunctionDecl=isdoxy6:{{.*}} isdoxy6 IS_DOXYGEN_SINGLE
-// CHECK: parse-all-comments.c:29:6: FunctionDecl=multi_line_comment_plus_ordinary:{{.*}} BLOCK_ORDINARY_COMMENT {{.*}} ORDINARY COMMENT {{.*}} IS_DOXYGEN_START {{.*}} IS_DOXYGEN_END
-// CHECK: parse-all-comments.c:34:6: FunctionDecl=multi_line_comment_empty_line:{{.*}} MULTILINE COMMENT{{.*}}\n{{.*}}\n{{.*}} WITH EMPTY LINE
diff --git a/test/Index/retain-comments-from-system-headers.c b/test/Index/retain-comments-from-system-headers.c
index 490699d..5fb5e5b 100644
--- a/test/Index/retain-comments-from-system-headers.c
+++ b/test/Index/retain-comments-from-system-headers.c
@@ -1,4 +1,6 @@
 // Run lines are sensitive to line numbers and come below the code.
+// FIXME: DOC: Remove BriefComment checks depending on comment parsing
+// XFAIL: *
 
 #include "retain-comments-from-system-headers.h"
 
diff --git a/test/Index/subclass-comment.mm b/test/Index/subclass-comment.mm
deleted file mode 100644
index 5fcb89f..0000000
--- a/test/Index/subclass-comment.mm
+++ /dev/null
@@ -1,43 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out
-// RUN: FileCheck %s < %t/out
-// rdar://13647476
-
-//! NSObject is root of all.
- at interface NSObject
- at end
-// CHECK:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ NSObject is root of all.])))]
-
-//! An umbrella class for super classes.
- at interface SuperClass
- at end
-// CHECK:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ An umbrella class for super classes.])))]
-
- at interface SubClass : SuperClass
- at end
-// CHECK:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ An umbrella class for super classes.])))]
-
- at interface SubSubClass : SubClass
- at end
-// CHECK:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ An umbrella class for super classes.])))]
-
- at interface SubSubClass (Private)
- at end
-// CHECK:  CommentAST=[
-// CHECK-NEXT:    (CXComment_FullComment
-// CHECK-NEXT:       (CXComment_Paragraph
-// CHECK-NEXT:         (CXComment_Text Text=[ An umbrella class for super classes.])))]
-
diff --git a/test/Misc/ast-dump-color.cpp b/test/Misc/ast-dump-color.cpp
index 3ada6d2..43f10d1 100644
--- a/test/Misc/ast-dump-color.cpp
+++ b/test/Misc/ast-dump-color.cpp
@@ -1,5 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-pc-linux -std=c++11 -ast-dump -fcolor-diagnostics %s | FileCheck --strict-whitespace %s
 // REQUIRES: ansi-escape-sequences
+// FIXME: DOC: Remove FullComment nodes and regenerate.
+// XFAIL: *
 
 /// <a>Hello</a>
 /// <br/>
diff --git a/test/Misc/ast-dump-comment.cpp b/test/Misc/ast-dump-comment.cpp
deleted file mode 100644
index 5bd6934..0000000
--- a/test/Misc/ast-dump-comment.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-// RUN: %clang_cc1 -Wdocumentation -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s
-
-/// Aaa
-int TestLocation;
-// CHECK: VarDecl{{.*}}TestLocation
-// CHECK-NEXT:   FullComment 0x{{[^ ]*}} <line:[[@LINE-3]]:4, col:7>
-
-///
-int TestIndent;
-// CHECK:      {{^VarDecl.*TestIndent[^()]*$}}
-// CHECK-NEXT: {{^`-FullComment.*>$}}
-
-/// Aaa
-int Test_TextComment;
-// CHECK:      VarDecl{{.*}}Test_TextComment
-// CHECK-NEXT:   FullComment
-// CHECK-NEXT:     ParagraphComment
-// CHECK-NEXT:       TextComment{{.*}} Text=" Aaa"
-
-/// \brief Aaa
-int Test_BlockCommandComment;
-// CHECK:      VarDecl{{.*}}Test_BlockCommandComment
-// CHECK:        BlockCommandComment{{.*}} Name="brief"
-// CHECK-NEXT:     ParagraphComment
-// CHECK-NEXT:       TextComment{{.*}} Text=" Aaa"
-
-/// \param Aaa xxx
-/// \param [in,out] Bbb yyy
-void Test_ParamCommandComment(int Aaa, int Bbb);
-// CHECK:      FunctionDecl{{.*}}Test_ParamCommandComment
-// CHECK:        ParamCommandComment{{.*}} [in] implicitly Param="Aaa" ParamIndex=0
-// CHECK-NEXT:     ParagraphComment
-// CHECK-NEXT:       TextComment{{.*}} Text=" xxx"
-// CHECK:        ParamCommandComment{{.*}} [in,out] explicitly Param="Bbb" ParamIndex=1
-// CHECK-NEXT:     ParagraphComment
-// CHECK-NEXT:       TextComment{{.*}} Text=" yyy"
-
-/// \tparam Aaa xxx
-template <typename Aaa> class Test_TParamCommandComment;
-// CHECK:      ClassTemplateDecl{{.*}}Test_TParamCommandComment
-// CHECK:        TParamCommandComment{{.*}} Param="Aaa" Position=<0>
-// CHECK-NEXT:     ParagraphComment
-// CHECK-NEXT:       TextComment{{.*}} Text=" xxx"
-
-/// \c Aaa
-int Test_InlineCommandComment;
-// CHECK:      VarDecl{{.*}}Test_InlineCommandComment
-// CHECK:        InlineCommandComment{{.*}} Name="c" RenderMonospaced Arg[0]="Aaa"
-
-/// <a>Aaa</a>
-/// <br/>
-int Test_HTMLTagComment;
-// CHECK:      VarDecl{{.*}}Test_HTMLTagComment
-// CHECK-NEXT:   FullComment
-// CHECK-NEXT:     ParagraphComment
-// CHECK-NEXT:       TextComment{{.*}} Text=" "
-// CHECK-NEXT:       HTMLStartTagComment{{.*}} Name="a"
-// CHECK-NEXT:       TextComment{{.*}} Text="Aaa"
-// CHECK-NEXT:       HTMLEndTagComment{{.*}} Name="a"
-// CHECK-NEXT:       TextComment{{.*}} Text=" "
-// CHECK-NEXT:       HTMLStartTagComment{{.*}} Name="br" SelfClosing
-
-/// \verbatim
-/// Aaa
-/// \endverbatim
-int Test_VerbatimBlockComment;
-// CHECK:      VarDecl{{.*}}Test_VerbatimBlockComment
-// CHECK:        VerbatimBlockComment{{.*}} Name="verbatim" CloseName="endverbatim"
-// CHECK-NEXT:     VerbatimBlockLineComment{{.*}} Text=" Aaa"
-
-/// \param ... More arguments
-template<typename T>
-void Test_TemplatedFunctionVariadic(int arg, ...);
-// CHECK:      FunctionTemplateDecl{{.*}}Test_TemplatedFunctionVariadic
-// CHECK:        ParamCommandComment{{.*}} [in] implicitly Param="..."
-// CHECK-NEXT:     ParagraphComment
-// CHECK-NEXT:       TextComment{{.*}} Text=" More arguments"
diff --git a/test/Misc/ast-dump-decl.cpp b/test/Misc/ast-dump-decl.cpp
index 8f20c46..1921298 100644
--- a/test/Misc/ast-dump-decl.cpp
+++ b/test/Misc/ast-dump-decl.cpp
@@ -460,19 +460,3 @@ namespace TestFriendDecl2 {
 // CHECK:   |-CXXRecordDecl {{.*}} struct S
 // CHECK:   `-FriendDecl
 // CHECK:     `-FunctionDecl {{.*}} parent [[TestFriendDecl2]] prev [[TestFriendDecl2_f]] <{{.*}}> {{.*}} f 'void (void)'
-
-namespace Comment {
-  extern int Test;
-  /// Something here.
-  extern int Test;
-  extern int Test;
-}
-
-// CHECK: VarDecl {{.*}} Test 'int' extern
-// CHECK-NOT: FullComment
-// CHECK: VarDecl {{.*}} Test 'int' extern
-// CHECK: `-FullComment
-// CHECK:   `-ParagraphComment
-// CHECK:       `-TextComment
-// CHECK: VarDecl {{.*}} Test 'int' extern
-// CHECK-NOT: FullComment
diff --git a/test/Sema/no-documentation-warn-tagdecl-specifier.c b/test/Sema/no-documentation-warn-tagdecl-specifier.c
deleted file mode 100644
index a0702ad..0000000
--- a/test/Sema/no-documentation-warn-tagdecl-specifier.c
+++ /dev/null
@@ -1,85 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -verify %s
-// rdar://12390371
-
-/** @return s Test*/
-struct s* f(void);
-struct s;
-
-struct s1;
-/** @return s1 Test 1*/
-struct s1* f1(void);
-
-struct s2;
-/** @return s2 Test 2*/
-struct s2* f2(void);
-struct s2;
-
-// expected-warning at +1 {{'@return' command used in a comment that is not attached to a function or method declaration}}
-/** @return s3 Test 3 - expected warning here */
-struct s3;
-struct s3* f3(void);
-
-/** @return s4 Test 4 */
-struct s4* f4(void);
-struct s4 { int is; };
-
-// expected-warning at +1 {{'@return' command used in a comment that is not attached to a function or method declaration}}
-/** @return s5 Test 5  - expected warning here */
-struct s5 { int is; };
-struct s5* f5(void);
-
-// expected-warning at +1 {{'@return' command used in a comment that is not attached to a function or method declaration}}
-/** @return s6 Test 6  - expected warning here */
-struct s6 *ps6;
-struct s6* f6(void);
-
-// expected-warning at +1 {{'@return' command used in a comment that is not attached to a function or method declaration}}
-/** @return s7 Test 7  - expected warning here */
-struct s7;
-struct s7* f7(void);
-
-struct s8 { int is8; };
-/** @return s8 Test 8 */
-struct s4 *f8(struct s8 *p);
-
-
-/** @return e Test*/
-enum e* g(void);
-enum e;
-
-enum e1;
-/** @return e1 Test 1*/
-enum e1* g1(void);
-
-enum e2;
-/** @return e2 Test 2*/
-enum e2* g2(void);
-enum e2;
-
-// expected-warning at +1 {{'@return' command used in a comment that is not attached to a function or method declaration}}
-/** @return e3 Test 3 - expected warning here */
-enum e3;
-enum e3* g3(void);
-
-/** @return e4 Test 4 */
-enum e4* g4(void);
-enum e4 { one };
-
-// expected-warning at +1 {{'@return' command used in a comment that is not attached to a function or method declaration}}
-/** @return e5 Test 5  - expected warning here */
-enum e5 { two };
-enum e5* g5(void);
-
-// expected-warning at +1 {{'@return' command used in a comment that is not attached to a function or method declaration}}
-/** @return e6 Test 6  - expected warning here */
-enum e6 *pe6;
-enum e6* g6(void);
-
-// expected-warning at +1 {{'@return' command used in a comment that is not attached to a function or method declaration}}
-/** @return e7 Test 7  - expected warning here */
-enum e7;
-enum e7* g7(void);
-
-enum e8 { three };
-/** @return e8 Test 8 */
-enum e4 *g8(enum e8 *p);
diff --git a/test/Sema/warn-documentation-fixits.cpp b/test/Sema/warn-documentation-fixits.cpp
deleted file mode 100644
index 675d86c..0000000
--- a/test/Sema/warn-documentation-fixits.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -fcomment-block-commands=foobar -verify %s
-// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -fcomment-block-commands=foobar -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
-
-// expected-warning at +1 {{parameter 'ZZZZZZZZZZ' not found in the function declaration}} expected-note at +1 {{did you mean 'a'?}}
-/// \param ZZZZZZZZZZ Blah blah.
-int test1(int a);
-
-// expected-warning at +1 {{parameter 'aab' not found in the function declaration}} expected-note at +1 {{did you mean 'aaa'?}}
-/// \param aab Blah blah.
-int test2(int aaa, int bbb);
-
-// expected-warning at +1 {{template parameter 'ZZZZZZZZZZ' not found in the template declaration}} expected-note at +1 {{did you mean 'T'?}}
-/// \tparam ZZZZZZZZZZ Aaa
-template<typename T>
-void test3(T aaa);
-
-// expected-warning at +1 {{template parameter 'SomTy' not found in the template declaration}} expected-note at +1 {{did you mean 'SomeTy'?}}
-/// \tparam SomTy Aaa
-/// \tparam OtherTy Bbb
-template<typename SomeTy, typename OtherTy>
-void test4(SomeTy aaa, OtherTy bbb);
-
-// expected-warning at +1 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note at +2 {{add a deprecation attribute to the declaration to silence this warning}}
-/// \deprecated
-void test_deprecated_1();
-
-// expected-warning at +1 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note at +2 {{add a deprecation attribute to the declaration to silence this warning}}
-/// \deprecated
-void test_deprecated_2(int a);
-
-struct test_deprecated_3 {
-  // expected-warning at +1 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note at +2 {{add a deprecation attribute to the declaration to silence this warning}}
-  /// \deprecated
-  void test_deprecated_4();
-
-  // expected-warning at +1 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note at +2 {{add a deprecation attribute to the declaration to silence this warning}}
-  /// \deprecated
-  void test_deprecated_5() {
-  }
-};
-
-template<typename T>
-struct test_deprecated_6 {
-  // expected-warning at +1 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note at +2 {{add a deprecation attribute to the declaration to silence this warning}}
-  /// \deprecated
-  void test_deprecated_7();
-
-  // expected-warning at +1 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note at +2 {{add a deprecation attribute to the declaration to silence this warning}}
-  /// \deprecated
-  void test_deprecated_8() {
-  }
-};
-
-#define MY_ATTR_DEPRECATED __attribute__((deprecated))
-
-// expected-warning at +1 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note at +2 {{add a deprecation attribute to the declaration to silence this warning}}
-/// \deprecated
-void test_deprecated_9(int a);
-
-// rdar://12381408
-// expected-warning at +2  {{unknown command tag name 'retur'; did you mean 'return'?}}
-/// \brief testing fixit
-/// \retur int in FooBar
-int FooBar();
-
-// expected-warning at +1  {{unknown command tag name 'fooba'; did you mean 'foobar'?}}
-/// \fooba bbb IS_DOXYGEN_END
-int gorf();
-
-/// \t bbb IS_DOXYGEN_END
-int Bar();
-
-// expected-warning at +2  {{unknown command tag name 'encode'; did you mean 'endcode'?}}
-// expected-warning at +1  {{'\endcode' command does not terminate a verbatim text block}}
-/// \encode PR18051
-int PR18051();
-
-// CHECK: fix-it:"{{.*}}":{5:12-5:22}:"a"
-// CHECK: fix-it:"{{.*}}":{9:12-9:15}:"aaa"
-// CHECK: fix-it:"{{.*}}":{13:13-13:23}:"T"
-// CHECK: fix-it:"{{.*}}":{18:13-18:18}:"SomeTy"
-// CHECK: fix-it:"{{.*}}":{25:25-25:25}:" __attribute__((deprecated))"
-// CHECK: fix-it:"{{.*}}":{29:30-29:30}:" __attribute__((deprecated))"
-// CHECK: fix-it:"{{.*}}":{34:27-34:27}:" __attribute__((deprecated))"
-// CHECK: fix-it:"{{.*}}":{38:27-38:27}:" __attribute__((deprecated))"
-// CHECK: fix-it:"{{.*}}":{46:27-46:27}:" __attribute__((deprecated))"
-// CHECK: fix-it:"{{.*}}":{50:27-50:27}:" __attribute__((deprecated))"
-// CHECK: fix-it:"{{.*}}":{58:30-58:30}:" MY_ATTR_DEPRECATED"
-// CHECK: fix-it:"{{.*}}":{63:6-63:11}:"return"
-// CHECK: fix-it:"{{.*}}":{67:6-67:11}:"foobar"
-// CHECK: fix-it:"{{.*}}":{75:6-75:12}:"endcode"
diff --git a/test/Sema/warn-documentation.cpp b/test/Sema/warn-documentation.cpp
deleted file mode 100644
index 4375cfc..0000000
--- a/test/Sema/warn-documentation.cpp
+++ /dev/null
@@ -1,1111 +0,0 @@
-// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wdocumentation -Wdocumentation-pedantic -verify %s
-
-// This file contains lots of corner cases, so ensure that XML we generate is not invalid.
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s | FileCheck %s -check-prefix=WRONG
-// WRONG-NOT: CommentXMLInvalid
-
-// expected-warning at +2 {{HTML tag 'a' requires an end tag}}
-// expected-warning at +1 {{expected quoted string after equals sign}}
-/// <a href=>
-int test_html1(int);
-
-// expected-warning at +2 {{HTML tag 'a' requires an end tag}}
-// expected-warning at +1 {{expected quoted string after equals sign}}
-/// <a href==>
-int test_html2(int);
-
-// expected-warning at +3 {{HTML tag 'a' requires an end tag}}
-// expected-warning at +2 {{expected quoted string after equals sign}}
-// expected-warning at +1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
-/// <a href= blah
-int test_html3(int);
-
-// expected-warning at +2 {{HTML tag 'a' requires an end tag}}
-// expected-warning at +1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
-/// <a =>
-int test_html4(int);
-
-// expected-warning at +2 {{HTML tag 'a' requires an end tag}}
-// expected-warning at +1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
-/// <a "aaa">
-int test_html5(int);
-
-// expected-warning at +2 {{HTML tag 'a' requires an end tag}}
-// expected-warning at +1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
-/// <a a="b" =>
-int test_html6(int);
-
-// expected-warning at +2 {{HTML tag 'a' requires an end tag}}
-// expected-warning at +1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
-/// <a a="b" "aaa">
-int test_html7(int);
-
-// expected-warning at +2 {{HTML tag 'a' requires an end tag}}
-// expected-warning at +1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
-/// <a a="b" =
-int test_html8(int);
-
-// expected-warning at +2 {{HTML start tag prematurely ended, expected attribute name or '>'}} expected-note at +1 {{HTML tag started here}}
-/** Aaa bbb<img ddd eee
- * fff ggg.
- */
-int test_html9(int);
-
-// expected-warning at +1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
-/** Aaa bbb<img ddd eee 42%
- * fff ggg.
- */
-int test_html10(int);
-
-// expected-warning at +1 {{HTML end tag 'br' is forbidden}}
-/// <br></br>
-int test_html11(int);
-
-/// <blockquote>Meow</blockquote>
-int test_html_nesting1(int);
-
-/// <b><i>Meow</i></b>
-int test_html_nesting2(int);
-
-/// <p>Aaa<br>
-/// Bbb</p>
-int test_html_nesting3(int);
-
-/// <p>Aaa<br />
-/// Bbb</p>
-int test_html_nesting4(int);
-
-// expected-warning at +3 {{HTML tag 'b' requires an end tag}}
-// expected-warning at +2 {{HTML tag 'i' requires an end tag}}
-// expected-warning at +1 {{HTML end tag does not match any start tag}}
-/// <b><i>Meow</a>
-int test_html_nesting5(int);
-
-// expected-warning at +2 {{HTML start tag 'i' closed by 'b'}}
-// expected-warning at +1 {{HTML end tag does not match any start tag}}
-/// <b><i>Meow</b></b>
-int test_html_nesting6(int);
-
-// expected-warning at +2 {{HTML start tag 'i' closed by 'b'}}
-// expected-warning at +1 {{HTML end tag does not match any start tag}}
-/// <b><i>Meow</b></i>
-int test_html_nesting7(int);
-
-// expected-warning at +1 {{HTML tag 'b' requires an end tag}}
-/// <b>Meow
-int test_html_nesting8(int);
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\returns Aaa
-int test_block_command1(int);
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief \returns Aaa
-int test_block_command2(int);
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief
-/// \returns Aaa
-int test_block_command3(int);
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief
-///
-/// \returns Aaa
-int test_block_command4(int);
-
-// There is trailing whitespace on one of the following lines, don't remove it!
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief
-/// 
-/// \returns Aaa
-int test_block_command5(int);
-
-/// \brief \c Aaa
-int test_block_command6(int);
-
-// expected-warning at +5 {{duplicated command '\brief'}} expected-note at +1 {{previous command '\brief' here}}
-/// \brief Aaa
-///
-/// Bbb
-///
-/// \brief Ccc
-int test_duplicate_brief1(int);
-
-// expected-warning at +5 {{duplicated command '\short'}} expected-note at +1 {{previous command '\short' here}}
-/// \short Aaa
-///
-/// Bbb
-///
-/// \short Ccc
-int test_duplicate_brief2(int);
-
-// expected-warning at +5 {{duplicated command '\brief'}} expected-note at +1 {{previous command '\short' (an alias of '\brief') here}}
-/// \short Aaa
-///
-/// Bbb
-///
-/// \brief Ccc
-int test_duplicate_brief3(int);
-
-
-/// \return Aaa
-///
-/// Bbb
-///
-/// \return Ccc
-int test_multiple_returns1(int);
-
-/// \returns Aaa
-///
-/// Bbb
-///
-/// \returns Ccc
-int test_multiple_returns2(int);
-
-/// \result Aaa
-///
-/// Bbb
-///
-/// \result Ccc
-int test_multiple_returns3(int);
-
-/// \returns Aaa
-///
-/// Bbb
-///
-/// \return Ccc
-int test_multiple_returns4(int);
-
-
-// expected-warning at +1 {{'\param' command used in a comment that is not attached to a function declaration}}
-/// \param a Blah blah.
-int test_param1_backslash;
-
-// rdar://13066276
-// Check that the diagnostic uses the same command marker as the comment.
-// expected-warning at +1 {{'@param' command used in a comment that is not attached to a function declaration}}
-/// @param a Blah blah.
-int test_param1_at;
-
-// expected-warning at +1 {{empty paragraph passed to '\param' command}}
-/// \param
-/// \param a Blah blah.
-int test_param2(int a);
-
-// expected-warning at +1 {{empty paragraph passed to '\param' command}}
-/// \param a
-int test_param3(int a);
-
-/// \param a Blah blah.
-int test_param4(int a);
-
-/// \param [in] a Blah blah.
-int test_param5(int a);
-
-/// \param [out] a Blah blah.
-int test_param6(int a);
-
-/// \param [in,out] a Blah blah.
-int test_param7(int a);
-
-// expected-warning at +1 {{whitespace is not allowed in parameter passing direction}}
-/// \param [ in ] a Blah blah.
-int test_param8(int a);
-
-// expected-warning at +1 {{whitespace is not allowed in parameter passing direction}}
-/// \param [in, out] a Blah blah.
-int test_param9(int a);
-
-// expected-warning at +1 {{unrecognized parameter passing direction, valid directions are '[in]', '[out]' and '[in,out]'}}
-/// \param [ junk] a Blah blah.
-int test_param10(int a);
-
-// expected-warning at +1 {{parameter 'a' not found in the function declaration}}
-/// \param a Blah blah.
-int test_param11();
-
-// expected-warning at +1 {{parameter 'A' not found in the function declaration}} expected-note at +1 {{did you mean 'a'?}}
-/// \param A Blah blah.
-int test_param12(int a);
-
-// expected-warning at +1 {{parameter 'aab' not found in the function declaration}} expected-note at +1 {{did you mean 'aaa'?}}
-/// \param aab Blah blah.
-int test_param13(int aaa, int bbb);
-
-// expected-warning at +2 {{parameter 'aab' not found in the function declaration}} expected-note at +2 {{did you mean 'bbb'?}}
-/// \param aaa Blah blah.
-/// \param aab Blah blah.
-int test_param14(int aaa, int bbb);
-
-// expected-warning at +1 {{parameter 'aab' not found in the function declaration}}
-/// \param aab Blah blah.
-int test_param15(int bbb, int ccc);
-
-// expected-warning at +1 {{parameter 'aab' not found in the function declaration}}
-/// \param aab Ccc.
-/// \param aaa Aaa.
-/// \param bbb Bbb.
-int test_param16(int aaa, int bbb);
-
-// expected-warning at +2 {{parameter 'aab' not found in the function declaration}}
-/// \param aaa Aaa.
-/// \param aab Ccc.
-/// \param bbb Bbb.
-int test_param17(int aaa, int bbb);
-
-// expected-warning at +3 {{parameter 'aab' not found in the function declaration}}
-/// \param aaa Aaa.
-/// \param bbb Bbb.
-/// \param aab Ccc.
-int test_param18(int aaa, int bbb);
-
-class C {
-  // expected-warning at +1 {{parameter 'aaa' not found in the function declaration}}
-  /// \param aaa Blah blah.
-  C(int bbb, int ccc);
-
-  // expected-warning at +1 {{parameter 'aaa' not found in the function declaration}}
-  /// \param aaa Blah blah.
- int test_param19(int bbb, int ccc);
-};
-
-// expected-warning at +1 {{parameter 'aab' not found in the function declaration}}
-/// \param aab Blah blah.
-template<typename T>
-void test_param20(int bbb, int ccc);
-
-// expected-warning at +3 {{parameter 'a' is already documented}}
-// expected-note at +1 {{previous documentation}}
-/// \param a Aaa.
-/// \param a Aaa.
-int test_param21(int a);
-
-// expected-warning at +4 {{parameter 'x2' is already documented}}
-// expected-note at +2 {{previous documentation}}
-/// \param x1 Aaa.
-/// \param x2 Bbb.
-/// \param x2 Ccc.
-int test_param22(int x1, int x2, int x3);
-
-//===---
-// Test that we treat typedefs to some non-function types as functions for the
-// purposes of documentation comment parsing.
-//===---
-
-namespace foo {
-  inline namespace bar {
-    template<typename>
-    struct function_wrapper {};
-
-    template<unsigned>
-    struct not_a_function_wrapper {};
-  }
-};
-
-// expected-warning at +2 {{parameter 'bbb' not found in the function declaration}} expected-note at +2 {{did you mean 'ccc'?}}
-/// \param aaa Meow.
-/// \param bbb Bbb.
-/// \returns aaa.
-typedef int test_function_like_typedef1(int aaa, int ccc);
-
-// expected-warning at +2 {{parameter 'bbb' not found in the function declaration}} expected-note at +2 {{did you mean 'ccc'?}}
-/// \param aaa Meow.
-/// \param bbb Bbb.
-/// \returns aaa.
-typedef int (*test_function_like_typedef2)(int aaa, int ccc);
-
-// expected-warning at +2 {{parameter 'bbb' not found in the function declaration}} expected-note at +2 {{did you mean 'ccc'?}}
-/// \param aaa Meow.
-/// \param bbb Bbb.
-/// \returns aaa.
-typedef int (* const test_function_like_typedef3)(int aaa, int ccc);
-
-// expected-warning at +2 {{parameter 'bbb' not found in the function declaration}} expected-note at +2 {{did you mean 'ccc'?}}
-/// \param aaa Meow.
-/// \param bbb Bbb.
-/// \returns aaa.
-typedef int (C::*test_function_like_typedef4)(int aaa, int ccc);
-
-// expected-warning at +2 {{parameter 'bbb' not found in the function declaration}} expected-note at +2 {{did you mean 'ccc'?}}
-/// \param aaa Meow.
-/// \param bbb Bbb.
-/// \returns aaa.
-typedef foo::function_wrapper<int (int aaa, int ccc)> test_function_like_typedef5;
-
-// expected-warning at +2 {{parameter 'bbb' not found in the function declaration}} expected-note at +2 {{did you mean 'ccc'?}}
-/// \param aaa Meow.
-/// \param bbb Bbb.
-/// \returns aaa.
-typedef foo::function_wrapper<int (int aaa, int ccc)> *test_function_like_typedef6;
-
-// expected-warning at +2 {{parameter 'bbb' not found in the function declaration}} expected-note at +2 {{did you mean 'ccc'?}}
-/// \param aaa Meow.
-/// \param bbb Bbb.
-/// \returns aaa.
-typedef foo::function_wrapper<int (int aaa, int ccc)> &test_function_like_typedef7;
-
-// expected-warning at +2 {{parameter 'bbb' not found in the function declaration}} expected-note at +2 {{did you mean 'ccc'?}}
-/// \param aaa Meow.
-/// \param bbb Bbb.
-/// \returns aaa.
-typedef foo::function_wrapper<int (int aaa, int ccc)> &&test_function_like_typedef8;
-
-
-typedef int (*test_not_function_like_typedef1)(int aaa);
-
-// expected-warning at +1 {{'\param' command used in a comment that is not attached to a function declaration}}
-/// \param aaa Meow.
-typedef test_not_function_like_typedef1 test_not_function_like_typedef2;
-
-// rdar://13066276
-// Check that the diagnostic uses the same command marker as the comment.
-// expected-warning at +1 {{'@param' command used in a comment that is not attached to a function declaration}}
-/// @param aaa Meow.
-typedef unsigned int test_not_function_like_typedef3;
-
-// expected-warning at +1 {{'\param' command used in a comment that is not attached to a function declaration}}
-/// \param aaa Meow.
-typedef foo::not_a_function_wrapper<1> test_not_function_like_typedef4;
-
-/// \param aaa Aaa
-/// \param ... Vararg
-int test_vararg_param1(int aaa, ...);
-
-/// \param ... Vararg
-int test_vararg_param2(...);
-
-// expected-warning at +1 {{parameter '...' not found in the function declaration}} expected-note at +1 {{did you mean 'aaa'?}}
-/// \param ... Vararg
-int test_vararg_param3(int aaa);
-
-// expected-warning at +1 {{parameter '...' not found in the function declaration}}
-/// \param ... Vararg
-int test_vararg_param4();
-
-
-/// \param aaa Aaa
-/// \param ... Vararg
-template<typename T>
-int test_template_vararg_param1(int aaa, ...);
-
-/// \param ... Vararg
-template<typename T>
-int test_template_vararg_param2(...);
-
-// expected-warning at +1 {{parameter '...' not found in the function declaration}} expected-note at +1 {{did you mean 'aaa'?}}
-/// \param ... Vararg
-template<typename T>
-int test_template_vararg_param3(int aaa);
-
-// expected-warning at +1 {{parameter '...' not found in the function declaration}}
-/// \param ... Vararg
-template<typename T>
-int test_template_vararg_param4();
-
-
-// expected-warning at +1 {{'\tparam' command used in a comment that is not attached to a template declaration}}
-/// \tparam T Aaa
-int test_tparam1;
-
-// expected-warning at +1 {{'\tparam' command used in a comment that is not attached to a template declaration}}
-/// \tparam T Aaa
-void test_tparam2(int aaa);
-
-// expected-warning at +1 {{empty paragraph passed to '\tparam' command}}
-/// \tparam
-/// \param aaa Blah blah
-template<typename T>
-void test_tparam3(T aaa);
-
-// expected-warning at +1 {{template parameter 'T' not found in the template declaration}} expected-note at +1 {{did you mean 'TT'?}}
-/// \tparam T Aaa
-template<typename TT>
-void test_tparam4(TT aaa);
-
-// expected-warning at +1 {{template parameter 'T' not found in the template declaration}} expected-note at +1 {{did you mean 'TT'?}}
-/// \tparam T Aaa
-template<typename TT>
-class test_tparam5 {
-  // expected-warning at +1 {{template parameter 'T' not found in the template declaration}} expected-note at +1 {{did you mean 'TTT'?}}
-  /// \tparam T Aaa
-  template<typename TTT>
-  void test_tparam6(TTT aaa);
-};
-
-/// \tparam T1 Aaa
-/// \tparam T2 Bbb
-template<typename T1, typename T2>
-void test_tparam7(T1 aaa, T2 bbb);
-
-// expected-warning at +1 {{template parameter 'SomTy' not found in the template declaration}} expected-note at +1 {{did you mean 'SomeTy'?}}
-/// \tparam SomTy Aaa
-/// \tparam OtherTy Bbb
-template<typename SomeTy, typename OtherTy>
-void test_tparam8(SomeTy aaa, OtherTy bbb);
-
-// expected-warning at +2 {{template parameter 'T1' is already documented}} expected-note at +1 {{previous documentation}}
-/// \tparam T1 Aaa
-/// \tparam T1 Bbb
-template<typename T1, typename T2>
-void test_tparam9(T1 aaa, T2 bbb);
-
-/// \tparam T Aaa
-/// \tparam TT Bbb
-template<template<typename T> class TT>
-void test_tparam10(TT<int> aaa);
-
-/// \tparam T Aaa
-/// \tparam TT Bbb
-/// \tparam TTT Ccc
-template<template<template<typename T> class TT, class C> class TTT>
-void test_tparam11();
-
-/// \tparam I Aaa
-template<int I>
-void test_tparam12();
-
-template<typename T, typename U>
-class test_tparam13 { };
-
-/// \tparam T Aaa
-template<typename T>
-using test_tparam14 = test_tparam13<T, int>;
-
-// expected-warning at +1 {{template parameter 'U' not found in the template declaration}} expected-note at +1 {{did you mean 'T'?}}
-/// \tparam U Aaa
-template<typename T>
-using test_tparam15 = test_tparam13<T, int>;
-
-// ----
-
-/// \tparam T Aaa
-template<typename T>
-class test_tparam16 { };
-
-typedef test_tparam16<int> test_tparam17;
-typedef test_tparam16<double> test_tparam18;
-
-// ----
-
-template<typename T>
-class test_tparam19;
-
-typedef test_tparam19<int> test_tparam20;
-typedef test_tparam19<double> test_tparam21;
-
-/// \tparam T Aaa
-template<typename T>
-class test_tparam19 { };
-
-// ----
-
-// expected-warning at +1 {{'@tparam' command used in a comment that is not attached to a template declaration}}
-/// @tparam T Aaa
-int test_tparam22;
-
-// ----
-
-
-/// Aaa
-/// \deprecated Bbb
-void test_deprecated_1(int a) __attribute__((deprecated));
-
-// We don't want \deprecated to warn about empty paragraph.  It is fine to use
-// \deprecated by itself without explanations.
-
-/// Aaa
-/// \deprecated
-void test_deprecated_2(int a) __attribute__((deprecated));
-
-/// Aaa
-/// \deprecated
-void test_deprecated_3(int a) __attribute__((availability(macosx,introduced=10.4)));
-
-/// Aaa
-/// \deprecated
-void test_deprecated_4(int a) __attribute__((unavailable));
-
-// expected-warning at +2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note at +3 {{add a deprecation attribute to the declaration to silence this warning}}
-/// Aaa
-/// \deprecated
-void test_deprecated_5(int a);
-
-// expected-warning at +2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note at +3 {{add a deprecation attribute to the declaration to silence this warning}}
-/// Aaa
-/// \deprecated
-void test_deprecated_6(int a) {
-}
-
-// expected-warning at +2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}}
-/// Aaa
-/// \deprecated
-template<typename T>
-void test_deprecated_7(T aaa);
-
-
-// rdar://12397511
-// expected-note at +2 {{previous command '\headerfile' here}}
-// expected-warning at +2 {{duplicated command '\headerfile'}}
-/// \headerfile ""
-/// \headerfile foo.h
-int test__headerfile_1(int a);
-
-
-/// \invariant aaa
-void test_invariant_1(int a);
-
-// expected-warning at +1 {{empty paragraph passed to '\invariant' command}}
-/// \invariant
-void test_invariant_2(int a);
-
-
-// no-warning
-/// \returns Aaa
-int test_returns_right_decl_1(int);
-
-class test_returns_right_decl_2 {
-  // no-warning
-  /// \returns Aaa
-  int test_returns_right_decl_3(int);
-};
-
-// no-warning
-/// \returns Aaa
-template<typename T>
-int test_returns_right_decl_4(T aaa);
-
-// no-warning
-/// \returns Aaa
-template<>
-int test_returns_right_decl_4(int aaa);
-
-/// \returns Aaa
-template<typename T>
-T test_returns_right_decl_5(T aaa);
-
-// expected-warning at +1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
-/// \returns Aaa
-int test_returns_wrong_decl_1_backslash;
-
-// rdar://13066276
-// Check that the diagnostic uses the same command marker as the comment.
-// expected-warning at +1 {{'@returns' command used in a comment that is not attached to a function or method declaration}}
-/// @returns Aaa
-int test_returns_wrong_decl_1_at;
-
-// expected-warning at +1 {{'\return' command used in a comment that is not attached to a function or method declaration}}
-/// \return Aaa
-int test_returns_wrong_decl_2;
-
-// expected-warning at +1 {{'\result' command used in a comment that is not attached to a function or method declaration}}
-/// \result Aaa
-int test_returns_wrong_decl_3;
-
-// expected-warning at +1 {{'\returns' command used in a comment that is attached to a function returning void}}
-/// \returns Aaa
-void test_returns_wrong_decl_4(int);
-
-// expected-warning at +1 {{'\returns' command used in a comment that is attached to a function returning void}}
-/// \returns Aaa
-template<typename T>
-void test_returns_wrong_decl_5(T aaa);
-
-// expected-warning at +1 {{'\returns' command used in a comment that is attached to a function returning void}}
-/// \returns Aaa
-template<>
-void test_returns_wrong_decl_5(int aaa);
-
-// expected-warning at +1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
-/// \returns Aaa
-struct test_returns_wrong_decl_6 { };
-
-// expected-warning at +1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
-/// \returns Aaa
-class test_returns_wrong_decl_7 {
-  // expected-warning at +1 {{'\returns' command used in a comment that is attached to a constructor}}
-  /// \returns Aaa
-  test_returns_wrong_decl_7();
-
-  // expected-warning at +1 {{'\returns' command used in a comment that is attached to a destructor}}
-  /// \returns Aaa
-  ~test_returns_wrong_decl_7();
-};
-
-// expected-warning at +1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
-/// \returns Aaa
-enum test_returns_wrong_decl_8 {
-  // expected-warning at +1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
-  /// \returns Aaa
-  test_returns_wrong_decl_9
-};
-
-// expected-warning at +1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
-/// \returns Aaa
-namespace test_returns_wrong_decl_10 { };
-
-// rdar://13094352
-// expected-warning at +1 {{'@function' command should be used in a comment attached to a function declaration}}
-/*!	@function test_function
-*/
-typedef unsigned int Base64Flags;
-unsigned test_function(Base64Flags inFlags);
-
-// expected-warning at +1 {{'@callback' command should be used in a comment attached to a pointer to function declaration}}
-/*! @callback test_callback
-*/
-typedef unsigned int BaseFlags;
-unsigned (*test_callback)(BaseFlags inFlags);
-
-// expected-warning at +1 {{'\endverbatim' command does not terminate a verbatim text block}}
-/// \endverbatim
-int test_verbatim_1();
-
-// expected-warning at +1 {{'\endcode' command does not terminate a verbatim text block}}
-/// \endcode
-int test_verbatim_2();
-
-// FIXME: we give a bad diagnostic here because we throw away non-documentation
-// comments early.
-//
-// expected-warning at +3 {{'\endcode' command does not terminate a verbatim text block}}
-/// \code
-//  foo
-/// \endcode
-int test_verbatim_3();
-
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-int test1; ///< \brief\author Aaa
-
-// expected-warning at +2 {{empty paragraph passed to '\brief' command}}
-// expected-warning at +2 {{empty paragraph passed to '\brief' command}}
-int test2, ///< \brief\author Aaa
-    test3; ///< \brief\author Aaa
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-int test4; ///< \brief
-           ///< \author Aaa
-
-
-class TestRelates {};
-
-/// \relates TestRelates
-/// \brief Aaa
-void test_relates_1();
-
-/// \related TestRelates
-/// \brief Aaa
-void test_relates_2();
-
-/// \relatesalso TestRelates
-/// \brief Aaa
-void test_relates_3();
-
-/// \relatedalso TestRelates
-/// \brief Aaa
-void test_relates_4();
-
-
-// Check that we attach the comment to the declaration during parsing in the
-// following cases.  The test is based on the fact that we don't parse
-// documentation comments that are not attached to anything.
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-int test_attach1;
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-int test_attach2(int);
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-struct test_attach3 {
-  // expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-  /// \brief\author Aaa
-  int test_attach4;
-
-  // expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-  int test_attach5; ///< \brief\author Aaa
-
-  // expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-  /// \brief\author Aaa
-  int test_attach6(int);
-};
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-class test_attach7 {
-  // expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-  /// \brief\author Aaa
-  int test_attach8;
-
-  // expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-  int test_attach9; ///< \brief\author Aaa
-
-  // expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-  /// \brief\author Aaa
-  int test_attach10(int);
-};
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-enum test_attach9 {
-  // expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-  /// \brief\author Aaa
-  test_attach10,
-
-  // expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-  test_attach11 ///< \brief\author Aaa
-};
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-struct test_noattach12 *test_attach13;
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-typedef struct test_noattach14 *test_attach15;
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-typedef struct test_attach16 { int a; } test_attach17;
-
-struct S { int a; };
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-struct S *test_attach18;
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-typedef struct S *test_attach19;
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-struct test_attach20;
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-typedef struct test_attach21 {
-  // expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-  /// \brief\author Aaa
-  int test_attach22;
-} test_attach23;
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-namespace test_attach24 {
-  // expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-  /// \brief\author Aaa
-  namespace test_attach25 {
-  }
-}
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<typename T>
-void test_attach26(T aaa);
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<typename T, typename U>
-void test_attach27(T aaa, U bbb);
-
-// expected-warning at +2 {{empty paragraph passed to '\brief' command}}
-// expected-warning at +2 {{template parameter 'T' not found in the template declaration}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<>
-void test_attach27(int aaa, int bbb);
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<typename T>
-class test_attach28 {
-  T aaa;
-};
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-using test_attach29 = test_attach28<int>;
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<typename T, typename U>
-class test_attach30 { };
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<typename T>
-class test_attach30<T, int> { };
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-template<>
-class test_attach30<int, int> { };
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-template<typename T>
-using test_attach31 = test_attach30<T, int>;
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<typename T, typename U, typename V>
-class test_attach32 { };
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<typename T, typename U>
-class test_attach32<T, U, int> { };
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<typename T>
-class test_attach32<T, int, int> { };
-
-// expected-warning at +2 {{empty paragraph passed to '\brief' command}}
-// expected-warning at +2 {{template parameter 'T' not found in the template declaration}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<>
-class test_attach32<int, int, int> { };
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-class test_attach33 {
-  // expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-  /// \brief\author Aaa
-  /// \tparam T Aaa
-  template<typename T, typename U>
-  void test_attach34(T aaa, U bbb);
-};
-
-template<typename T>
-class test_attach35 {
-  // expected-warning at +2 {{empty paragraph passed to '\brief' command}}
-  // expected-warning at +2 {{template parameter 'T' not found in the template declaration}}
-  /// \brief\author Aaa
-  /// \tparam T Aaa
-  template<typename TT, typename UU>
-  void test_attach36(TT aaa, UU bbb);
-};
-
-// expected-warning at +2 {{empty paragraph passed to '\brief' command}}
-// expected-warning at +2 {{template parameter 'T' not found in the template declaration}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<> template<>
-void test_attach35<int>::test_attach36(int aaa, int bbb) {}
-
-template<typename T>
-class test_attach37 {
-  // expected-warning at +2 {{empty paragraph passed to '\brief' command}}
-  // expected-warning at +2 {{'\tparam' command used in a comment that is not attached to a template declaration}}
-  /// \brief\author Aaa
-  /// \tparam T Aaa
-  void test_attach38(int aaa, int bbb);
-
-  void test_attach39(int aaa, int bbb);
-};
-
-// expected-warning at +2 {{empty paragraph passed to '\brief' command}}
-// expected-warning at +2 {{template parameter 'T' not found in the template declaration}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<>
-void test_attach37<int>::test_attach38(int aaa, int bbb) {}
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-/// \tparam T Aaa
-template<typename T>
-void test_attach37<T>::test_attach39(int aaa, int bbb) {}
-
-// We used to emit warning that parameter 'a' is not found because we parsed
-// the comment in context of the redeclaration which does not have parameter
-// names.
-template <typename T>
-struct test_attach38 {
-  /*!
-    \param a  First param
-    \param b  Second param
-  */
-  template <typename B>
-  void test_attach39(T a, B b);
-};
-
-template <>
-template <typename B>
-void test_attach38<int>::test_attach39(int, B);
-
-
-// PR13411, reduced.  We used to crash on this.
-/**
- * @code Aaa.
- */
-void test_nocrash1(int);
-
-// We used to crash on this.
-// expected-warning at +2 {{empty paragraph passed to '\param' command}}
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \param\brief
-void test_nocrash2(int);
-
-// PR13593, example 1 and 2
-
-/**
-* Bla.
-*/
-template <typename>
-void test_nocrash3();
-
-/// Foo
-template <typename, typename>
-void test_nocrash4() { }
-
-template <typename>
-void test_nocrash3()
-{
-}
-
-// PR13593, example 3
-
-/**
- * aaa
- */
-template <typename T>
-inline T test_nocrash5(T a1)
-{
-    return a1;
-}
-
-///
-//,
-
-inline void test_nocrash6()
-{
-    test_nocrash5(1);
-}
-
-// We used to crash on this.
-
-/*!
-  Blah.
-*/
-typedef const struct test_nocrash7 * test_nocrash8;
-
-// We used to crash on this.
-
-// expected-warning at +1 {{unknown command tag name}}
-/// aaa \unknown aaa \unknown aaa
-int test_nocrash9;
-
-// We used to crash on this.  PR15068
-
-// expected-warning at +2 {{empty paragraph passed to '@param' command}}
-// expected-warning at +2 {{empty paragraph passed to '@param' command}}
-///@param x
-///@param y
-int test_nocrash10(int x, int y);
-
-// expected-warning at +2 {{empty paragraph passed to '@param' command}} expected-warning at +2 {{parameter 'x' not found in the function declaration}}
-// expected-warning at +2 {{empty paragraph passed to '@param' command}} expected-warning at +2 {{parameter 'y' not found in the function declaration}}
-///@param x
-///@param y
-int test_nocrash11();
-
-// expected-warning at +3 {{empty paragraph passed to '@param' command}} expected-warning at +3 {{parameter 'x' not found in the function declaration}}
-// expected-warning at +3 {{empty paragraph passed to '@param' command}} expected-warning at +3 {{parameter 'y' not found in the function declaration}}
-/**
- at param x
- at param y
-**/
-int test_nocrash12();
-
-// expected-warning at +2 {{empty paragraph passed to '@param' command}}
-// expected-warning at +1 {{empty paragraph passed to '@param' command}}
-///@param x at param y
-int test_nocrash13(int x, int y);
-
-// rdar://12379114
-// expected-warning at +2 {{'@union' command should not be used in a comment attached to a non-union declaration}}
-/*!
-   @union U This is new 
-*/
-struct U { int iS; };
-
-/*!
-  @union U1
-*/
-union U1 {int i; };
-
-// expected-warning at +2 {{'@struct' command should not be used in a comment attached to a non-struct declaration}}
-/*!
- @struct S2
-*/
-union S2 {};
-
-/*!
-  @class C1
-*/
-class C1;
-
-/*!
-  @struct S3;
-*/
-class S3;
-
-// rdar://14124702
-//----------------------------------------------------------------------
-/// @class Predicate Predicate.h "lldb/Host/Predicate.h"
-/// @brief A C++ wrapper class for providing threaded access to a value
-/// of type T.
-///
-/// A templatized class.
-/// specified values.
-//----------------------------------------------------------------------
-template <class T, class T1>
-class Predicate
-{
-};
-
-//----------------------------------------------------------------------
-/// @class Predicate<int, char> Predicate.h "lldb/Host/Predicate.h"
-/// @brief A C++ wrapper class for providing threaded access to a value
-/// of type T.
-///
-/// A template specilization class.
-//----------------------------------------------------------------------
-template<> class Predicate<int, char>
-{
-};
-
-//----------------------------------------------------------------------
-/// @class Predicate<T, int> Predicate.h "lldb/Host/Predicate.h"
-/// @brief A C++ wrapper class for providing threaded access to a value
-/// of type T.
-///
-/// A partial specialization template class.
-//----------------------------------------------------------------------
-template<class T> class Predicate<T, int>
-{
-};
-
-/*!     @function test_function
-*/
-template <class T> T test_function (T arg);
-
-/*!     @function test_function<int>
-*/
-template <> int test_function<int> (int arg);
diff --git a/test/Sema/warn-documentation.m b/test/Sema/warn-documentation.m
deleted file mode 100644
index 5e95e2a..0000000
--- a/test/Sema/warn-documentation.m
+++ /dev/null
@@ -1,231 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-objc-root-class -Wdocumentation -Wdocumentation-pedantic -verify %s
-
- at class NSString;
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
- at interface Test1
-// expected-warning at +2 {{empty paragraph passed to '\brief' command}}
-/**
- * \brief\author Aaa
- * \param aaa Aaa
- * \param bbb Bbb
- */
-+ (NSString *)test1:(NSString *)aaa suffix:(NSString *)bbb;
-
-// expected-warning at +2 {{parameter 'aab' not found in the function declaration}} expected-note at +2 {{did you mean 'aaa'?}}
-/**
- * \param aab Aaa
- */
-+ (NSString *)test2:(NSString *)aaa;
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
- at property int test3; // a property: ObjCPropertyDecl
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
- at property int test4; // a property: ObjCPropertyDecl
- at end
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
- at interface Test1()
- at end
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
- at implementation Test1 // a class implementation : ObjCImplementationDecl
-+ (NSString *)test1:(NSString *)aaa suffix:(NSString *)bbb {
-  return 0;
-}
-
-+ (NSString *)test2:(NSString *)aaa {
-  return 0;
-}
-
- at synthesize test3; // a property implementation: ObjCPropertyImplDecl
- at dynamic test4; // a property implementation: ObjCPropertyImplDecl
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-NSString *_test5;
- at end
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
- at interface Test1(Test1Category) // a category: ObjCCategoryDecl
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
-+ (NSString *)test3:(NSString *)aaa;
- at end
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
- at implementation Test1(Test1Category) // a category implementation: ObjCCategoryImplDecl
-+ (NSString *)test3:(NSString *)aaa {
-  return 0;
-}
- at end
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
- at protocol TestProto1 // a protocol: ObjCProtocolDecl
- at end
-
-int a;
-
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
-/// \brief\author Aaa
- at interface Test4
- at end
-
-int b;
-
- at interface TestReturns1
-/// \returns Aaa
-- (int)test1:(NSString *)aaa;
-
-// expected-warning at +1 {{'\returns' command used in a comment that is attached to a method returning void}}
-/// \returns Aaa
-- (void)test2:(NSString *)aaa;
- at end
-
-// expected-warning at +2 {{parameter 'bbb' not found in the function declaration}} expected-note at +2 {{did you mean 'ccc'?}}
-/// \param aaa Meow.
-/// \param bbb Bbb.
-/// \returns aaa.
-typedef int (^test_param1)(int aaa, int ccc);
-
-// rdar://13094352
-// expected-warning at +2 {{'@method' command should be used in a comment attached to an Objective-C method declaration}}
- at interface I
-/*!	@method Base64EncodeEx
-*/
-typedef id ID;
-- (unsigned) Base64EncodeEx : (ID)Arg;
- at end
-
-// rdar://12379114
-// expected-warning at +5 {{'@interface' command should not be used in a comment attached to a non-interface declaration}} 
-// expected-warning at +5 {{'@classdesign' command should not be used in a comment attached to a non-container declaration}}
-// expected-warning at +5 {{'@coclass' command should not be used in a comment attached to a non-container declaration}} 
- at interface NSObject @end
-/*!
- at interface IOCommandGate
- at classdesign Multiple paragraphs go here.
- at coclass myCoClass 
-*/
-
-typedef id OBJ;
- at interface IOCommandGate : NSObject {
-  OBJ iv;
-}
- at end
-
-// rdar://12379114
-// expected-warning at +4 {{'@methodgroup' command should be used in a comment attached to an Objective-C method declaration}}
-// expected-warning at +6 {{'@method' command should be used in a comment attached to an Objective-C method declaratio}}
- at interface rdar12379114
-/*!
- @methodgroup Creating a request
-*/
-/*!
- @method initWithTimeout is the 2nd method
-*/
-typedef unsigned int NSTimeInterval;
-- (id)initWithTimeout:(NSTimeInterval)timeout;
- at end
-
-// expected-warning at +2 {{'@protocol' command should not be used in a comment attached to a non-protocol declaration}}
-/*!
- at protocol PROTO
-*/
-struct S;
-
-/*!
-  @interface NSArray This is an array
-*/
- at class NSArray;
- at interface NSArray @end
-
-// expected-warning at +3 {{unknown command tag name}}
-/*!
- at interface NSMutableArray 
- at super NSArray
-*/
- at interface NSMutableArray : NSArray @end
-
-/*!
-  @protocol MyProto
-*/
- at protocol MyProto @end
-
-// expected-warning at +2 {{'@protocol' command should not be used in a comment attached to a non-protocol declaration}}
-/*!
- @protocol MyProto
-*/
- at interface INTF <MyProto> @end
-
-// expected-warning at +2 {{'@struct' command should not be used in a comment attached to a non-struct declaration}}
-/*!
-  @struct S1 THIS IS IT
-*/
- at interface S1 @end
-
-// expected-warning at +1 {{unknown command tag name}}
-/// \t bbb IS_DOXYGEN_END
-int FooBar();
-
-// rdar://13836387
-/** \brief Module handling the incoming notifications from the system.
- *
- * This includes:
- * - Network Reachability
- * - Power State
- * - Low Disk
- */
- at interface BRC : NSObject
-- (void)removeReach:(NSObject*)observer;
- at end
-
- at implementation BRC : NSObject
-- (void)removeReach:(NSObject*)observer // expected-note {{previous declaration is here}}
-{
-}
-- (void)removeReach:(NSObject*)observer // expected-error {{duplicate declaration of method 'removeReach:'}}
-{
-}
- at end
-
-// rdar://13927330
-/// @class Asset  <- '@class' may be used in a comment attached to a an interface declaration
- at interface Asset : NSObject
- at end
-
-// rdar://14024851 Check that this does not enter an infinite loop
- at interface rdar14024851
--(void)meth; // expected-note {{declared here}}
- at end
-
- at implementation rdar14024851 // expected-warning {{method definition for 'meth' not found}} expected-note {{previous definition}}
- at end
-
- at implementation rdar14024851 // expected-error {{reimplementation}}
-/// \brief comment
--(void)meth {}
- at end
-
-// rdar://14124644
- at interface test_vararg1
-/// @param[in] arg somthing
-/// @param[in] ... This is vararg
-- (void) VarArgMeth : (id)arg, ...;
- at end
-
- at implementation test_vararg1
-/// @param[in] arg somthing
-/// @param[in] ... This is vararg
-- (void) VarArgMeth : (id)arg, ... {}
- at end
-
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c
index 461765c..c07bdc6 100644
--- a/tools/c-index-test/c-index-test.c
+++ b/tools/c-index-test/c-index-test.c
@@ -354,6 +354,8 @@ static void printVersion(const char *Prefix, CXVersion Version) {
   printf(".%d", Version.Subminor);
 }
 
+#ifdef LIBCLANG_HAS_CXCOMMENT
+
 struct CommentASTDumpingContext {
   int IndentLevel;
 };
@@ -633,6 +635,8 @@ static void PrintCursorComments(CXCursor Cursor,
   }
 }
 
+#endif
+
 typedef struct {
   unsigned line;
   unsigned col;
@@ -646,8 +650,13 @@ static int lineCol_cmp(const void *p1, const void *p2) {
   return (int)lhs->col - (int)rhs->col;
 }
 
-static void PrintCursor(CXCursor Cursor,
-                        CommentXMLValidationData *ValidationData) {
+static void PrintCursor(CXCursor Cursor
+#ifdef LIBCLANG_HAS_CXCOMMENT
+                        , CommentXMLValidationData *ValidationData
+#else
+                        , void *ValidationData
+#endif
+                        ) {
   CXTranslationUnit TU = clang_Cursor_getTranslationUnit(Cursor);
   if (clang_isInvalid(Cursor.kind)) {
     CXString ks = clang_getCursorKindSpelling(Cursor.kind);
@@ -868,7 +877,9 @@ static void PrintCursor(CXCursor Cursor,
         PrintRange(RefNameRange, "RefName");
     }
 
+#ifdef LIBCLANG_HAS_CXCOMMENT
     PrintCursorComments(Cursor, ValidationData);
+#endif
 
     {
       unsigned PropAttrs = clang_Cursor_getObjCPropertyAttributes(Cursor, 0);
@@ -1038,7 +1049,9 @@ static void PrintCursorExtent(CXCursor C) {
 typedef struct {
   CXTranslationUnit TU;
   enum CXCursorKind *Filter;
+#ifdef LIBCLANG_HAS_CXCOMMENT
   CommentXMLValidationData ValidationData;
+#endif
 } VisitorData;
 
 
@@ -1052,7 +1065,11 @@ enum CXChildVisitResult FilteredPrintingVisitor(CXCursor Cursor,
     clang_getSpellingLocation(Loc, 0, &line, &column, 0);
     printf("// %s: %s:%d:%d: ", FileCheckPrefix,
            GetCursorSource(Cursor), line, column);
+#ifdef LIBCLANG_HAS_CXCOMMENT
     PrintCursor(Cursor, &Data->ValidationData);
+#else
+    PrintCursor(Cursor, 0);
+#endif
     PrintCursorExtent(Cursor);
     if (clang_isDeclaration(Cursor.kind)) {
       enum CX_CXXAccessSpecifier access = clang_getCXXAccessSpecifier(Cursor);
@@ -1122,7 +1139,9 @@ static enum CXChildVisitResult FunctionScanVisitor(CXCursor Cursor,
       } else if (Ref.kind != CXCursor_FunctionDecl) {
         printf("// %s: %s:%d:%d: ", FileCheckPrefix, GetCursorSource(Ref),
                curLine, curColumn);
+#ifdef LIBCLANG_HAS_CXCOMMENT
         PrintCursor(Ref, &Data->ValidationData);
+#endif
         printf("\n");
       }
     }
@@ -1421,11 +1440,14 @@ static int perform_test_load(CXIndex Idx, CXTranslationUnit TU,
 
     Data.TU = TU;
     Data.Filter = ck;
+
+#ifdef LIBCLANG_HAS_CXCOMMENT
     Data.ValidationData.CommentSchemaFile = CommentSchemaFile;
 #ifdef CLANG_HAVE_LIBXML
     Data.ValidationData.RNGParser = NULL;
     Data.ValidationData.Schema = NULL;
 #endif
+#endif
     clang_visitChildren(clang_getTranslationUnitCursor(TU), Visitor, &Data);
   }
 
@@ -1478,10 +1500,14 @@ int perform_test_load_source(int argc, const char **argv,
                            !strcmp(filter, "local-display"))? 1 : 0,
                           /* displayDiagnostics=*/1);
 
+#ifdef LIBCLANG_HAS_CXCOMMENT
   if ((CommentSchemaFile = parse_comments_schema(argc, argv))) {
     argc--;
     argv++;
   }
+#else
+  CommentSchemaFile = 0;
+#endif
 
   if (parse_remapped_files(argc, argv, 0, &unsaved_files, &num_unsaved_files)) {
     clang_disposeIndex(Idx);
diff --git a/tools/diagtool/DiagnosticNames.cpp b/tools/diagtool/DiagnosticNames.cpp
index f5df059..aced124 100644
--- a/tools/diagtool/DiagnosticNames.cpp
+++ b/tools/diagtool/DiagnosticNames.cpp
@@ -38,7 +38,6 @@ static const DiagnosticRecord BuiltinDiagnosticsByID[] = {
 #include "clang/Basic/DiagnosticLexKinds.inc"
 #include "clang/Basic/DiagnosticParseKinds.inc"
 #include "clang/Basic/DiagnosticASTKinds.inc"
-#include "clang/Basic/DiagnosticCommentKinds.inc"
 #include "clang/Basic/DiagnosticSemaKinds.inc"
 #include "clang/Basic/DiagnosticAnalysisKinds.inc"
 #undef DIAG
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 50e7c68..29de887 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -15,7 +15,6 @@
 #include "CIndexer.h"
 #include "CIndexDiagnostic.h"
 #include "CLog.h"
-#include "CXComment.h"
 #include "CXCursor.h"
 #include "CXSourceLocation.h"
 #include "CXString.h"
@@ -31,7 +30,6 @@
 #include "clang/Frontend/ASTUnit.h"
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/FrontendDiagnostic.h"
-#include "clang/Index/CommentToXML.h"
 #include "clang/Lex/HeaderSearch.h"
 #include "clang/Lex/Lexer.h"
 #include "clang/Lex/PreprocessingRecord.h"
@@ -72,7 +70,6 @@ CXTranslationUnit cxtu::MakeCXTranslationUnit(CIndexer *CIdx, ASTUnit *AU) {
   D->StringPool = new cxstring::CXStringPool();
   D->Diagnostics = 0;
   D->OverridenCursorsPool = createOverridenCXCursorsPool();
-  D->CommentToXML = 0;
   return D;
 }
 
@@ -2959,7 +2956,6 @@ void clang_disposeTranslationUnit(CXTranslationUnit CTUnit) {
     delete CTUnit->StringPool;
     delete static_cast<CXDiagnosticSetImpl *>(CTUnit->Diagnostics);
     disposeOverridenCXCursorsPool(CTUnit->OverridenCursorsPool);
-    delete CTUnit->CommentToXML;
     delete CTUnit;
   }
 }
@@ -6286,6 +6282,7 @@ CXString clang_Cursor_getRawCommentText(CXCursor C) {
   return cxstring::createRef(RawText);
 }
 
+// FIXME: DOC: Split this out too?
 CXString clang_Cursor_getBriefCommentText(CXCursor C) {
   if (!clang_isDeclaration(C.kind))
     return cxstring::createNull();
@@ -6305,17 +6302,6 @@ CXString clang_Cursor_getBriefCommentText(CXCursor C) {
   return cxstring::createNull();
 }
 
-CXComment clang_Cursor_getParsedComment(CXCursor C) {
-  if (!clang_isDeclaration(C.kind))
-    return cxcomment::createCXComment(NULL, NULL);
-
-  const Decl *D = getCursorDecl(C);
-  const ASTContext &Context = getCursorContext(C);
-  const comments::FullComment *FC = Context.getCommentForDecl(D, /*PP=*/ NULL);
-
-  return cxcomment::createCXComment(FC, getCursorTU(C));
-}
-
 CXModule clang_Cursor_getModule(CXCursor C) {
   if (C.kind == CXCursor_ModuleImportDecl) {
     if (const ImportDecl *ImportD =
diff --git a/tools/libclang/CXComment.cpp b/tools/libclang/CXComment.cpp
index 2c4f269..7ab0fe6 100644
--- a/tools/libclang/CXComment.cpp
+++ b/tools/libclang/CXComment.cpp
@@ -12,11 +12,14 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang-c/Index.h"
+
+// FIXME: DOC
+#if 0
+#include "clang-c/CXComment.h"
 #include "CXComment.h"
 #include "CXCursor.h"
 #include "CXString.h"
 #include "clang/AST/Decl.h"
-#include "clang/Index/CommentToXML.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/Support/ErrorHandling.h"
@@ -28,6 +31,17 @@ using namespace clang::cxcomment;
 
 extern "C" {
 
+CXComment clang_Cursor_getParsedComment(CXCursor C) {
+  if (!clang_isDeclaration(C.kind))
+    return cxcomment::createCXComment(NULL, NULL);
+
+  const Decl *D = getCursorDecl(C);
+  const ASTContext &Context = getCursorContext(C);
+  const comments::FullComment *FC = Context.getCommentForDecl(D, /*PP=*/ NULL);
+
+  return cxcomment::createCXComment(FC, getCursorTU(C));
+}
+
 enum CXCommentKind clang_Comment_getKind(CXComment CXC) {
   const Comment *C = getASTNode(CXC);
   if (!C)
@@ -394,4 +408,5 @@ CXString clang_FullComment_getAsXML(CXComment CXC) {
 }
 
 } // end extern "C"
+#endif
 
diff --git a/tools/libclang/CXComment.h b/tools/libclang/CXComment.h
index 1e2561d..2c1cac2 100644
--- a/tools/libclang/CXComment.h
+++ b/tools/libclang/CXComment.h
@@ -17,7 +17,6 @@
 #include "CXTranslationUnit.h"
 #include "clang-c/Index.h"
 #include "clang/AST/ASTContext.h"
-#include "clang/AST/Comment.h"
 #include "clang/Frontend/ASTUnit.h"
 
 namespace clang {
diff --git a/tools/libclang/CXTranslationUnit.h b/tools/libclang/CXTranslationUnit.h
index 13183be..aa60d59 100644
--- a/tools/libclang/CXTranslationUnit.h
+++ b/tools/libclang/CXTranslationUnit.h
@@ -32,7 +32,6 @@ struct CXTranslationUnitImpl {
   clang::cxstring::CXStringPool *StringPool;
   void *Diagnostics;
   void *OverridenCursorsPool;
-  clang::index::CommentToXMLConverter *CommentToXML;
 };
 
 namespace clang {
diff --git a/tools/libclang/libclang.exports b/tools/libclang/libclang.exports
index df8d85c..fb12be3 100644
--- a/tools/libclang/libclang.exports
+++ b/tools/libclang/libclang.exports
@@ -9,7 +9,6 @@ clang_CXXMethod_isVirtual
 clang_Cursor_getArgument
 clang_Cursor_getBriefCommentText
 clang_Cursor_getCommentRange
-clang_Cursor_getParsedComment
 clang_Cursor_getRawCommentText
 clang_Cursor_getNumArguments
 clang_Cursor_getObjCDeclQualifiers
@@ -33,34 +32,6 @@ clang_Module_getTopLevelHeader
 clang_IndexAction_create
 clang_IndexAction_dispose
 clang_Range_isNull
-clang_Comment_getKind
-clang_Comment_getNumChildren
-clang_Comment_getChild
-clang_Comment_isWhitespace
-clang_InlineContentComment_hasTrailingNewline
-clang_TextComment_getText
-clang_InlineCommandComment_getCommandName
-clang_InlineCommandComment_getRenderKind
-clang_InlineCommandComment_getNumArgs
-clang_InlineCommandComment_getArgText
-clang_HTMLTagComment_getTagName
-clang_HTMLStartTagComment_isSelfClosing
-clang_HTMLStartTag_getNumAttrs
-clang_HTMLStartTag_getAttrName
-clang_HTMLStartTag_getAttrValue
-clang_BlockCommandComment_getCommandName
-clang_BlockCommandComment_getNumArgs
-clang_BlockCommandComment_getArgText
-clang_BlockCommandComment_getParagraph
-clang_ParamCommandComment_getParamName
-clang_ParamCommandComment_isParamIndexValid
-clang_ParamCommandComment_getParamIndex
-clang_ParamCommandComment_isDirectionExplicit
-clang_ParamCommandComment_getDirection
-clang_TParamCommandComment_getParamName
-clang_TParamCommandComment_isParamPositionValid
-clang_TParamCommandComment_getDepth
-clang_TParamCommandComment_getIndex
 clang_Type_getAlignOf
 clang_Type_getClassType
 clang_Type_getSizeOf
@@ -68,11 +39,6 @@ clang_Type_getOffsetOf
 clang_Type_getNumTemplateArguments
 clang_Type_getTemplateArgumentAsType
 clang_Type_getCXXRefQualifier
-clang_VerbatimBlockLineComment_getText
-clang_VerbatimLineComment_getText
-clang_HTMLTagComment_getAsString
-clang_FullComment_getAsHTML
-clang_FullComment_getAsXML
 clang_annotateTokens
 clang_codeCompleteAt
 clang_codeCompleteGetContainerKind
diff --git a/unittests/AST/CMakeLists.txt b/unittests/AST/CMakeLists.txt
index 9a55626..091b792 100644
--- a/unittests/AST/CMakeLists.txt
+++ b/unittests/AST/CMakeLists.txt
@@ -6,8 +6,6 @@ add_clang_unittest(ASTTests
   ASTContextParentMapTest.cpp
   ASTTypeTraitsTest.cpp
   ASTVectorTest.cpp
-  CommentLexer.cpp
-  CommentParser.cpp
   DeclPrinterTest.cpp
   DeclTest.cpp
   EvaluateAsRValueTest.cpp
diff --git a/unittests/AST/CommentLexer.cpp b/unittests/AST/CommentLexer.cpp
deleted file mode 100644
index fc0fd77..0000000
--- a/unittests/AST/CommentLexer.cpp
+++ /dev/null
@@ -1,1845 +0,0 @@
-//===- unittests/AST/CommentLexer.cpp ------ Comment lexer tests ----------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/AST/CommentLexer.h"
-#include "clang/AST/CommentCommandTraits.h"
-#include "clang/Basic/CommentOptions.h"
-#include "clang/Basic/Diagnostic.h"
-#include "clang/Basic/DiagnosticOptions.h"
-#include "clang/Basic/FileManager.h"
-#include "clang/Basic/SourceManager.h"
-#include "llvm/ADT/STLExtras.h"
-#include "gtest/gtest.h"
-#include <vector>
-
-using namespace llvm;
-using namespace clang;
-
-namespace clang {
-namespace comments {
-
-namespace {
-class CommentLexerTest : public ::testing::Test {
-protected:
-  CommentLexerTest()
-    : FileMgr(FileMgrOpts),
-      DiagID(new DiagnosticIDs()),
-      Diags(DiagID, new DiagnosticOptions, new IgnoringDiagConsumer()),
-      SourceMgr(Diags, FileMgr),
-      Traits(Allocator, CommentOptions()) {
-  }
-
-  FileSystemOptions FileMgrOpts;
-  FileManager FileMgr;
-  IntrusiveRefCntPtr<DiagnosticIDs> DiagID;
-  DiagnosticsEngine Diags;
-  SourceManager SourceMgr;
-  llvm::BumpPtrAllocator Allocator;
-  CommandTraits Traits;
-
-  void lexString(const char *Source, std::vector<Token> &Toks);
-
-  StringRef getCommandName(const Token &Tok) {
-    return Traits.getCommandInfo(Tok.getCommandID())->Name;
-  }
-
-  StringRef getVerbatimBlockName(const Token &Tok) {
-    return Traits.getCommandInfo(Tok.getVerbatimBlockID())->Name;
-  }
-
-  StringRef getVerbatimLineName(const Token &Tok) {
-    return Traits.getCommandInfo(Tok.getVerbatimLineID())->Name;
-  }
-};
-
-void CommentLexerTest::lexString(const char *Source,
-                                 std::vector<Token> &Toks) {
-  MemoryBuffer *Buf = MemoryBuffer::getMemBuffer(Source);
-  FileID File = SourceMgr.createFileIDForMemBuffer(Buf);
-  SourceLocation Begin = SourceMgr.getLocForStartOfFile(File);
-
-  Lexer L(Allocator, Diags, Traits, Begin, Source, Source + strlen(Source));
-
-  while (1) {
-    Token Tok;
-    L.lex(Tok);
-    if (Tok.is(tok::eof))
-      break;
-    Toks.push_back(Tok);
-  }
-}
-
-} // unnamed namespace
-
-// Empty source range should be handled.
-TEST_F(CommentLexerTest, Basic1) {
-  const char *Source = "";
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(0U, Toks.size());
-}
-
-// Empty comments should be handled.
-TEST_F(CommentLexerTest, Basic2) {
-  const char *Sources[] = {
-    "//", "///", "//!", "///<", "//!<"
-  };
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(1U, Toks.size());
-
-    ASSERT_EQ(tok::newline, Toks[0].getKind());
-  }
-}
-
-// Empty comments should be handled.
-TEST_F(CommentLexerTest, Basic3) {
-  const char *Sources[] = {
-    "/**/", "/***/", "/*!*/", "/**<*/", "/*!<*/"
-  };
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(2U, Toks.size());
-
-    ASSERT_EQ(tok::newline, Toks[0].getKind());
-    ASSERT_EQ(tok::newline, Toks[1].getKind());
-  }
-}
-
-// Single comment with plain text.
-TEST_F(CommentLexerTest, Basic4) {
-  const char *Sources[] = {
-    "// Meow",   "/// Meow",    "//! Meow",
-    "// Meow\n", "// Meow\r\n", "//! Meow\r",
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(2U, Toks.size());
-
-    ASSERT_EQ(tok::text,          Toks[0].getKind());
-    ASSERT_EQ(StringRef(" Meow"), Toks[0].getText());
-
-    ASSERT_EQ(tok::newline,       Toks[1].getKind());
-  }
-}
-
-// Single comment with plain text.
-TEST_F(CommentLexerTest, Basic5) {
-  const char *Sources[] = {
-    "/* Meow*/", "/** Meow*/",  "/*! Meow*/"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(3U, Toks.size());
-
-    ASSERT_EQ(tok::text,          Toks[0].getKind());
-    ASSERT_EQ(StringRef(" Meow"), Toks[0].getText());
-
-    ASSERT_EQ(tok::newline,       Toks[1].getKind());
-    ASSERT_EQ(tok::newline,       Toks[2].getKind());
-  }
-}
-
-// Test newline escaping.
-TEST_F(CommentLexerTest, Basic6) {
-  const char *Sources[] = {
-    "// Aaa\\\n"   " Bbb\\ \n"   " Ccc?" "?/\n",
-    "// Aaa\\\r\n" " Bbb\\ \r\n" " Ccc?" "?/\r\n",
-    "// Aaa\\\r"   " Bbb\\ \r"   " Ccc?" "?/\r"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(10U, Toks.size());
-
-    ASSERT_EQ(tok::text,         Toks[0].getKind());
-    ASSERT_EQ(StringRef(" Aaa"), Toks[0].getText());
-    ASSERT_EQ(tok::text,         Toks[1].getKind());
-    ASSERT_EQ(StringRef("\\"),   Toks[1].getText());
-    ASSERT_EQ(tok::newline,      Toks[2].getKind());
-
-    ASSERT_EQ(tok::text,         Toks[3].getKind());
-    ASSERT_EQ(StringRef(" Bbb"), Toks[3].getText());
-    ASSERT_EQ(tok::text,         Toks[4].getKind());
-    ASSERT_EQ(StringRef("\\"),   Toks[4].getText());
-    ASSERT_EQ(tok::text,         Toks[5].getKind());
-    ASSERT_EQ(StringRef(" "),    Toks[5].getText());
-    ASSERT_EQ(tok::newline,      Toks[6].getKind());
-
-    ASSERT_EQ(tok::text,         Toks[7].getKind());
-    ASSERT_EQ(StringRef(" Ccc?" "?/"), Toks[7].getText());
-    ASSERT_EQ(tok::newline,      Toks[8].getKind());
-
-    ASSERT_EQ(tok::newline,      Toks[9].getKind());
-  }
-}
-
-// Check that we skip C-style aligned stars correctly.
-TEST_F(CommentLexerTest, Basic7) {
-  const char *Source =
-    "/* Aaa\n"
-    " * Bbb\r\n"
-    "\t* Ccc\n"
-    "  ! Ddd\n"
-    "  * Eee\n"
-    "  ** Fff\n"
-    " */";
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(15U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" Aaa"), Toks[0].getText());
-  ASSERT_EQ(tok::newline,      Toks[1].getKind());
-
-  ASSERT_EQ(tok::text,         Toks[2].getKind());
-  ASSERT_EQ(StringRef(" Bbb"), Toks[2].getText());
-  ASSERT_EQ(tok::newline,      Toks[3].getKind());
-
-  ASSERT_EQ(tok::text,         Toks[4].getKind());
-  ASSERT_EQ(StringRef(" Ccc"), Toks[4].getText());
-  ASSERT_EQ(tok::newline,      Toks[5].getKind());
-
-  ASSERT_EQ(tok::text,            Toks[6].getKind());
-  ASSERT_EQ(StringRef("  ! Ddd"), Toks[6].getText());
-  ASSERT_EQ(tok::newline,         Toks[7].getKind());
-
-  ASSERT_EQ(tok::text,         Toks[8].getKind());
-  ASSERT_EQ(StringRef(" Eee"), Toks[8].getText());
-  ASSERT_EQ(tok::newline,      Toks[9].getKind());
-
-  ASSERT_EQ(tok::text,          Toks[10].getKind());
-  ASSERT_EQ(StringRef("* Fff"), Toks[10].getText());
-  ASSERT_EQ(tok::newline,       Toks[11].getKind());
-
-  ASSERT_EQ(tok::text,         Toks[12].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[12].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[13].getKind());
-  ASSERT_EQ(tok::newline,      Toks[14].getKind());
-}
-
-// A command marker followed by comment end.
-TEST_F(CommentLexerTest, DoxygenCommand1) {
-  const char *Sources[] = { "//@", "///@", "//!@" };
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(2U, Toks.size());
-
-    ASSERT_EQ(tok::text,          Toks[0].getKind());
-    ASSERT_EQ(StringRef("@"),     Toks[0].getText());
-
-    ASSERT_EQ(tok::newline,       Toks[1].getKind());
-  }
-}
-
-// A command marker followed by comment end.
-TEST_F(CommentLexerTest, DoxygenCommand2) {
-  const char *Sources[] = { "/*@*/", "/**@*/", "/*!@*/"};
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(3U, Toks.size());
-
-    ASSERT_EQ(tok::text,          Toks[0].getKind());
-    ASSERT_EQ(StringRef("@"),     Toks[0].getText());
-
-    ASSERT_EQ(tok::newline,       Toks[1].getKind());
-    ASSERT_EQ(tok::newline,       Toks[2].getKind());
-  }
-}
-
-// A command marker followed by comment end.
-TEST_F(CommentLexerTest, DoxygenCommand3) {
-  const char *Sources[] = { "/*\\*/", "/**\\*/" };
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(3U, Toks.size());
-
-    ASSERT_EQ(tok::text,           Toks[0].getKind());
-    ASSERT_EQ(StringRef("\\"),     Toks[0].getText());
-
-    ASSERT_EQ(tok::newline,        Toks[1].getKind());
-    ASSERT_EQ(tok::newline,        Toks[2].getKind());
-  }
-}
-
-// Doxygen escape sequences.
-TEST_F(CommentLexerTest, DoxygenCommand4) {
-  const char *Sources[] = {
-    "/// \\\\ \\@ \\& \\$ \\# \\< \\> \\% \\\" \\. \\::",
-    "/// @\\ @@ @& @$ @# @< @> @% @\" @. @::"
-  };
-  const char *Text[] = {
-    " ",
-    "\\", " ", "@", " ", "&", " ", "$",  " ", "#", " ",
-    "<",  " ", ">", " ", "%", " ", "\"", " ", ".", " ",
-    "::", ""
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(array_lengthof(Text), Toks.size());
-
-    for (size_t j = 0, e = Toks.size(); j != e; j++) {
-      if(Toks[j].is(tok::text))
-        ASSERT_EQ(StringRef(Text[j]), Toks[j].getText())
-          << "index " << i;
-    }
-  }
-}
-
-// A command marker followed by a non-letter that is not a part of an escape
-// sequence.
-TEST_F(CommentLexerTest, DoxygenCommand5) {
-  const char *Source = "/// \\^ \\0";
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(6U, Toks.size());
-
-  ASSERT_EQ(tok::text,       Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),  Toks[0].getText());
-
-  ASSERT_EQ(tok::text,       Toks[1].getKind());
-  ASSERT_EQ(StringRef("\\"), Toks[1].getText());
-
-  ASSERT_EQ(tok::text,       Toks[2].getKind());
-  ASSERT_EQ(StringRef("^ "), Toks[2].getText());
-
-  ASSERT_EQ(tok::text,       Toks[3].getKind());
-  ASSERT_EQ(StringRef("\\"), Toks[3].getText());
-
-  ASSERT_EQ(tok::text,       Toks[4].getKind());
-  ASSERT_EQ(StringRef("0"),  Toks[4].getText());
-
-  ASSERT_EQ(tok::newline,    Toks[5].getKind());
-}
-
-TEST_F(CommentLexerTest, DoxygenCommand6) {
-  const char *Source = "/// \\brief Aaa.";
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,          Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),     Toks[0].getText());
-
-  ASSERT_EQ(tok::backslash_command, Toks[1].getKind());
-  ASSERT_EQ(StringRef("brief"), getCommandName(Toks[1]));
-
-  ASSERT_EQ(tok::text,          Toks[2].getKind());
-  ASSERT_EQ(StringRef(" Aaa."), Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,       Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, DoxygenCommand7) {
-  const char *Source = "/// \\em\\em \\em\t\\em\n";
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(8U, Toks.size());
-
-  ASSERT_EQ(tok::text,       Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),  Toks[0].getText());
-
-  ASSERT_EQ(tok::backslash_command, Toks[1].getKind());
-  ASSERT_EQ(StringRef("em"), getCommandName(Toks[1]));
-
-  ASSERT_EQ(tok::backslash_command, Toks[2].getKind());
-  ASSERT_EQ(StringRef("em"), getCommandName(Toks[2]));
-
-  ASSERT_EQ(tok::text,       Toks[3].getKind());
-  ASSERT_EQ(StringRef(" "),  Toks[3].getText());
-
-  ASSERT_EQ(tok::backslash_command, Toks[4].getKind());
-  ASSERT_EQ(StringRef("em"), getCommandName(Toks[4]));
-
-  ASSERT_EQ(tok::text,       Toks[5].getKind());
-  ASSERT_EQ(StringRef("\t"), Toks[5].getText());
-
-  ASSERT_EQ(tok::backslash_command, Toks[6].getKind());
-  ASSERT_EQ(StringRef("em"), getCommandName(Toks[6]));
-
-  ASSERT_EQ(tok::newline,    Toks[7].getKind());
-}
-
-TEST_F(CommentLexerTest, DoxygenCommand8) {
-  const char *Source = "/// @em at em @em\t at em\n";
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(8U, Toks.size());
-
-  ASSERT_EQ(tok::text,       Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),  Toks[0].getText());
-
-  ASSERT_EQ(tok::at_command, Toks[1].getKind());
-  ASSERT_EQ(StringRef("em"), getCommandName(Toks[1]));
-
-  ASSERT_EQ(tok::at_command, Toks[2].getKind());
-  ASSERT_EQ(StringRef("em"), getCommandName(Toks[2]));
-
-  ASSERT_EQ(tok::text,       Toks[3].getKind());
-  ASSERT_EQ(StringRef(" "),  Toks[3].getText());
-
-  ASSERT_EQ(tok::at_command, Toks[4].getKind());
-  ASSERT_EQ(StringRef("em"), getCommandName(Toks[4]));
-
-  ASSERT_EQ(tok::text,       Toks[5].getKind());
-  ASSERT_EQ(StringRef("\t"), Toks[5].getText());
-
-  ASSERT_EQ(tok::at_command, Toks[6].getKind());
-  ASSERT_EQ(StringRef("em"), getCommandName(Toks[6]));
-
-  ASSERT_EQ(tok::newline,    Toks[7].getKind());
-}
-
-TEST_F(CommentLexerTest, DoxygenCommand9) {
-  const char *Source = "/// \\aaa\\bbb \\ccc\t\\ddd\n";
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(8U, Toks.size());
-
-  ASSERT_EQ(tok::text,        Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),   Toks[0].getText());
-
-  ASSERT_EQ(tok::unknown_command, Toks[1].getKind());
-  ASSERT_EQ(StringRef("aaa"), Toks[1].getUnknownCommandName());
-
-  ASSERT_EQ(tok::unknown_command, Toks[2].getKind());
-  ASSERT_EQ(StringRef("bbb"), Toks[2].getUnknownCommandName());
-
-  ASSERT_EQ(tok::text,        Toks[3].getKind());
-  ASSERT_EQ(StringRef(" "),   Toks[3].getText());
-
-  ASSERT_EQ(tok::unknown_command, Toks[4].getKind());
-  ASSERT_EQ(StringRef("ccc"), Toks[4].getUnknownCommandName());
-
-  ASSERT_EQ(tok::text,        Toks[5].getKind());
-  ASSERT_EQ(StringRef("\t"),  Toks[5].getText());
-
-  ASSERT_EQ(tok::unknown_command, Toks[6].getKind());
-  ASSERT_EQ(StringRef("ddd"), Toks[6].getUnknownCommandName());
-
-  ASSERT_EQ(tok::newline,     Toks[7].getKind());
-}
-
-TEST_F(CommentLexerTest, DoxygenCommand10) {
-  const char *Source = "// \\c\n";
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(3U, Toks.size());
-
-  ASSERT_EQ(tok::text,      Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "), Toks[0].getText());
-
-  ASSERT_EQ(tok::backslash_command, Toks[1].getKind());
-  ASSERT_EQ(StringRef("c"), getCommandName(Toks[1]));
-
-  ASSERT_EQ(tok::newline,   Toks[2].getKind());
-}
-
-TEST_F(CommentLexerTest, RegisterCustomBlockCommand) {
-  const char *Source =
-    "/// \\NewBlockCommand Aaa.\n"
-    "/// @NewBlockCommand Aaa.\n";
-
-  Traits.registerBlockCommand(StringRef("NewBlockCommand"));
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(8U, Toks.size());
-
-  ASSERT_EQ(tok::text,          Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),     Toks[0].getText());
-
-  ASSERT_EQ(tok::backslash_command, Toks[1].getKind());
-  ASSERT_EQ(StringRef("NewBlockCommand"), getCommandName(Toks[1]));
-
-  ASSERT_EQ(tok::text,          Toks[2].getKind());
-  ASSERT_EQ(StringRef(" Aaa."), Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,       Toks[3].getKind());
-
-  ASSERT_EQ(tok::text,          Toks[4].getKind());
-  ASSERT_EQ(StringRef(" "),     Toks[4].getText());
-
-  ASSERT_EQ(tok::at_command,    Toks[5].getKind());
-  ASSERT_EQ(StringRef("NewBlockCommand"), getCommandName(Toks[5]));
-
-  ASSERT_EQ(tok::text,          Toks[6].getKind());
-  ASSERT_EQ(StringRef(" Aaa."), Toks[6].getText());
-
-  ASSERT_EQ(tok::newline,       Toks[7].getKind());
-}
-
-TEST_F(CommentLexerTest, RegisterMultipleBlockCommands) {
-  const char *Source =
-    "/// \\Foo\n"
-    "/// \\Bar Baz\n"
-    "/// \\Blech quux=corge\n";
-
-  Traits.registerBlockCommand(StringRef("Foo"));
-  Traits.registerBlockCommand(StringRef("Bar"));
-  Traits.registerBlockCommand(StringRef("Blech"));
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(11U, Toks.size());
-
-  ASSERT_EQ(tok::text,      Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "), Toks[0].getText());
-
-  ASSERT_EQ(tok::backslash_command, Toks[1].getKind());
-  ASSERT_EQ(StringRef("Foo"), getCommandName(Toks[1]));
-
-  ASSERT_EQ(tok::newline,     Toks[2].getKind());
-
-  ASSERT_EQ(tok::text,      Toks[3].getKind());
-  ASSERT_EQ(StringRef(" "), Toks[3].getText());
-
-  ASSERT_EQ(tok::backslash_command, Toks[4].getKind());
-  ASSERT_EQ(StringRef("Bar"), getCommandName(Toks[4]));
-
-  ASSERT_EQ(tok::text,         Toks[5].getKind());
-  ASSERT_EQ(StringRef(" Baz"), Toks[5].getText());
-
-  ASSERT_EQ(tok::newline,     Toks[6].getKind());
-
-  ASSERT_EQ(tok::text,      Toks[7].getKind());
-  ASSERT_EQ(StringRef(" "), Toks[7].getText());
-
-  ASSERT_EQ(tok::backslash_command, Toks[8].getKind());
-  ASSERT_EQ(StringRef("Blech"), getCommandName(Toks[8]));
-
-  ASSERT_EQ(tok::text,                Toks[9].getKind());
-  ASSERT_EQ(StringRef(" quux=corge"), Toks[9].getText());
-
-  ASSERT_EQ(tok::newline,     Toks[10].getKind());
-}
-
-// Empty verbatim block.
-TEST_F(CommentLexerTest, VerbatimBlock1) {
-  const char *Sources[] = {
-    "/// \\verbatim\\endverbatim\n//",
-    "/** \\verbatim\\endverbatim*/"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(5U, Toks.size());
-
-    ASSERT_EQ(tok::text,                 Toks[0].getKind());
-    ASSERT_EQ(StringRef(" "),            Toks[0].getText());
-
-    ASSERT_EQ(tok::verbatim_block_begin, Toks[1].getKind());
-    ASSERT_EQ(StringRef("verbatim"),     getVerbatimBlockName(Toks[1]));
-
-    ASSERT_EQ(tok::verbatim_block_end,   Toks[2].getKind());
-    ASSERT_EQ(StringRef("endverbatim"),  getVerbatimBlockName(Toks[2]));
-
-    ASSERT_EQ(tok::newline,              Toks[3].getKind());
-    ASSERT_EQ(tok::newline,              Toks[4].getKind());
-  }
-}
-
-// Empty verbatim block without an end command.
-TEST_F(CommentLexerTest, VerbatimBlock2) {
-  const char *Source = "/// \\verbatim";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(3U, Toks.size());
-
-  ASSERT_EQ(tok::text,                 Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),            Toks[0].getText());
-
-  ASSERT_EQ(tok::verbatim_block_begin, Toks[1].getKind());
-  ASSERT_EQ(StringRef("verbatim"),     getVerbatimBlockName(Toks[1]));
-
-  ASSERT_EQ(tok::newline,              Toks[2].getKind());
-}
-
-// Empty verbatim block without an end command.
-TEST_F(CommentLexerTest, VerbatimBlock3) {
-  const char *Source = "/** \\verbatim*/";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,                 Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),            Toks[0].getText());
-
-  ASSERT_EQ(tok::verbatim_block_begin, Toks[1].getKind());
-  ASSERT_EQ(StringRef("verbatim"),     getVerbatimBlockName(Toks[1]));
-
-  ASSERT_EQ(tok::newline,              Toks[2].getKind());
-  ASSERT_EQ(tok::newline,              Toks[3].getKind());
-}
-
-// Single-line verbatim block.
-TEST_F(CommentLexerTest, VerbatimBlock4) {
-  const char *Sources[] = {
-    "/// Meow \\verbatim aaa \\endverbatim\n//",
-    "/** Meow \\verbatim aaa \\endverbatim*/"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(6U, Toks.size());
-
-    ASSERT_EQ(tok::text,                 Toks[0].getKind());
-    ASSERT_EQ(StringRef(" Meow "),       Toks[0].getText());
-
-    ASSERT_EQ(tok::verbatim_block_begin, Toks[1].getKind());
-    ASSERT_EQ(StringRef("verbatim"),     getVerbatimBlockName(Toks[1]));
-
-    ASSERT_EQ(tok::verbatim_block_line,  Toks[2].getKind());
-    ASSERT_EQ(StringRef(" aaa "),        Toks[2].getVerbatimBlockText());
-
-    ASSERT_EQ(tok::verbatim_block_end,   Toks[3].getKind());
-    ASSERT_EQ(StringRef("endverbatim"),  getVerbatimBlockName(Toks[3]));
-
-    ASSERT_EQ(tok::newline,              Toks[4].getKind());
-    ASSERT_EQ(tok::newline,              Toks[5].getKind());
-  }
-}
-
-// Single-line verbatim block without an end command.
-TEST_F(CommentLexerTest, VerbatimBlock5) {
-  const char *Sources[] = {
-    "/// Meow \\verbatim aaa \n//",
-    "/** Meow \\verbatim aaa */"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(5U, Toks.size());
-
-    ASSERT_EQ(tok::text,                 Toks[0].getKind());
-    ASSERT_EQ(StringRef(" Meow "),       Toks[0].getText());
-
-    ASSERT_EQ(tok::verbatim_block_begin, Toks[1].getKind());
-    ASSERT_EQ(StringRef("verbatim"),     getVerbatimBlockName(Toks[1]));
-
-    ASSERT_EQ(tok::verbatim_block_line,  Toks[2].getKind());
-    ASSERT_EQ(StringRef(" aaa "),        Toks[2].getVerbatimBlockText());
-
-    ASSERT_EQ(tok::newline,              Toks[3].getKind());
-    ASSERT_EQ(tok::newline,              Toks[4].getKind());
-  }
-}
-
-TEST_F(CommentLexerTest, VerbatimBlock6) {
-  const char *Source =
-    "// \\verbatim\n"
-    "// Aaa\n"
-    "//\n"
-    "// Bbb\n"
-    "// \\endverbatim\n";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(10U, Toks.size());
-
-  ASSERT_EQ(tok::text,                 Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),            Toks[0].getText());
-
-  ASSERT_EQ(tok::verbatim_block_begin, Toks[1].getKind());
-  ASSERT_EQ(StringRef("verbatim"),     getVerbatimBlockName(Toks[1]));
-
-  ASSERT_EQ(tok::newline,              Toks[2].getKind());
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[3].getKind());
-  ASSERT_EQ(StringRef(" Aaa"),         Toks[3].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::newline,              Toks[4].getKind());
-
-  ASSERT_EQ(tok::newline,              Toks[5].getKind());
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[6].getKind());
-  ASSERT_EQ(StringRef(" Bbb"),         Toks[6].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::newline,              Toks[7].getKind());
-
-  ASSERT_EQ(tok::verbatim_block_end,   Toks[8].getKind());
-  ASSERT_EQ(StringRef("endverbatim"),  getVerbatimBlockName(Toks[8]));
-
-  ASSERT_EQ(tok::newline,              Toks[9].getKind());
-}
-
-TEST_F(CommentLexerTest, VerbatimBlock7) {
-  const char *Source =
-    "/* \\verbatim\n"
-    " * Aaa\n"
-    " *\n"
-    " * Bbb\n"
-    " * \\endverbatim\n"
-    " */";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(10U, Toks.size());
-
-  ASSERT_EQ(tok::text,                 Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),            Toks[0].getText());
-
-  ASSERT_EQ(tok::verbatim_block_begin, Toks[1].getKind());
-  ASSERT_EQ(StringRef("verbatim"),     getVerbatimBlockName(Toks[1]));
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[2].getKind());
-  ASSERT_EQ(StringRef(" Aaa"),         Toks[2].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[3].getKind());
-  ASSERT_EQ(StringRef(""),             Toks[3].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[4].getKind());
-  ASSERT_EQ(StringRef(" Bbb"),         Toks[4].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::verbatim_block_end,   Toks[5].getKind());
-  ASSERT_EQ(StringRef("endverbatim"),  getVerbatimBlockName(Toks[5]));
-
-  ASSERT_EQ(tok::newline,              Toks[6].getKind());
-
-  ASSERT_EQ(tok::text,                 Toks[7].getKind());
-  ASSERT_EQ(StringRef(" "),            Toks[7].getText());
-
-  ASSERT_EQ(tok::newline,              Toks[8].getKind());
-  ASSERT_EQ(tok::newline,              Toks[9].getKind());
-}
-
-// Complex test for verbatim blocks.
-TEST_F(CommentLexerTest, VerbatimBlock8) {
-  const char *Source =
-    "/* Meow \\verbatim aaa\\$\\@\n"
-    "bbb \\endverbati\r"
-    "ccc\r\n"
-    "ddd \\endverbatim Blah \\verbatim eee\n"
-    "\\endverbatim BlahBlah*/";
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(14U, Toks.size());
-
-  ASSERT_EQ(tok::text,                 Toks[0].getKind());
-  ASSERT_EQ(StringRef(" Meow "),       Toks[0].getText());
-
-  ASSERT_EQ(tok::verbatim_block_begin, Toks[1].getKind());
-  ASSERT_EQ(StringRef("verbatim"),     getVerbatimBlockName(Toks[1]));
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[2].getKind());
-  ASSERT_EQ(StringRef(" aaa\\$\\@"),   Toks[2].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[3].getKind());
-  ASSERT_EQ(StringRef("bbb \\endverbati"), Toks[3].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[4].getKind());
-  ASSERT_EQ(StringRef("ccc"),          Toks[4].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[5].getKind());
-  ASSERT_EQ(StringRef("ddd "),         Toks[5].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::verbatim_block_end,   Toks[6].getKind());
-  ASSERT_EQ(StringRef("endverbatim"),  getVerbatimBlockName(Toks[6]));
-
-  ASSERT_EQ(tok::text,                 Toks[7].getKind());
-  ASSERT_EQ(StringRef(" Blah "),       Toks[7].getText());
-
-  ASSERT_EQ(tok::verbatim_block_begin, Toks[8].getKind());
-  ASSERT_EQ(StringRef("verbatim"),     getVerbatimBlockName(Toks[8]));
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[9].getKind());
-  ASSERT_EQ(StringRef(" eee"),         Toks[9].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::verbatim_block_end,   Toks[10].getKind());
-  ASSERT_EQ(StringRef("endverbatim"),  getVerbatimBlockName(Toks[10]));
-
-  ASSERT_EQ(tok::text,                 Toks[11].getKind());
-  ASSERT_EQ(StringRef(" BlahBlah"),    Toks[11].getText());
-
-  ASSERT_EQ(tok::newline,              Toks[12].getKind());
-  ASSERT_EQ(tok::newline,              Toks[13].getKind());
-}
-
-// LaTeX verbatim blocks.
-TEST_F(CommentLexerTest, VerbatimBlock9) {
-  const char *Source =
-    "/// \\f$ Aaa \\f$ \\f[ Bbb \\f] \\f{ Ccc \\f}";
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(13U, Toks.size());
-
-  ASSERT_EQ(tok::text,                 Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),            Toks[0].getText());
-
-  ASSERT_EQ(tok::verbatim_block_begin, Toks[1].getKind());
-  ASSERT_EQ(StringRef("f$"),           getVerbatimBlockName(Toks[1]));
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[2].getKind());
-  ASSERT_EQ(StringRef(" Aaa "),        Toks[2].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::verbatim_block_end,   Toks[3].getKind());
-  ASSERT_EQ(StringRef("f$"),           getVerbatimBlockName(Toks[3]));
-
-  ASSERT_EQ(tok::text,                 Toks[4].getKind());
-  ASSERT_EQ(StringRef(" "),            Toks[4].getText());
-
-  ASSERT_EQ(tok::verbatim_block_begin, Toks[5].getKind());
-  ASSERT_EQ(StringRef("f["),           getVerbatimBlockName(Toks[5]));
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[6].getKind());
-  ASSERT_EQ(StringRef(" Bbb "),        Toks[6].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::verbatim_block_end,   Toks[7].getKind());
-  ASSERT_EQ(StringRef("f]"),           getVerbatimBlockName(Toks[7]));
-
-  ASSERT_EQ(tok::text,                 Toks[8].getKind());
-  ASSERT_EQ(StringRef(" "),            Toks[8].getText());
-
-  ASSERT_EQ(tok::verbatim_block_begin, Toks[9].getKind());
-  ASSERT_EQ(StringRef("f{"),           getVerbatimBlockName(Toks[9]));
-
-  ASSERT_EQ(tok::verbatim_block_line,  Toks[10].getKind());
-  ASSERT_EQ(StringRef(" Ccc "),        Toks[10].getVerbatimBlockText());
-
-  ASSERT_EQ(tok::verbatim_block_end,   Toks[11].getKind());
-  ASSERT_EQ(StringRef("f}"),           getVerbatimBlockName(Toks[11]));
-
-  ASSERT_EQ(tok::newline,              Toks[12].getKind());
-}
-
-// Empty verbatim line.
-TEST_F(CommentLexerTest, VerbatimLine1) {
-  const char *Sources[] = {
-    "/// \\fn\n//",
-    "/** \\fn*/"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(4U, Toks.size());
-
-    ASSERT_EQ(tok::text,               Toks[0].getKind());
-    ASSERT_EQ(StringRef(" "),          Toks[0].getText());
-
-    ASSERT_EQ(tok::verbatim_line_name, Toks[1].getKind());
-    ASSERT_EQ(StringRef("fn"),         getVerbatimLineName(Toks[1]));
-
-    ASSERT_EQ(tok::newline,            Toks[2].getKind());
-    ASSERT_EQ(tok::newline,            Toks[3].getKind());
-  }
-}
-
-// Verbatim line with Doxygen escape sequences, which should not be expanded.
-TEST_F(CommentLexerTest, VerbatimLine2) {
-  const char *Sources[] = {
-    "/// \\fn void *foo(const char *zzz = \"\\$\");\n//",
-    "/** \\fn void *foo(const char *zzz = \"\\$\");*/"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(5U, Toks.size());
-
-    ASSERT_EQ(tok::text,               Toks[0].getKind());
-    ASSERT_EQ(StringRef(" "),          Toks[0].getText());
-
-    ASSERT_EQ(tok::verbatim_line_name, Toks[1].getKind());
-    ASSERT_EQ(StringRef("fn"),         getVerbatimLineName(Toks[1]));
-
-    ASSERT_EQ(tok::verbatim_line_text, Toks[2].getKind());
-    ASSERT_EQ(StringRef(" void *foo(const char *zzz = \"\\$\");"),
-                                       Toks[2].getVerbatimLineText());
-
-    ASSERT_EQ(tok::newline,            Toks[3].getKind());
-    ASSERT_EQ(tok::newline,            Toks[4].getKind());
-  }
-}
-
-// Verbatim line should not eat anything from next source line.
-TEST_F(CommentLexerTest, VerbatimLine3) {
-  const char *Source =
-    "/** \\fn void *foo(const char *zzz = \"\\$\");\n"
-    " * Meow\n"
-    " */";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(9U, Toks.size());
-
-  ASSERT_EQ(tok::text,               Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),          Toks[0].getText());
-
-  ASSERT_EQ(tok::verbatim_line_name, Toks[1].getKind());
-  ASSERT_EQ(StringRef("fn"),         getVerbatimLineName(Toks[1]));
-
-  ASSERT_EQ(tok::verbatim_line_text, Toks[2].getKind());
-  ASSERT_EQ(StringRef(" void *foo(const char *zzz = \"\\$\");"),
-                                     Toks[2].getVerbatimLineText());
-  ASSERT_EQ(tok::newline,            Toks[3].getKind());
-
-  ASSERT_EQ(tok::text,               Toks[4].getKind());
-  ASSERT_EQ(StringRef(" Meow"),      Toks[4].getText());
-  ASSERT_EQ(tok::newline,            Toks[5].getKind());
-
-  ASSERT_EQ(tok::text,               Toks[6].getKind());
-  ASSERT_EQ(StringRef(" "),          Toks[6].getText());
-
-  ASSERT_EQ(tok::newline,            Toks[7].getKind());
-  ASSERT_EQ(tok::newline,            Toks[8].getKind());
-}
-
-TEST_F(CommentLexerTest, HTML1) {
-  const char *Source =
-    "// <";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(3U, Toks.size());
-
-  ASSERT_EQ(tok::text,      Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "), Toks[0].getText());
-
-  ASSERT_EQ(tok::text,      Toks[1].getKind());
-  ASSERT_EQ(StringRef("<"), Toks[1].getText());
-
-  ASSERT_EQ(tok::newline,   Toks[2].getKind());
-}
-
-TEST_F(CommentLexerTest, HTML2) {
-  const char *Source =
-    "// a<2";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,       Toks[0].getKind());
-  ASSERT_EQ(StringRef(" a"), Toks[0].getText());
-
-  ASSERT_EQ(tok::text,       Toks[1].getKind());
-  ASSERT_EQ(StringRef("<"),  Toks[1].getText());
-
-  ASSERT_EQ(tok::text,       Toks[2].getKind());
-  ASSERT_EQ(StringRef("2"),  Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,    Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTML3) {
-  const char *Source =
-    "// < img";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::text,         Toks[1].getKind());
-  ASSERT_EQ(StringRef("<"),    Toks[1].getText());
-
-  ASSERT_EQ(tok::text,         Toks[2].getKind());
-  ASSERT_EQ(StringRef(" img"), Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTML4) {
-  const char *Sources[] = {
-    "// <img",
-    "// <img "
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(3U, Toks.size());
-
-    ASSERT_EQ(tok::text,           Toks[0].getKind());
-    ASSERT_EQ(StringRef(" "),      Toks[0].getText());
-
-    ASSERT_EQ(tok::html_start_tag, Toks[1].getKind());
-    ASSERT_EQ(StringRef("img"),    Toks[1].getHTMLTagStartName());
-
-    ASSERT_EQ(tok::newline,        Toks[2].getKind());
-  }
-}
-
-TEST_F(CommentLexerTest, HTML5) {
-  const char *Source =
-    "// <img 42";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,           Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),      Toks[0].getText());
-
-  ASSERT_EQ(tok::html_start_tag, Toks[1].getKind());
-  ASSERT_EQ(StringRef("img"),    Toks[1].getHTMLTagStartName());
-
-  ASSERT_EQ(tok::text,           Toks[2].getKind());
-  ASSERT_EQ(StringRef("42"),     Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,        Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTML6) {
-  const char *Source = "// <img> Meow";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(5U, Toks.size());
-
-  ASSERT_EQ(tok::text,           Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),      Toks[0].getText());
-
-  ASSERT_EQ(tok::html_start_tag, Toks[1].getKind());
-  ASSERT_EQ(StringRef("img"),    Toks[1].getHTMLTagStartName());
-
-  ASSERT_EQ(tok::html_greater,   Toks[2].getKind());
-
-  ASSERT_EQ(tok::text,           Toks[3].getKind());
-  ASSERT_EQ(StringRef(" Meow"),  Toks[3].getText());
-
-  ASSERT_EQ(tok::newline,        Toks[4].getKind());
-}
-
-TEST_F(CommentLexerTest, HTML7) {
-  const char *Source = "// <img=";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,           Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),      Toks[0].getText());
-
-  ASSERT_EQ(tok::html_start_tag, Toks[1].getKind());
-  ASSERT_EQ(StringRef("img"),    Toks[1].getHTMLTagStartName());
-
-  ASSERT_EQ(tok::text,           Toks[2].getKind());
-  ASSERT_EQ(StringRef("="),      Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,        Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTML8) {
-  const char *Source = "// <img src=> Meow";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(7U, Toks.size());
-
-  ASSERT_EQ(tok::text,           Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),      Toks[0].getText());
-
-  ASSERT_EQ(tok::html_start_tag, Toks[1].getKind());
-  ASSERT_EQ(StringRef("img"),    Toks[1].getHTMLTagStartName());
-
-  ASSERT_EQ(tok::html_ident,     Toks[2].getKind());
-  ASSERT_EQ(StringRef("src"),   Toks[2].getHTMLIdent());
-
-  ASSERT_EQ(tok::html_equals,    Toks[3].getKind());
-
-  ASSERT_EQ(tok::html_greater,   Toks[4].getKind());
-
-  ASSERT_EQ(tok::text,           Toks[5].getKind());
-  ASSERT_EQ(StringRef(" Meow"),  Toks[5].getText());
-
-  ASSERT_EQ(tok::newline,        Toks[6].getKind());
-}
-
-TEST_F(CommentLexerTest, HTML9) {
-  const char *Sources[] = {
-    "// <img src",
-    "// <img src "
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(4U, Toks.size());
-
-    ASSERT_EQ(tok::text,           Toks[0].getKind());
-    ASSERT_EQ(StringRef(" "),      Toks[0].getText());
-
-    ASSERT_EQ(tok::html_start_tag, Toks[1].getKind());
-    ASSERT_EQ(StringRef("img"),    Toks[1].getHTMLTagStartName());
-
-    ASSERT_EQ(tok::html_ident,     Toks[2].getKind());
-    ASSERT_EQ(StringRef("src"),    Toks[2].getHTMLIdent());
-
-    ASSERT_EQ(tok::newline,        Toks[3].getKind());
-  }
-}
-
-TEST_F(CommentLexerTest, HTML10) {
-  const char *Sources[] = {
-    "// <img src=",
-    "// <img src ="
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(5U, Toks.size());
-
-    ASSERT_EQ(tok::text,           Toks[0].getKind());
-    ASSERT_EQ(StringRef(" "),      Toks[0].getText());
-
-    ASSERT_EQ(tok::html_start_tag, Toks[1].getKind());
-    ASSERT_EQ(StringRef("img"),    Toks[1].getHTMLTagStartName());
-
-    ASSERT_EQ(tok::html_ident,     Toks[2].getKind());
-    ASSERT_EQ(StringRef("src"),    Toks[2].getHTMLIdent());
-
-    ASSERT_EQ(tok::html_equals,    Toks[3].getKind());
-
-    ASSERT_EQ(tok::newline,        Toks[4].getKind());
-  }
-}
-
-TEST_F(CommentLexerTest, HTML11) {
-  const char *Sources[] = {
-    "// <img src=\"",
-    "// <img src = \"",
-    "// <img src=\'",
-    "// <img src = \'"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(6U, Toks.size());
-
-    ASSERT_EQ(tok::text,               Toks[0].getKind());
-    ASSERT_EQ(StringRef(" "),          Toks[0].getText());
-
-    ASSERT_EQ(tok::html_start_tag,     Toks[1].getKind());
-    ASSERT_EQ(StringRef("img"),        Toks[1].getHTMLTagStartName());
-
-    ASSERT_EQ(tok::html_ident,         Toks[2].getKind());
-    ASSERT_EQ(StringRef("src"),        Toks[2].getHTMLIdent());
-
-    ASSERT_EQ(tok::html_equals,        Toks[3].getKind());
-
-    ASSERT_EQ(tok::html_quoted_string, Toks[4].getKind());
-    ASSERT_EQ(StringRef(""),           Toks[4].getHTMLQuotedString());
-
-    ASSERT_EQ(tok::newline,            Toks[5].getKind());
-  }
-}
-
-TEST_F(CommentLexerTest, HTML12) {
-  const char *Source = "// <img src=@";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(6U, Toks.size());
-
-  ASSERT_EQ(tok::text,           Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),      Toks[0].getText());
-
-  ASSERT_EQ(tok::html_start_tag, Toks[1].getKind());
-  ASSERT_EQ(StringRef("img"),    Toks[1].getHTMLTagStartName());
-
-  ASSERT_EQ(tok::html_ident,     Toks[2].getKind());
-  ASSERT_EQ(StringRef("src"),    Toks[2].getHTMLIdent());
-
-  ASSERT_EQ(tok::html_equals,    Toks[3].getKind());
-
-  ASSERT_EQ(tok::text,           Toks[4].getKind());
-  ASSERT_EQ(StringRef("@"),      Toks[4].getText());
-
-  ASSERT_EQ(tok::newline,        Toks[5].getKind());
-}
-
-TEST_F(CommentLexerTest, HTML13) {
-  const char *Sources[] = {
-    "// <img src=\"val\\\"\\'val",
-    "// <img src=\"val\\\"\\'val\"",
-    "// <img src=\'val\\\"\\'val",
-    "// <img src=\'val\\\"\\'val\'"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(6U, Toks.size());
-
-    ASSERT_EQ(tok::text,                  Toks[0].getKind());
-    ASSERT_EQ(StringRef(" "),             Toks[0].getText());
-
-    ASSERT_EQ(tok::html_start_tag,        Toks[1].getKind());
-    ASSERT_EQ(StringRef("img"),           Toks[1].getHTMLTagStartName());
-
-    ASSERT_EQ(tok::html_ident,            Toks[2].getKind());
-    ASSERT_EQ(StringRef("src"),           Toks[2].getHTMLIdent());
-
-    ASSERT_EQ(tok::html_equals,           Toks[3].getKind());
-
-    ASSERT_EQ(tok::html_quoted_string,    Toks[4].getKind());
-    ASSERT_EQ(StringRef("val\\\"\\'val"), Toks[4].getHTMLQuotedString());
-
-    ASSERT_EQ(tok::newline,               Toks[5].getKind());
-  }
-}
-
-TEST_F(CommentLexerTest, HTML14) {
-  const char *Sources[] = {
-    "// <img src=\"val\\\"\\'val\">",
-    "// <img src=\'val\\\"\\'val\'>"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(7U, Toks.size());
-
-    ASSERT_EQ(tok::text,                  Toks[0].getKind());
-    ASSERT_EQ(StringRef(" "),             Toks[0].getText());
-
-    ASSERT_EQ(tok::html_start_tag,        Toks[1].getKind());
-    ASSERT_EQ(StringRef("img"),           Toks[1].getHTMLTagStartName());
-
-    ASSERT_EQ(tok::html_ident,            Toks[2].getKind());
-    ASSERT_EQ(StringRef("src"),           Toks[2].getHTMLIdent());
-
-    ASSERT_EQ(tok::html_equals,           Toks[3].getKind());
-
-    ASSERT_EQ(tok::html_quoted_string,    Toks[4].getKind());
-    ASSERT_EQ(StringRef("val\\\"\\'val"), Toks[4].getHTMLQuotedString());
-
-    ASSERT_EQ(tok::html_greater,          Toks[5].getKind());
-
-    ASSERT_EQ(tok::newline,               Toks[6].getKind());
-  }
-}
-
-TEST_F(CommentLexerTest, HTML15) {
-  const char *Sources[] = {
-    "// <img/>",
-    "// <img />"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(4U, Toks.size());
-
-    ASSERT_EQ(tok::text,               Toks[0].getKind());
-    ASSERT_EQ(StringRef(" "),          Toks[0].getText());
-
-    ASSERT_EQ(tok::html_start_tag,     Toks[1].getKind());
-    ASSERT_EQ(StringRef("img"),        Toks[1].getHTMLTagStartName());
-
-    ASSERT_EQ(tok::html_slash_greater, Toks[2].getKind());
-
-    ASSERT_EQ(tok::newline,            Toks[3].getKind());
-  }
-}
-
-TEST_F(CommentLexerTest, HTML16) {
-  const char *Sources[] = {
-    "// <img/ Aaa",
-    "// <img / Aaa"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(5U, Toks.size());
-
-    ASSERT_EQ(tok::text,               Toks[0].getKind());
-    ASSERT_EQ(StringRef(" "),          Toks[0].getText());
-
-    ASSERT_EQ(tok::html_start_tag,     Toks[1].getKind());
-    ASSERT_EQ(StringRef("img"),        Toks[1].getHTMLTagStartName());
-
-    ASSERT_EQ(tok::text,               Toks[2].getKind());
-    ASSERT_EQ(StringRef("/"),          Toks[2].getText());
-
-    ASSERT_EQ(tok::text,               Toks[3].getKind());
-    ASSERT_EQ(StringRef(" Aaa"),       Toks[3].getText());
-
-    ASSERT_EQ(tok::newline,            Toks[4].getKind());
-  }
-}
-
-TEST_F(CommentLexerTest, HTML17) {
-  const char *Source = "// </";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(3U, Toks.size());
-
-  ASSERT_EQ(tok::text,       Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),  Toks[0].getText());
-
-  ASSERT_EQ(tok::text,       Toks[1].getKind());
-  ASSERT_EQ(StringRef("</"), Toks[1].getText());
-
-  ASSERT_EQ(tok::newline,    Toks[2].getKind());
-}
-
-TEST_F(CommentLexerTest, HTML18) {
-  const char *Source = "// </@";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,       Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),  Toks[0].getText());
-
-  ASSERT_EQ(tok::text,       Toks[1].getKind());
-  ASSERT_EQ(StringRef("</"), Toks[1].getText());
-
-  ASSERT_EQ(tok::text,       Toks[2].getKind());
-  ASSERT_EQ(StringRef("@"),  Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,    Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTML19) {
-  const char *Source = "// </img";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(3U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::html_end_tag, Toks[1].getKind());
-  ASSERT_EQ(StringRef("img"),  Toks[1].getHTMLTagEndName());
-
-  ASSERT_EQ(tok::newline,      Toks[2].getKind());
-}
-
-TEST_F(CommentLexerTest, NotAKnownHTMLTag1) {
-  const char *Source = "// <tag>";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::text,         Toks[1].getKind());
-  ASSERT_EQ(StringRef("<tag"), Toks[1].getText());
-
-  ASSERT_EQ(tok::text,         Toks[2].getKind());
-  ASSERT_EQ(StringRef(">"),    Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, NotAKnownHTMLTag2) {
-  const char *Source = "// </tag>";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,          Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),     Toks[0].getText());
-
-  ASSERT_EQ(tok::text,          Toks[1].getKind());
-  ASSERT_EQ(StringRef("</tag"), Toks[1].getText());
-
-  ASSERT_EQ(tok::text,          Toks[2].getKind());
-  ASSERT_EQ(StringRef(">"),     Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,       Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences1) {
-  const char *Source = "// &";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(3U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::text,         Toks[1].getKind());
-  ASSERT_EQ(StringRef("&"),    Toks[1].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[2].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences2) {
-  const char *Source = "// &!";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::text,         Toks[1].getKind());
-  ASSERT_EQ(StringRef("&"),    Toks[1].getText());
-
-  ASSERT_EQ(tok::text,         Toks[2].getKind());
-  ASSERT_EQ(StringRef("!"),    Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences3) {
-  const char *Source = "// &amp";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(3U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::text,         Toks[1].getKind());
-  ASSERT_EQ(StringRef("&amp"), Toks[1].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[2].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences4) {
-  const char *Source = "// &amp!";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::text,         Toks[1].getKind());
-  ASSERT_EQ(StringRef("&amp"), Toks[1].getText());
-
-  ASSERT_EQ(tok::text,         Toks[2].getKind());
-  ASSERT_EQ(StringRef("!"),    Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences5) {
-  const char *Source = "// &#";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(3U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::text,         Toks[1].getKind());
-  ASSERT_EQ(StringRef("&#"),   Toks[1].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[2].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences6) {
-  const char *Source = "// &#a";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::text,         Toks[1].getKind());
-  ASSERT_EQ(StringRef("&#"),   Toks[1].getText());
-
-  ASSERT_EQ(tok::text,         Toks[2].getKind());
-  ASSERT_EQ(StringRef("a"),    Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences7) {
-  const char *Source = "// &#42";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(3U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::text,         Toks[1].getKind());
-  ASSERT_EQ(StringRef("&#42"), Toks[1].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[2].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences8) {
-  const char *Source = "// &#42a";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::text,         Toks[1].getKind());
-  ASSERT_EQ(StringRef("&#42"), Toks[1].getText());
-
-  ASSERT_EQ(tok::text,         Toks[2].getKind());
-  ASSERT_EQ(StringRef("a"),    Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences9) {
-  const char *Source = "// &#x";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(3U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::text,         Toks[1].getKind());
-  ASSERT_EQ(StringRef("&#x"),  Toks[1].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[2].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences10) {
-  const char *Source = "// &#xz";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,         Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),    Toks[0].getText());
-
-  ASSERT_EQ(tok::text,         Toks[1].getKind());
-  ASSERT_EQ(StringRef("&#x"),  Toks[1].getText());
-
-  ASSERT_EQ(tok::text,         Toks[2].getKind());
-  ASSERT_EQ(StringRef("z"),    Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,      Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences11) {
-  const char *Source = "// &#xab";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(3U, Toks.size());
-
-  ASSERT_EQ(tok::text,          Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),     Toks[0].getText());
-
-  ASSERT_EQ(tok::text,          Toks[1].getKind());
-  ASSERT_EQ(StringRef("&#xab"), Toks[1].getText());
-
-  ASSERT_EQ(tok::newline,       Toks[2].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences12) {
-  const char *Source = "// &#xaBz";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,          Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),     Toks[0].getText());
-
-  ASSERT_EQ(tok::text,          Toks[1].getKind());
-  ASSERT_EQ(StringRef("&#xaB"), Toks[1].getText());
-
-  ASSERT_EQ(tok::text,          Toks[2].getKind());
-  ASSERT_EQ(StringRef("z"),     Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,       Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences13) {
-  const char *Source = "// &";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(3U, Toks.size());
-
-  ASSERT_EQ(tok::text,          Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),     Toks[0].getText());
-
-  ASSERT_EQ(tok::text,          Toks[1].getKind());
-  ASSERT_EQ(StringRef("&"),     Toks[1].getText());
-
-  ASSERT_EQ(tok::newline,       Toks[2].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences14) {
-  const char *Source = "// &<";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,          Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),     Toks[0].getText());
-
-  ASSERT_EQ(tok::text,          Toks[1].getKind());
-  ASSERT_EQ(StringRef("&"),     Toks[1].getText());
-
-  ASSERT_EQ(tok::text,          Toks[2].getKind());
-  ASSERT_EQ(StringRef("<"),     Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,       Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences15) {
-  const char *Source = "// & meow";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(4U, Toks.size());
-
-  ASSERT_EQ(tok::text,          Toks[0].getKind());
-  ASSERT_EQ(StringRef(" "),     Toks[0].getText());
-
-  ASSERT_EQ(tok::text,          Toks[1].getKind());
-  ASSERT_EQ(StringRef("&"),     Toks[1].getText());
-
-  ASSERT_EQ(tok::text,          Toks[2].getKind());
-  ASSERT_EQ(StringRef(" meow"), Toks[2].getText());
-
-  ASSERT_EQ(tok::newline,       Toks[3].getKind());
-}
-
-TEST_F(CommentLexerTest, HTMLCharacterReferences16) {
-  const char *Sources[] = {
-    "// =",
-    "// &#x3d;",
-    "// &#X3d;",
-    "// &#X3D;"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    std::vector<Token> Toks;
-
-    lexString(Sources[i], Toks);
-
-    ASSERT_EQ(3U, Toks.size());
-
-    ASSERT_EQ(tok::text,          Toks[0].getKind());
-    ASSERT_EQ(StringRef(" "),     Toks[0].getText());
-
-    ASSERT_EQ(tok::text,          Toks[1].getKind());
-    ASSERT_EQ(StringRef("="),     Toks[1].getText());
-
-    ASSERT_EQ(tok::newline,       Toks[2].getKind());
-  }
-}
-
-TEST_F(CommentLexerTest, MultipleComments) {
-  const char *Source =
-    "// Aaa\n"
-    "/// Bbb\n"
-    "/* Ccc\n"
-    " * Ddd*/\n"
-    "/** Eee*/";
-
-  std::vector<Token> Toks;
-
-  lexString(Source, Toks);
-
-  ASSERT_EQ(12U, Toks.size());
-
-  ASSERT_EQ(tok::text,           Toks[0].getKind());
-  ASSERT_EQ(StringRef(" Aaa"),   Toks[0].getText());
-  ASSERT_EQ(tok::newline,        Toks[1].getKind());
-
-  ASSERT_EQ(tok::text,           Toks[2].getKind());
-  ASSERT_EQ(StringRef(" Bbb"),   Toks[2].getText());
-  ASSERT_EQ(tok::newline,        Toks[3].getKind());
-
-  ASSERT_EQ(tok::text,           Toks[4].getKind());
-  ASSERT_EQ(StringRef(" Ccc"),   Toks[4].getText());
-  ASSERT_EQ(tok::newline,        Toks[5].getKind());
-
-  ASSERT_EQ(tok::text,           Toks[6].getKind());
-  ASSERT_EQ(StringRef(" Ddd"),   Toks[6].getText());
-  ASSERT_EQ(tok::newline,        Toks[7].getKind());
-  ASSERT_EQ(tok::newline,        Toks[8].getKind());
-
-  ASSERT_EQ(tok::text,           Toks[9].getKind());
-  ASSERT_EQ(StringRef(" Eee"),   Toks[9].getText());
-
-  ASSERT_EQ(tok::newline,        Toks[10].getKind());
-  ASSERT_EQ(tok::newline,        Toks[11].getKind());
-}
-
-} // end namespace comments
-} // end namespace clang
-
diff --git a/unittests/AST/CommentParser.cpp b/unittests/AST/CommentParser.cpp
deleted file mode 100644
index c72aef1..0000000
--- a/unittests/AST/CommentParser.cpp
+++ /dev/null
@@ -1,1447 +0,0 @@
-//===- unittests/AST/CommentParser.cpp ------ Comment parser tests --------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/AST/CommentParser.h"
-#include "clang/AST/Comment.h"
-#include "clang/AST/CommentCommandTraits.h"
-#include "clang/AST/CommentLexer.h"
-#include "clang/AST/CommentSema.h"
-#include "clang/Basic/CommentOptions.h"
-#include "clang/Basic/Diagnostic.h"
-#include "clang/Basic/DiagnosticOptions.h"
-#include "clang/Basic/FileManager.h"
-#include "clang/Basic/SourceManager.h"
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/Support/Allocator.h"
-#include "gtest/gtest.h"
-#include <vector>
-
-using namespace llvm;
-using namespace clang;
-
-namespace clang {
-namespace comments {
-
-namespace {
-
-const bool DEBUG = true;
-
-class CommentParserTest : public ::testing::Test {
-protected:
-  CommentParserTest()
-    : FileMgr(FileMgrOpts),
-      DiagID(new DiagnosticIDs()),
-      Diags(DiagID, new DiagnosticOptions, new IgnoringDiagConsumer()),
-      SourceMgr(Diags, FileMgr),
-      Traits(Allocator, CommentOptions()) {
-  }
-
-  FileSystemOptions FileMgrOpts;
-  FileManager FileMgr;
-  IntrusiveRefCntPtr<DiagnosticIDs> DiagID;
-  DiagnosticsEngine Diags;
-  SourceManager SourceMgr;
-  llvm::BumpPtrAllocator Allocator;
-  CommandTraits Traits;
-
-  FullComment *parseString(const char *Source);
-};
-
-FullComment *CommentParserTest::parseString(const char *Source) {
-  MemoryBuffer *Buf = MemoryBuffer::getMemBuffer(Source);
-  FileID File = SourceMgr.createFileIDForMemBuffer(Buf);
-  SourceLocation Begin = SourceMgr.getLocForStartOfFile(File);
-
-  Lexer L(Allocator, Diags, Traits, Begin, Source, Source + strlen(Source));
-
-  Sema S(Allocator, SourceMgr, Diags, Traits, /*PP=*/ NULL);
-  Parser P(L, S, Allocator, SourceMgr, Diags, Traits);
-  FullComment *FC = P.parseFullComment();
-
-  if (DEBUG) {
-    llvm::errs() << "=== Source:\n" << Source << "\n=== AST:\n";
-    FC->dump(llvm::errs(), &Traits, &SourceMgr);
-  }
-
-  Token Tok;
-  L.lex(Tok);
-  if (Tok.is(tok::eof))
-    return FC;
-  else
-    return NULL;
-}
-
-::testing::AssertionResult HasChildCount(const Comment *C, size_t Count) {
-  if (!C)
-    return ::testing::AssertionFailure() << "Comment is NULL";
-
-  if (Count != C->child_count())
-    return ::testing::AssertionFailure()
-        << "Count = " << Count
-        << ", child_count = " << C->child_count();
-
-  return ::testing::AssertionSuccess();
-}
-
-template <typename T>
-::testing::AssertionResult GetChildAt(const Comment *C,
-                                      size_t Idx,
-                                      T *&Child) {
-  if (!C)
-    return ::testing::AssertionFailure() << "Comment is NULL";
-
-  if (Idx >= C->child_count())
-    return ::testing::AssertionFailure()
-        << "Idx out of range.  Idx = " << Idx
-        << ", child_count = " << C->child_count();
-
-  Comment::child_iterator I = C->child_begin() + Idx;
-  Comment *CommentChild = *I;
-  if (!CommentChild)
-    return ::testing::AssertionFailure() << "Child is NULL";
-
-  Child = dyn_cast<T>(CommentChild);
-  if (!Child)
-    return ::testing::AssertionFailure()
-        << "Child is not of requested type, but a "
-        << CommentChild->getCommentKindName();
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasTextAt(const Comment *C,
-                                     size_t Idx,
-                                     StringRef Text) {
-  TextComment *TC;
-  ::testing::AssertionResult AR = GetChildAt(C, Idx, TC);
-  if (!AR)
-    return AR;
-
-  StringRef ActualText = TC->getText();
-  if (ActualText != Text)
-    return ::testing::AssertionFailure()
-        << "TextComment has text \"" << ActualText.str() << "\", "
-           "expected \"" << Text.str() << "\"";
-
-  if (TC->hasTrailingNewline())
-    return ::testing::AssertionFailure()
-        << "TextComment has a trailing newline";
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasTextWithNewlineAt(const Comment *C,
-                                                size_t Idx,
-                                                StringRef Text) {
-  TextComment *TC;
-  ::testing::AssertionResult AR = GetChildAt(C, Idx, TC);
-  if (!AR)
-    return AR;
-
-  StringRef ActualText = TC->getText();
-  if (ActualText != Text)
-    return ::testing::AssertionFailure()
-        << "TextComment has text \"" << ActualText.str() << "\", "
-           "expected \"" << Text.str() << "\"";
-
-  if (!TC->hasTrailingNewline())
-    return ::testing::AssertionFailure()
-        << "TextComment has no trailing newline";
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasBlockCommandAt(const Comment *C,
-                                             const CommandTraits &Traits,
-                                             size_t Idx,
-                                             BlockCommandComment *&BCC,
-                                             StringRef Name,
-                                             ParagraphComment *&Paragraph) {
-  ::testing::AssertionResult AR = GetChildAt(C, Idx, BCC);
-  if (!AR)
-    return AR;
-
-  StringRef ActualName = BCC->getCommandName(Traits);
-  if (ActualName != Name)
-    return ::testing::AssertionFailure()
-        << "BlockCommandComment has name \"" << ActualName.str() << "\", "
-           "expected \"" << Name.str() << "\"";
-
-  Paragraph = BCC->getParagraph();
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasParamCommandAt(
-                              const Comment *C,
-                              const CommandTraits &Traits,
-                              size_t Idx,
-                              ParamCommandComment *&PCC,
-                              StringRef CommandName,
-                              ParamCommandComment::PassDirection Direction,
-                              bool IsDirectionExplicit,
-                              StringRef ParamName,
-                              ParagraphComment *&Paragraph) {
-  ::testing::AssertionResult AR = GetChildAt(C, Idx, PCC);
-  if (!AR)
-    return AR;
-
-  StringRef ActualCommandName = PCC->getCommandName(Traits);
-  if (ActualCommandName != CommandName)
-    return ::testing::AssertionFailure()
-        << "ParamCommandComment has name \"" << ActualCommandName.str() << "\", "
-           "expected \"" << CommandName.str() << "\"";
-
-  if (PCC->getDirection() != Direction)
-    return ::testing::AssertionFailure()
-        << "ParamCommandComment has direction " << PCC->getDirection() << ", "
-           "expected " << Direction;
-
-  if (PCC->isDirectionExplicit() != IsDirectionExplicit)
-    return ::testing::AssertionFailure()
-        << "ParamCommandComment has "
-        << (PCC->isDirectionExplicit() ? "explicit" : "implicit")
-        << " direction, "
-           "expected " << (IsDirectionExplicit ? "explicit" : "implicit");
-
-  if (!ParamName.empty() && !PCC->hasParamName())
-    return ::testing::AssertionFailure()
-        << "ParamCommandComment has no parameter name";
-
-  StringRef ActualParamName = PCC->hasParamName() ? PCC->getParamNameAsWritten() : "";
-  if (ActualParamName != ParamName)
-    return ::testing::AssertionFailure()
-        << "ParamCommandComment has parameter name \"" << ActualParamName.str()
-        << "\", "
-           "expected \"" << ParamName.str() << "\"";
-
-  Paragraph = PCC->getParagraph();
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasTParamCommandAt(
-                              const Comment *C,
-                              const CommandTraits &Traits,
-                              size_t Idx,
-                              TParamCommandComment *&TPCC,
-                              StringRef CommandName,
-                              StringRef ParamName,
-                              ParagraphComment *&Paragraph) {
-  ::testing::AssertionResult AR = GetChildAt(C, Idx, TPCC);
-  if (!AR)
-    return AR;
-
-  StringRef ActualCommandName = TPCC->getCommandName(Traits);
-  if (ActualCommandName != CommandName)
-    return ::testing::AssertionFailure()
-        << "TParamCommandComment has name \"" << ActualCommandName.str() << "\", "
-           "expected \"" << CommandName.str() << "\"";
-
-  if (!ParamName.empty() && !TPCC->hasParamName())
-    return ::testing::AssertionFailure()
-        << "TParamCommandComment has no parameter name";
-
-  StringRef ActualParamName = TPCC->hasParamName() ? TPCC->getParamNameAsWritten() : "";
-  if (ActualParamName != ParamName)
-    return ::testing::AssertionFailure()
-        << "TParamCommandComment has parameter name \"" << ActualParamName.str()
-        << "\", "
-           "expected \"" << ParamName.str() << "\"";
-
-  Paragraph = TPCC->getParagraph();
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasInlineCommandAt(const Comment *C,
-                                              const CommandTraits &Traits,
-                                              size_t Idx,
-                                              InlineCommandComment *&ICC,
-                                              StringRef Name) {
-  ::testing::AssertionResult AR = GetChildAt(C, Idx, ICC);
-  if (!AR)
-    return AR;
-
-  StringRef ActualName = ICC->getCommandName(Traits);
-  if (ActualName != Name)
-    return ::testing::AssertionFailure()
-        << "InlineCommandComment has name \"" << ActualName.str() << "\", "
-           "expected \"" << Name.str() << "\"";
-
-  return ::testing::AssertionSuccess();
-}
-
-struct NoArgs {};
-
-::testing::AssertionResult HasInlineCommandAt(const Comment *C,
-                                              const CommandTraits &Traits,
-                                              size_t Idx,
-                                              InlineCommandComment *&ICC,
-                                              StringRef Name,
-                                              NoArgs) {
-  ::testing::AssertionResult AR = HasInlineCommandAt(C, Traits, Idx, ICC, Name);
-  if (!AR)
-    return AR;
-
-  if (ICC->getNumArgs() != 0)
-    return ::testing::AssertionFailure()
-        << "InlineCommandComment has " << ICC->getNumArgs() << " arg(s), "
-           "expected 0";
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasInlineCommandAt(const Comment *C,
-                                              const CommandTraits &Traits,
-                                              size_t Idx,
-                                              InlineCommandComment *&ICC,
-                                              StringRef Name,
-                                              StringRef Arg) {
-  ::testing::AssertionResult AR = HasInlineCommandAt(C, Traits, Idx, ICC, Name);
-  if (!AR)
-    return AR;
-
-  if (ICC->getNumArgs() != 1)
-    return ::testing::AssertionFailure()
-        << "InlineCommandComment has " << ICC->getNumArgs() << " arg(s), "
-           "expected 1";
-
-  StringRef ActualArg = ICC->getArgText(0);
-  if (ActualArg != Arg)
-    return ::testing::AssertionFailure()
-        << "InlineCommandComment has argument \"" << ActualArg.str() << "\", "
-           "expected \"" << Arg.str() << "\"";
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasHTMLStartTagAt(const Comment *C,
-                                             size_t Idx,
-                                             HTMLStartTagComment *&HST,
-                                             StringRef TagName) {
-  ::testing::AssertionResult AR = GetChildAt(C, Idx, HST);
-  if (!AR)
-    return AR;
-
-  StringRef ActualTagName = HST->getTagName();
-  if (ActualTagName != TagName)
-    return ::testing::AssertionFailure()
-        << "HTMLStartTagComment has name \"" << ActualTagName.str() << "\", "
-           "expected \"" << TagName.str() << "\"";
-
-  return ::testing::AssertionSuccess();
-}
-
-struct SelfClosing {};
-
-::testing::AssertionResult HasHTMLStartTagAt(const Comment *C,
-                                             size_t Idx,
-                                             HTMLStartTagComment *&HST,
-                                             StringRef TagName,
-                                             SelfClosing) {
-  ::testing::AssertionResult AR = HasHTMLStartTagAt(C, Idx, HST, TagName);
-  if (!AR)
-    return AR;
-
-  if (!HST->isSelfClosing())
-    return ::testing::AssertionFailure()
-        << "HTMLStartTagComment is not self-closing";
-
-  return ::testing::AssertionSuccess();
-}
-
-
-struct NoAttrs {};
-
-::testing::AssertionResult HasHTMLStartTagAt(const Comment *C,
-                                             size_t Idx,
-                                             HTMLStartTagComment *&HST,
-                                             StringRef TagName,
-                                             NoAttrs) {
-  ::testing::AssertionResult AR = HasHTMLStartTagAt(C, Idx, HST, TagName);
-  if (!AR)
-    return AR;
-
-  if (HST->isSelfClosing())
-    return ::testing::AssertionFailure()
-        << "HTMLStartTagComment is self-closing";
-
-  if (HST->getNumAttrs() != 0)
-    return ::testing::AssertionFailure()
-        << "HTMLStartTagComment has " << HST->getNumAttrs() << " attr(s), "
-           "expected 0";
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasHTMLStartTagAt(const Comment *C,
-                                             size_t Idx,
-                                             HTMLStartTagComment *&HST,
-                                             StringRef TagName,
-                                             StringRef AttrName,
-                                             StringRef AttrValue) {
-  ::testing::AssertionResult AR = HasHTMLStartTagAt(C, Idx, HST, TagName);
-  if (!AR)
-    return AR;
-
-  if (HST->isSelfClosing())
-    return ::testing::AssertionFailure()
-        << "HTMLStartTagComment is self-closing";
-
-  if (HST->getNumAttrs() != 1)
-    return ::testing::AssertionFailure()
-        << "HTMLStartTagComment has " << HST->getNumAttrs() << " attr(s), "
-           "expected 1";
-
-  StringRef ActualName = HST->getAttr(0).Name;
-  if (ActualName != AttrName)
-    return ::testing::AssertionFailure()
-        << "HTMLStartTagComment has attr \"" << ActualName.str() << "\", "
-           "expected \"" << AttrName.str() << "\"";
-
-  StringRef ActualValue = HST->getAttr(0).Value;
-  if (ActualValue != AttrValue)
-    return ::testing::AssertionFailure()
-        << "HTMLStartTagComment has attr value \"" << ActualValue.str() << "\", "
-           "expected \"" << AttrValue.str() << "\"";
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasHTMLEndTagAt(const Comment *C,
-                                           size_t Idx,
-                                           HTMLEndTagComment *&HET,
-                                           StringRef TagName) {
-  ::testing::AssertionResult AR = GetChildAt(C, Idx, HET);
-  if (!AR)
-    return AR;
-
-  StringRef ActualTagName = HET->getTagName();
-  if (ActualTagName != TagName)
-    return ::testing::AssertionFailure()
-        << "HTMLEndTagComment has name \"" << ActualTagName.str() << "\", "
-           "expected \"" << TagName.str() << "\"";
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasParagraphCommentAt(const Comment *C,
-                                                 size_t Idx,
-                                                 StringRef Text) {
-  ParagraphComment *PC;
-
-  {
-    ::testing::AssertionResult AR = GetChildAt(C, Idx, PC);
-    if (!AR)
-      return AR;
-  }
-
-  {
-    ::testing::AssertionResult AR = HasChildCount(PC, 1);
-    if (!AR)
-      return AR;
-  }
-
-  {
-    ::testing::AssertionResult AR = HasTextAt(PC, 0, Text);
-    if (!AR)
-      return AR;
-  }
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasVerbatimBlockAt(const Comment *C,
-                                              const CommandTraits &Traits,
-                                              size_t Idx,
-                                              VerbatimBlockComment *&VBC,
-                                              StringRef Name,
-                                              StringRef CloseName) {
-  ::testing::AssertionResult AR = GetChildAt(C, Idx, VBC);
-  if (!AR)
-    return AR;
-
-  StringRef ActualName = VBC->getCommandName(Traits);
-  if (ActualName != Name)
-    return ::testing::AssertionFailure()
-        << "VerbatimBlockComment has name \"" << ActualName.str() << "\", "
-           "expected \"" << Name.str() << "\"";
-
-  StringRef ActualCloseName = VBC->getCloseName();
-  if (ActualCloseName != CloseName)
-    return ::testing::AssertionFailure()
-        << "VerbatimBlockComment has closing command name \""
-        << ActualCloseName.str() << "\", "
-           "expected \"" << CloseName.str() << "\"";
-
-  return ::testing::AssertionSuccess();
-}
-
-struct NoLines {};
-struct Lines {};
-
-::testing::AssertionResult HasVerbatimBlockAt(const Comment *C,
-                                              const CommandTraits &Traits,
-                                              size_t Idx,
-                                              VerbatimBlockComment *&VBC,
-                                              StringRef Name,
-                                              StringRef CloseName,
-                                              NoLines) {
-  ::testing::AssertionResult AR = HasVerbatimBlockAt(C, Traits, Idx, VBC, Name,
-                                                     CloseName);
-  if (!AR)
-    return AR;
-
-  if (VBC->getNumLines() != 0)
-    return ::testing::AssertionFailure()
-        << "VerbatimBlockComment has " << VBC->getNumLines() << " lines(s), "
-           "expected 0";
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasVerbatimBlockAt(const Comment *C,
-                                              const CommandTraits &Traits,
-                                              size_t Idx,
-                                              VerbatimBlockComment *&VBC,
-                                              StringRef Name,
-                                              StringRef CloseName,
-                                              Lines,
-                                              StringRef Line0) {
-  ::testing::AssertionResult AR = HasVerbatimBlockAt(C, Traits, Idx, VBC, Name,
-                                                     CloseName);
-  if (!AR)
-    return AR;
-
-  if (VBC->getNumLines() != 1)
-    return ::testing::AssertionFailure()
-        << "VerbatimBlockComment has " << VBC->getNumLines() << " lines(s), "
-           "expected 1";
-
-  StringRef ActualLine0 = VBC->getText(0);
-  if (ActualLine0 != Line0)
-    return ::testing::AssertionFailure()
-        << "VerbatimBlockComment has lines[0] \"" << ActualLine0.str() << "\", "
-           "expected \"" << Line0.str() << "\"";
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasVerbatimBlockAt(const Comment *C,
-                                              const CommandTraits &Traits,
-                                              size_t Idx,
-                                              VerbatimBlockComment *&VBC,
-                                              StringRef Name,
-                                              StringRef CloseName,
-                                              Lines,
-                                              StringRef Line0,
-                                              StringRef Line1) {
-  ::testing::AssertionResult AR = HasVerbatimBlockAt(C, Traits, Idx, VBC, Name,
-                                                     CloseName);
-  if (!AR)
-    return AR;
-
-  if (VBC->getNumLines() != 2)
-    return ::testing::AssertionFailure()
-        << "VerbatimBlockComment has " << VBC->getNumLines() << " lines(s), "
-           "expected 2";
-
-  StringRef ActualLine0 = VBC->getText(0);
-  if (ActualLine0 != Line0)
-    return ::testing::AssertionFailure()
-        << "VerbatimBlockComment has lines[0] \"" << ActualLine0.str() << "\", "
-           "expected \"" << Line0.str() << "\"";
-
-  StringRef ActualLine1 = VBC->getText(1);
-  if (ActualLine1 != Line1)
-    return ::testing::AssertionFailure()
-        << "VerbatimBlockComment has lines[1] \"" << ActualLine1.str() << "\", "
-           "expected \"" << Line1.str() << "\"";
-
-  return ::testing::AssertionSuccess();
-}
-
-::testing::AssertionResult HasVerbatimLineAt(const Comment *C,
-                                             const CommandTraits &Traits,
-                                             size_t Idx,
-                                             VerbatimLineComment *&VLC,
-                                             StringRef Name,
-                                             StringRef Text) {
-  ::testing::AssertionResult AR = GetChildAt(C, Idx, VLC);
-  if (!AR)
-    return AR;
-
-  StringRef ActualName = VLC->getCommandName(Traits);
-  if (ActualName != Name)
-    return ::testing::AssertionFailure()
-        << "VerbatimLineComment has name \"" << ActualName.str() << "\", "
-           "expected \"" << Name.str() << "\"";
-
-  StringRef ActualText = VLC->getText();
-  if (ActualText != Text)
-    return ::testing::AssertionFailure()
-        << "VerbatimLineComment has text \"" << ActualText.str() << "\", "
-           "expected \"" << Text.str() << "\"";
-
-  return ::testing::AssertionSuccess();
-}
-
-
-TEST_F(CommentParserTest, Basic1) {
-  const char *Source = "//";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 0));
-}
-
-TEST_F(CommentParserTest, Basic2) {
-  const char *Source = "// Meow";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 1));
-
-  ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " Meow"));
-}
-
-TEST_F(CommentParserTest, Basic3) {
-  const char *Source =
-    "// Aaa\n"
-    "// Bbb";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 1));
-
-  {
-    ParagraphComment *PC;
-    ASSERT_TRUE(GetChildAt(FC, 0, PC));
-
-    ASSERT_TRUE(HasChildCount(PC, 2));
-      ASSERT_TRUE(HasTextWithNewlineAt(PC, 0, " Aaa"));
-      ASSERT_TRUE(HasTextAt(PC, 1, " Bbb"));
-  }
-}
-
-TEST_F(CommentParserTest, ParagraphSplitting1) {
-  const char *Sources[] = {
-    "// Aaa\n"
-    "//\n"
-    "// Bbb",
-
-    "// Aaa\n"
-    "// \n"
-    "// Bbb",
-
-    "// Aaa\n"
-    "//\t\n"
-    "// Bbb",
-
-    "// Aaa\n"
-    "//\n"
-    "//\n"
-    "// Bbb",
-
-    "/**\n"
-    " Aaa\n"
-    "\n"
-    " Bbb\n"
-    "*/",
-
-    "/**\n"
-    " Aaa\n"
-    " \n"
-    " Bbb\n"
-    "*/",
-
-    "/**\n"
-    " Aaa\n"
-    "\t \n"
-    " Bbb\n"
-    "*/",
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 2));
-
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " Aaa"));
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 1, " Bbb"));
-  }
-}
-
-TEST_F(CommentParserTest, Paragraph1) {
-  const char *Source =
-    "// \\brief Aaa\n"
-    "//\n"
-    "// Bbb";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 3));
-
-  ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-  {
-    BlockCommandComment *BCC;
-    ParagraphComment *PC;
-    ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 1, BCC, "brief", PC));
-
-    ASSERT_TRUE(HasParagraphCommentAt(BCC, 0, " Aaa"));
-  }
-  ASSERT_TRUE(HasParagraphCommentAt(FC, 2, " Bbb"));
-}
-
-TEST_F(CommentParserTest, Paragraph2) {
-  const char *Source = "// \\brief \\author";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 3));
-
-  ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-  {
-    BlockCommandComment *BCC;
-    ParagraphComment *PC;
-    ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 1, BCC, "brief", PC));
-
-    ASSERT_TRUE(HasParagraphCommentAt(BCC, 0, " "));
-  }
-  {
-    BlockCommandComment *BCC;
-    ParagraphComment *PC;
-    ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 2, BCC, "author", PC));
-
-    ASSERT_TRUE(GetChildAt(BCC, 0, PC));
-      ASSERT_TRUE(HasChildCount(PC, 0));
-  }
-}
-
-TEST_F(CommentParserTest, Paragraph3) {
-  const char *Source =
-    "// \\brief Aaa\n"
-    "// Bbb \\author\n"
-    "// Ccc";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 3));
-
-  ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-  {
-    BlockCommandComment *BCC;
-    ParagraphComment *PC;
-    ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 1, BCC, "brief", PC));
-
-    ASSERT_TRUE(GetChildAt(BCC, 0, PC));
-      ASSERT_TRUE(HasChildCount(PC, 2));
-      ASSERT_TRUE(HasTextWithNewlineAt(PC, 0, " Aaa"));
-      ASSERT_TRUE(HasTextAt(PC, 1, " Bbb "));
-  }
-  {
-    BlockCommandComment *BCC;
-    ParagraphComment *PC;
-    ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 2, BCC, "author", PC));
-
-    ASSERT_TRUE(HasParagraphCommentAt(BCC, 0, " Ccc"));
-  }
-}
-
-TEST_F(CommentParserTest, ParamCommand1) {
-  const char *Source = "// \\param aaa";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 2));
-
-  ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-  {
-    ParamCommandComment *PCC;
-    ParagraphComment *PC;
-    ASSERT_TRUE(HasParamCommandAt(FC, Traits, 1, PCC, "param",
-                                  ParamCommandComment::In,
-                                  /* IsDirectionExplicit = */ false,
-                                  "aaa", PC));
-    ASSERT_TRUE(HasChildCount(PCC, 1));
-    ASSERT_TRUE(HasChildCount(PC, 0));
-  }
-}
-
-TEST_F(CommentParserTest, ParamCommand2) {
-  const char *Source = "// \\param\\brief";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 3));
-
-  ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-  {
-    ParamCommandComment *PCC;
-    ParagraphComment *PC;
-    ASSERT_TRUE(HasParamCommandAt(FC, Traits, 1, PCC, "param",
-                                  ParamCommandComment::In,
-                                  /* IsDirectionExplicit = */ false,
-                                  "", PC));
-    ASSERT_TRUE(HasChildCount(PCC, 1));
-    ASSERT_TRUE(HasChildCount(PC, 0));
-  }
-  {
-    BlockCommandComment *BCC;
-    ParagraphComment *PC;
-    ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 2, BCC, "brief", PC));
-    ASSERT_TRUE(HasChildCount(PC, 0));
-  }
-}
-
-TEST_F(CommentParserTest, ParamCommand3) {
-  const char *Sources[] = {
-    "// \\param aaa Bbb\n",
-    "// \\param\n"
-    "//     aaa Bbb\n",
-    "// \\param \n"
-    "//     aaa Bbb\n",
-    "// \\param aaa\n"
-    "// Bbb\n"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 2));
-
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-    {
-      ParamCommandComment *PCC;
-      ParagraphComment *PC;
-      ASSERT_TRUE(HasParamCommandAt(FC, Traits, 1, PCC, "param",
-                                    ParamCommandComment::In,
-                                    /* IsDirectionExplicit = */ false,
-                                    "aaa", PC));
-      ASSERT_TRUE(HasChildCount(PCC, 1));
-      ASSERT_TRUE(HasParagraphCommentAt(PCC, 0, " Bbb"));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, ParamCommand4) {
-  const char *Sources[] = {
-    "// \\param [in] aaa Bbb\n",
-    "// \\param[in] aaa Bbb\n",
-    "// \\param\n"
-    "//     [in] aaa Bbb\n",
-    "// \\param [in]\n"
-    "//     aaa Bbb\n",
-    "// \\param [in] aaa\n"
-    "// Bbb\n",
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 2));
-
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-    {
-      ParamCommandComment *PCC;
-      ParagraphComment *PC;
-      ASSERT_TRUE(HasParamCommandAt(FC, Traits, 1, PCC, "param",
-                                    ParamCommandComment::In,
-                                    /* IsDirectionExplicit = */ true,
-                                    "aaa", PC));
-      ASSERT_TRUE(HasChildCount(PCC, 1));
-      ASSERT_TRUE(HasParagraphCommentAt(PCC, 0, " Bbb"));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, ParamCommand5) {
-  const char *Sources[] = {
-    "// \\param [out] aaa Bbb\n",
-    "// \\param[out] aaa Bbb\n",
-    "// \\param\n"
-    "//     [out] aaa Bbb\n",
-    "// \\param [out]\n"
-    "//     aaa Bbb\n",
-    "// \\param [out] aaa\n"
-    "// Bbb\n",
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 2));
-
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-    {
-      ParamCommandComment *PCC;
-      ParagraphComment *PC;
-      ASSERT_TRUE(HasParamCommandAt(FC, Traits, 1, PCC, "param",
-                                    ParamCommandComment::Out,
-                                    /* IsDirectionExplicit = */ true,
-                                    "aaa", PC));
-      ASSERT_TRUE(HasChildCount(PCC, 1));
-      ASSERT_TRUE(HasParagraphCommentAt(PCC, 0, " Bbb"));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, ParamCommand6) {
-  const char *Sources[] = {
-    "// \\param [in,out] aaa Bbb\n",
-    "// \\param[in,out] aaa Bbb\n",
-    "// \\param [in, out] aaa Bbb\n",
-    "// \\param [in,\n"
-    "//     out] aaa Bbb\n",
-    "// \\param [in,out]\n"
-    "//     aaa Bbb\n",
-    "// \\param [in,out] aaa\n"
-    "// Bbb\n"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 2));
-
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-    {
-      ParamCommandComment *PCC;
-      ParagraphComment *PC;
-      ASSERT_TRUE(HasParamCommandAt(FC, Traits, 1, PCC, "param",
-                                    ParamCommandComment::InOut,
-                                    /* IsDirectionExplicit = */ true,
-                                    "aaa", PC));
-      ASSERT_TRUE(HasChildCount(PCC, 1));
-      ASSERT_TRUE(HasParagraphCommentAt(PCC, 0, " Bbb"));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, ParamCommand7) {
-  const char *Source =
-    "// \\param aaa \\% Bbb \\$ ccc\n";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 2));
-
-  ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-  {
-    ParamCommandComment *PCC;
-    ParagraphComment *PC;
-    ASSERT_TRUE(HasParamCommandAt(FC, Traits, 1, PCC, "param",
-                                  ParamCommandComment::In,
-                                  /* IsDirectionExplicit = */ false,
-                                  "aaa", PC));
-    ASSERT_TRUE(HasChildCount(PCC, 1));
-
-    ASSERT_TRUE(HasChildCount(PC, 5));
-      ASSERT_TRUE(HasTextAt(PC, 0, " "));
-      ASSERT_TRUE(HasTextAt(PC, 1, "%"));
-      ASSERT_TRUE(HasTextAt(PC, 2, " Bbb "));
-      ASSERT_TRUE(HasTextAt(PC, 3, "$"));
-      ASSERT_TRUE(HasTextAt(PC, 4, " ccc"));
-  }
-}
-
-TEST_F(CommentParserTest, TParamCommand1) {
-  const char *Sources[] = {
-    "// \\tparam aaa Bbb\n",
-    "// \\tparam\n"
-    "//     aaa Bbb\n",
-    "// \\tparam \n"
-    "//     aaa Bbb\n",
-    "// \\tparam aaa\n"
-    "// Bbb\n"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 2));
-
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-    {
-      TParamCommandComment *TPCC;
-      ParagraphComment *PC;
-      ASSERT_TRUE(HasTParamCommandAt(FC, Traits, 1, TPCC, "tparam",
-                                     "aaa", PC));
-      ASSERT_TRUE(HasChildCount(TPCC, 1));
-      ASSERT_TRUE(HasParagraphCommentAt(TPCC, 0, " Bbb"));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, TParamCommand2) {
-  const char *Source = "// \\tparam\\brief";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 3));
-
-  ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-  {
-    TParamCommandComment *TPCC;
-    ParagraphComment *PC;
-    ASSERT_TRUE(HasTParamCommandAt(FC, Traits, 1, TPCC, "tparam", "", PC));
-    ASSERT_TRUE(HasChildCount(TPCC, 1));
-    ASSERT_TRUE(HasChildCount(PC, 0));
-  }
-  {
-    BlockCommandComment *BCC;
-    ParagraphComment *PC;
-    ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 2, BCC, "brief", PC));
-    ASSERT_TRUE(HasChildCount(PC, 0));
-  }
-}
-
-
-TEST_F(CommentParserTest, InlineCommand1) {
-  const char *Source = "// \\c";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 1));
-
-  {
-    ParagraphComment *PC;
-    InlineCommandComment *ICC;
-    ASSERT_TRUE(GetChildAt(FC, 0, PC));
-
-    ASSERT_TRUE(HasChildCount(PC, 2));
-      ASSERT_TRUE(HasTextAt(PC, 0, " "));
-      ASSERT_TRUE(HasInlineCommandAt(PC, Traits, 1, ICC, "c", NoArgs()));
-  }
-}
-
-TEST_F(CommentParserTest, InlineCommand2) {
-  const char *Source = "// \\c ";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 1));
-
-  {
-    ParagraphComment *PC;
-    InlineCommandComment *ICC;
-    ASSERT_TRUE(GetChildAt(FC, 0, PC));
-
-    ASSERT_TRUE(HasChildCount(PC, 3));
-      ASSERT_TRUE(HasTextAt(PC, 0, " "));
-      ASSERT_TRUE(HasInlineCommandAt(PC, Traits, 1, ICC, "c", NoArgs()));
-      ASSERT_TRUE(HasTextAt(PC, 2, " "));
-  }
-}
-
-TEST_F(CommentParserTest, InlineCommand3) {
-  const char *Source = "// \\c aaa\n";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 1));
-
-  {
-    ParagraphComment *PC;
-    InlineCommandComment *ICC;
-    ASSERT_TRUE(GetChildAt(FC, 0, PC));
-
-    ASSERT_TRUE(HasChildCount(PC, 2));
-      ASSERT_TRUE(HasTextAt(PC, 0, " "));
-      ASSERT_TRUE(HasInlineCommandAt(PC, Traits, 1, ICC, "c", "aaa"));
-  }
-}
-
-TEST_F(CommentParserTest, InlineCommand4) {
-  const char *Source = "// \\c aaa bbb";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 1));
-
-  {
-    ParagraphComment *PC;
-    InlineCommandComment *ICC;
-    ASSERT_TRUE(GetChildAt(FC, 0, PC));
-
-    ASSERT_TRUE(HasChildCount(PC, 3));
-      ASSERT_TRUE(HasTextAt(PC, 0, " "));
-      ASSERT_TRUE(HasInlineCommandAt(PC, Traits, 1, ICC, "c", "aaa"));
-      ASSERT_TRUE(HasTextAt(PC, 2, " bbb"));
-  }
-}
-
-TEST_F(CommentParserTest, InlineCommand5) {
-  const char *Source = "// \\unknown aaa\n";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 1));
-
-  {
-    ParagraphComment *PC;
-    InlineCommandComment *ICC;
-    ASSERT_TRUE(GetChildAt(FC, 0, PC));
-
-    ASSERT_TRUE(HasChildCount(PC, 3));
-      ASSERT_TRUE(HasTextAt(PC, 0, " "));
-      ASSERT_TRUE(HasInlineCommandAt(PC, Traits, 1, ICC, "unknown", NoArgs()));
-      ASSERT_TRUE(HasTextAt(PC, 2, " aaa"));
-  }
-}
-
-TEST_F(CommentParserTest, HTML1) {
-  const char *Sources[] = {
-    "// <a",
-    "// <a>",
-    "// <a >"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 1));
-
-    {
-      ParagraphComment *PC;
-      HTMLStartTagComment *HST;
-      ASSERT_TRUE(GetChildAt(FC, 0, PC));
-
-      ASSERT_TRUE(HasChildCount(PC, 2));
-        ASSERT_TRUE(HasTextAt(PC, 0, " "));
-        ASSERT_TRUE(HasHTMLStartTagAt(PC, 1, HST, "a", NoAttrs()));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, HTML2) {
-  const char *Sources[] = {
-    "// <br/>",
-    "// <br />"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 1));
-
-    {
-      ParagraphComment *PC;
-      HTMLStartTagComment *HST;
-      ASSERT_TRUE(GetChildAt(FC, 0, PC));
-
-      ASSERT_TRUE(HasChildCount(PC, 2));
-        ASSERT_TRUE(HasTextAt(PC, 0, " "));
-        ASSERT_TRUE(HasHTMLStartTagAt(PC, 1, HST, "br", SelfClosing()));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, HTML3) {
-  const char *Sources[] = {
-    "// <a href",
-    "// <a href ",
-    "// <a href>",
-    "// <a href >",
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 1));
-
-    {
-      ParagraphComment *PC;
-      HTMLStartTagComment *HST;
-      ASSERT_TRUE(GetChildAt(FC, 0, PC));
-
-      ASSERT_TRUE(HasChildCount(PC, 2));
-        ASSERT_TRUE(HasTextAt(PC, 0, " "));
-        ASSERT_TRUE(HasHTMLStartTagAt(PC, 1, HST, "a", "href", ""));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, HTML4) {
-  const char *Sources[] = {
-    "// <a href=\"bbb\"",
-    "// <a href=\"bbb\">",
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 1));
-
-    {
-      ParagraphComment *PC;
-      HTMLStartTagComment *HST;
-      ASSERT_TRUE(GetChildAt(FC, 0, PC));
-
-      ASSERT_TRUE(HasChildCount(PC, 2));
-        ASSERT_TRUE(HasTextAt(PC, 0, " "));
-        ASSERT_TRUE(HasHTMLStartTagAt(PC, 1, HST, "a", "href", "bbb"));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, HTML5) {
-  const char *Sources[] = {
-    "// </a",
-    "// </a>",
-    "// </a >"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 1));
-
-    {
-      ParagraphComment *PC;
-      HTMLEndTagComment *HET;
-      ASSERT_TRUE(GetChildAt(FC, 0, PC));
-
-      ASSERT_TRUE(HasChildCount(PC, 2));
-        ASSERT_TRUE(HasTextAt(PC, 0, " "));
-        ASSERT_TRUE(HasHTMLEndTagAt(PC, 1, HET, "a"));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, HTML6) {
-  const char *Source =
-    "// <pre>\n"
-    "// Aaa\n"
-    "// Bbb\n"
-    "// </pre>\n";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 1));
-
-  {
-    ParagraphComment *PC;
-    HTMLStartTagComment *HST;
-    HTMLEndTagComment *HET;
-    ASSERT_TRUE(GetChildAt(FC, 0, PC));
-
-    ASSERT_TRUE(HasChildCount(PC, 6));
-      ASSERT_TRUE(HasTextAt(PC, 0, " "));
-      ASSERT_TRUE(HasHTMLStartTagAt(PC, 1, HST, "pre", NoAttrs()));
-      ASSERT_TRUE(HasTextWithNewlineAt(PC, 2, " Aaa"));
-      ASSERT_TRUE(HasTextWithNewlineAt(PC, 3, " Bbb"));
-      ASSERT_TRUE(HasTextAt(PC, 4, " "));
-      ASSERT_TRUE(HasHTMLEndTagAt(PC, 5, HET, "pre"));
-  }
-}
-
-TEST_F(CommentParserTest, VerbatimBlock1) {
-  const char *Source = "// \\verbatim\\endverbatim\n";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 2));
-
-  ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-  {
-    VerbatimBlockComment *VCC;
-    ASSERT_TRUE(HasVerbatimBlockAt(FC, Traits, 1, VCC,
-                                   "verbatim", "endverbatim",
-                                   NoLines()));
-  }
-}
-
-TEST_F(CommentParserTest, VerbatimBlock2) {
-  const char *Source = "// \\verbatim Aaa \\endverbatim\n";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 2));
-
-  ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-  {
-    VerbatimBlockComment *VBC;
-    ASSERT_TRUE(HasVerbatimBlockAt(FC, Traits, 1, VBC,
-                                   "verbatim", "endverbatim",
-                                   Lines(), " Aaa "));
-  }
-}
-
-TEST_F(CommentParserTest, VerbatimBlock3) {
-  const char *Source = "// \\verbatim Aaa\n";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 2));
-
-  ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-  {
-    VerbatimBlockComment *VBC;
-    ASSERT_TRUE(HasVerbatimBlockAt(FC, Traits, 1, VBC, "verbatim", "",
-                                   Lines(), " Aaa"));
-  }
-}
-
-TEST_F(CommentParserTest, VerbatimBlock4) {
-  const char *Source =
-    "//\\verbatim\n"
-    "//\\endverbatim\n";
-
-  FullComment *FC = parseString(Source);
-  ASSERT_TRUE(HasChildCount(FC, 1));
-
-  {
-    VerbatimBlockComment *VBC;
-    ASSERT_TRUE(HasVerbatimBlockAt(FC, Traits, 0, VBC,
-                                   "verbatim", "endverbatim",
-                                   NoLines()));
-  }
-}
-
-TEST_F(CommentParserTest, VerbatimBlock5) {
-  const char *Sources[] = {
-    "//\\verbatim\n"
-    "// Aaa\n"
-    "//\\endverbatim\n",
-
-    "/*\\verbatim\n"
-    " * Aaa\n"
-    " *\\endverbatim*/"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 1));
-
-    {
-      VerbatimBlockComment *VBC;
-      ASSERT_TRUE(HasVerbatimBlockAt(FC, Traits, 0, VBC,
-                                     "verbatim", "endverbatim",
-                                     Lines(), " Aaa"));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, VerbatimBlock6) {
-  const char *Sources[] = {
-    "// \\verbatim\n"
-    "// Aaa\n"
-    "// \\endverbatim\n",
-
-    "/* \\verbatim\n"
-    " * Aaa\n"
-    " * \\endverbatim*/"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 2));
-
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-    {
-      VerbatimBlockComment *VBC;
-      ASSERT_TRUE(HasVerbatimBlockAt(FC, Traits, 1, VBC,
-                                     "verbatim", "endverbatim",
-                                     Lines(), " Aaa"));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, VerbatimBlock7) {
-  const char *Sources[] = {
-    "// \\verbatim\n"
-    "// Aaa\n"
-    "// Bbb\n"
-    "// \\endverbatim\n",
-
-    "/* \\verbatim\n"
-    " * Aaa\n"
-    " * Bbb\n"
-    " * \\endverbatim*/"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 2));
-
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-    {
-      VerbatimBlockComment *VBC;
-      ASSERT_TRUE(HasVerbatimBlockAt(FC, Traits, 1, VBC,
-                                     "verbatim", "endverbatim",
-                                     Lines(), " Aaa", " Bbb"));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, VerbatimBlock8) {
-  const char *Sources[] = {
-    "// \\verbatim\n"
-    "// Aaa\n"
-    "//\n"
-    "// Bbb\n"
-    "// \\endverbatim\n",
-
-    "/* \\verbatim\n"
-    " * Aaa\n"
-    " *\n"
-    " * Bbb\n"
-    " * \\endverbatim*/"
-  };
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 2));
-
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-    {
-      VerbatimBlockComment *VBC;
-      ASSERT_TRUE(HasVerbatimBlockAt(FC, Traits, 1, VBC,
-                                     "verbatim", "endverbatim"));
-      ASSERT_EQ(3U, VBC->getNumLines());
-      ASSERT_EQ(" Aaa", VBC->getText(0));
-      ASSERT_EQ("",     VBC->getText(1));
-      ASSERT_EQ(" Bbb", VBC->getText(2));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, VerbatimLine1) {
-  const char *Sources[] = {
-    "// \\fn",
-    "// \\fn\n"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 2));
-
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-    {
-      VerbatimLineComment *VLC;
-      ASSERT_TRUE(HasVerbatimLineAt(FC, Traits, 1, VLC, "fn", ""));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, VerbatimLine2) {
-  const char *Sources[] = {
-    "/// \\fn void *foo(const char *zzz = \"\\$\");\n//",
-    "/** \\fn void *foo(const char *zzz = \"\\$\");*/"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 2));
-
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-    {
-      VerbatimLineComment *VLC;
-      ASSERT_TRUE(HasVerbatimLineAt(FC, Traits, 1, VLC, "fn",
-                  " void *foo(const char *zzz = \"\\$\");"));
-    }
-  }
-}
-
-TEST_F(CommentParserTest, Deprecated) {
-  const char *Sources[] = {
-    "/** @deprecated*/",
-    "/// @deprecated\n"
-  };
-
-  for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
-    FullComment *FC = parseString(Sources[i]);
-    ASSERT_TRUE(HasChildCount(FC, 2));
-
-    ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
-    {
-      BlockCommandComment *BCC;
-      ParagraphComment *PC;
-      ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 1, BCC, "deprecated", PC));
-      ASSERT_TRUE(HasChildCount(PC, 0));
-    }
-  }
-}
-
-} // unnamed namespace
-
-} // end namespace comments
-} // end namespace clang
-
diff --git a/utils/TableGen/CMakeLists.txt b/utils/TableGen/CMakeLists.txt
index 29a1eed..4980607 100644
--- a/utils/TableGen/CMakeLists.txt
+++ b/utils/TableGen/CMakeLists.txt
@@ -3,9 +3,6 @@ set(LLVM_LINK_COMPONENTS Support)
 add_tablegen(clang-tblgen CLANG
   ClangASTNodesEmitter.cpp
   ClangAttrEmitter.cpp
-  ClangCommentCommandInfoEmitter.cpp
-  ClangCommentHTMLNamedCharacterReferenceEmitter.cpp
-  ClangCommentHTMLTagsEmitter.cpp
   ClangDiagnosticsEmitter.cpp
   ClangSACheckersEmitter.cpp
   NeonEmitter.cpp
diff --git a/utils/TableGen/ClangCommentCommandInfoEmitter.cpp b/utils/TableGen/ClangCommentCommandInfoEmitter.cpp
deleted file mode 100644
index 857b22e..0000000
--- a/utils/TableGen/ClangCommentCommandInfoEmitter.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-//===--- ClangCommentCommandInfoEmitter.cpp - Generate command lists -----====//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This tablegen backend emits command lists and efficient matchers for command
-// names that are used in documentation comments.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/TableGen/Record.h"
-#include "llvm/TableGen/StringMatcher.h"
-#include "llvm/TableGen/TableGenBackend.h"
-#include <vector>
-
-using namespace llvm;
-
-namespace clang {
-void EmitClangCommentCommandInfo(RecordKeeper &Records, raw_ostream &OS) {
-  emitSourceFileHeader("A list of commands useable in documentation "
-                       "comments", OS);
-
-  OS << "namespace {\n"
-        "const CommandInfo Commands[] = {\n";
-  std::vector<Record *> Tags = Records.getAllDerivedDefinitions("Command");
-  for (size_t i = 0, e = Tags.size(); i != e; ++i) {
-    Record &Tag = *Tags[i];
-    OS << "  { "
-       << "\"" << Tag.getValueAsString("Name") << "\", "
-       << "\"" << Tag.getValueAsString("EndCommandName") << "\", "
-       << i << ", "
-       << Tag.getValueAsInt("NumArgs") << ", "
-       << Tag.getValueAsBit("IsInlineCommand") << ", "
-       << Tag.getValueAsBit("IsBlockCommand") << ", "
-       << Tag.getValueAsBit("IsBriefCommand") << ", "
-       << Tag.getValueAsBit("IsReturnsCommand") << ", "
-       << Tag.getValueAsBit("IsParamCommand") << ", "
-       << Tag.getValueAsBit("IsTParamCommand") << ", "
-       << Tag.getValueAsBit("IsThrowsCommand") << ", "
-       << Tag.getValueAsBit("IsDeprecatedCommand") << ", "
-       << Tag.getValueAsBit("IsHeaderfileCommand") << ", "
-       << Tag.getValueAsBit("IsEmptyParagraphAllowed") << ", "
-       << Tag.getValueAsBit("IsVerbatimBlockCommand") << ", "
-       << Tag.getValueAsBit("IsVerbatimBlockEndCommand") << ", "
-       << Tag.getValueAsBit("IsVerbatimLineCommand") << ", "
-       << Tag.getValueAsBit("IsDeclarationCommand") << ", "
-       << Tag.getValueAsBit("IsFunctionDeclarationCommand") << ", "
-       << Tag.getValueAsBit("IsRecordLikeDetailCommand") << ", "
-       << Tag.getValueAsBit("IsRecordLikeDeclarationCommand") << ", "
-       << /* IsUnknownCommand = */ "0"
-       << " }";
-    if (i + 1 != e)
-      OS << ",";
-    OS << "\n";
-  }
-  OS << "};\n"
-        "} // unnamed namespace\n\n";
-
-  std::vector<StringMatcher::StringPair> Matches;
-  for (size_t i = 0, e = Tags.size(); i != e; ++i) {
-    Record &Tag = *Tags[i];
-    std::string Name = Tag.getValueAsString("Name");
-    std::string Return;
-    raw_string_ostream(Return) << "return &Commands[" << i << "];";
-    Matches.push_back(StringMatcher::StringPair(Name, Return));
-  }
-
-  OS << "const CommandInfo *CommandTraits::getBuiltinCommandInfo(\n"
-     << "                                         StringRef Name) {\n";
-  StringMatcher("Name", Matches, OS).Emit();
-  OS << "  return NULL;\n"
-     << "}\n\n";
-}
-
-static std::string MangleName(StringRef Str) {
-  std::string Mangled;
-  for (unsigned i = 0, e = Str.size(); i != e; ++i) {
-    switch (Str[i]) {
-    default:
-      Mangled += Str[i];
-      break;
-    case '[':
-      Mangled += "lsquare";
-      break;
-    case ']':
-      Mangled += "rsquare";
-      break;
-    case '{':
-      Mangled += "lbrace";
-      break;
-    case '}':
-      Mangled += "rbrace";
-      break;
-    case '$':
-      Mangled += "dollar";
-      break;
-    case '/':
-      Mangled += "slash";
-      break;
-    }
-  }
-  return Mangled;
-}
-
-void EmitClangCommentCommandList(RecordKeeper &Records, raw_ostream &OS) {
-  emitSourceFileHeader("A list of commands useable in documentation "
-                       "comments", OS);
-
-  OS << "#ifndef COMMENT_COMMAND\n"
-     << "#  define COMMENT_COMMAND(NAME)\n"
-     << "#endif\n";
-
-  std::vector<Record *> Tags = Records.getAllDerivedDefinitions("Command");
-  for (size_t i = 0, e = Tags.size(); i != e; ++i) {
-    Record &Tag = *Tags[i];
-    std::string MangledName = MangleName(Tag.getValueAsString("Name"));
-
-    OS << "COMMENT_COMMAND(" << MangledName << ")\n";
-  }
-}
-} // end namespace clang
-
diff --git a/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp b/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp
deleted file mode 100644
index bfdb268..0000000
--- a/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-//===--- ClangCommentHTMLNamedCharacterReferenceEmitter.cpp -----------------=//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This tablegen backend emits an fficient function to translate HTML named
-// character references to UTF-8 sequences.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/ADT/SmallString.h"
-#include "llvm/Support/ConvertUTF.h"
-#include "llvm/TableGen/Error.h"
-#include "llvm/TableGen/Record.h"
-#include "llvm/TableGen/StringMatcher.h"
-#include "llvm/TableGen/TableGenBackend.h"
-#include <vector>
-
-using namespace llvm;
-
-/// \brief Convert a code point to the corresponding UTF-8 sequence represented
-/// as a C string literal.
-///
-/// \returns true on success.
-static bool translateCodePointToUTF8(unsigned CodePoint,
-                                     SmallVectorImpl<char> &CLiteral) {
-  char Translated[UNI_MAX_UTF8_BYTES_PER_CODE_POINT];
-  char *TranslatedPtr = Translated;
-  if (!ConvertCodePointToUTF8(CodePoint, TranslatedPtr))
-    return false;
-
-  StringRef UTF8(Translated, TranslatedPtr - Translated);
-
-  raw_svector_ostream OS(CLiteral);
-  OS << "\"";
-  for (size_t i = 0, e = UTF8.size(); i != e; ++i) {
-    OS << "\\x";
-    OS.write_hex(static_cast<unsigned char>(UTF8[i]));
-  }
-  OS << "\"";
-
-  return true;
-}
-
-namespace clang {
-void EmitClangCommentHTMLNamedCharacterReferences(RecordKeeper &Records,
-                                                  raw_ostream &OS) {
-  std::vector<Record *> Tags = Records.getAllDerivedDefinitions("NCR");
-  std::vector<StringMatcher::StringPair> NameToUTF8;
-  SmallString<32> CLiteral;
-  for (std::vector<Record *>::iterator I = Tags.begin(), E = Tags.end();
-       I != E; ++I) {
-    Record &Tag = **I;
-    std::string Spelling = Tag.getValueAsString("Spelling");
-    uint64_t CodePoint = Tag.getValueAsInt("CodePoint");
-    CLiteral.clear();
-    CLiteral.append("return ");
-    if (!translateCodePointToUTF8(CodePoint, CLiteral)) {
-      SrcMgr.PrintMessage(Tag.getLoc().front(),
-                          SourceMgr::DK_Error,
-                          Twine("invalid code point"));
-      continue;
-    }
-    CLiteral.append(";");
-
-    StringMatcher::StringPair Match(Spelling, CLiteral.str());
-    NameToUTF8.push_back(Match);
-  }
-
-  emitSourceFileHeader("HTML named character reference to UTF-8 "
-                       "translation", OS);
-
-  OS << "StringRef translateHTMLNamedCharacterReferenceToUTF8(\n"
-        "                                             StringRef Name) {\n";
-  StringMatcher("Name", NameToUTF8, OS).Emit();
-  OS << "  return StringRef();\n"
-     << "}\n\n";
-}
-
-} // end namespace clang
-
diff --git a/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp b/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp
deleted file mode 100644
index 2a9110f..0000000
--- a/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-//===--- ClangCommentHTMLTagsEmitter.cpp - Generate HTML tag list for Clang -=//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This tablegen backend emits efficient matchers for HTML tags that are used
-// in documentation comments.
-//
-//===----------------------------------------------------------------------===//
-
-#include "TableGenBackends.h"
-#include "llvm/TableGen/Record.h"
-#include "llvm/TableGen/StringMatcher.h"
-#include "llvm/TableGen/TableGenBackend.h"
-#include <vector>
-
-using namespace llvm;
-
-void clang::EmitClangCommentHTMLTags(RecordKeeper &Records, raw_ostream &OS) {
-  std::vector<Record *> Tags = Records.getAllDerivedDefinitions("Tag");
-  std::vector<StringMatcher::StringPair> Matches;
-  for (Record *Tag : Tags) {
-    std::string Spelling = Tag->getValueAsString("Spelling");
-    Matches.push_back(StringMatcher::StringPair(Spelling, "return true;"));
-  }
-
-  emitSourceFileHeader("HTML tag name matcher", OS);
-
-  OS << "bool isHTMLTagName(StringRef Name) {\n";
-  StringMatcher("Name", Matches, OS).Emit();
-  OS << "  return false;\n"
-     << "}\n\n";
-}
-
-void clang::EmitClangCommentHTMLTagsProperties(RecordKeeper &Records,
-                                               raw_ostream &OS) {
-  std::vector<Record *> Tags = Records.getAllDerivedDefinitions("Tag");
-  std::vector<StringMatcher::StringPair> MatchesEndTagOptional;
-  std::vector<StringMatcher::StringPair> MatchesEndTagForbidden;
-  for (Record *Tag : Tags) {
-    std::string Spelling = Tag->getValueAsString("Spelling");
-    StringMatcher::StringPair Match(Spelling, "return true;");
-    if (Tag->getValueAsBit("EndTagOptional"))
-      MatchesEndTagOptional.push_back(Match);
-    if (Tag->getValueAsBit("EndTagForbidden"))
-      MatchesEndTagForbidden.push_back(Match);
-  }
-
-  emitSourceFileHeader("HTML tag properties", OS);
-
-  OS << "bool isHTMLEndTagOptional(StringRef Name) {\n";
-  StringMatcher("Name", MatchesEndTagOptional, OS).Emit();
-  OS << "  return false;\n"
-     << "}\n\n";
-
-  OS << "bool isHTMLEndTagForbidden(StringRef Name) {\n";
-  StringMatcher("Name", MatchesEndTagForbidden, OS).Emit();
-  OS << "  return false;\n"
-     << "}\n\n";
-
-  std::vector<Record *> Attributes =
-      Records.getAllDerivedDefinitions("Attribute");
-  std::vector<StringMatcher::StringPair> Matches;
-  for (Record *Attribute : Attributes) {
-    std::string Spelling = Attribute->getValueAsString("Spelling");
-    if (!Attribute->getValueAsBit("IsSafeToPassThrough"))
-      Matches.push_back(StringMatcher::StringPair(Spelling, "return false;"));
-  }
-
-  emitSourceFileHeader("HTML attribute name matcher", OS);
-
-  OS << "bool isHTMLAttributeSafeToPassThrough(StringRef Name) {\n";
-  StringMatcher("Name", Matches, OS).Emit();
-  OS << "  return true;\n"
-     << "}\n\n";
-}
-
diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp
index 4484e65..e4a640b 100644
--- a/utils/TableGen/TableGen.cpp
+++ b/utils/TableGen/TableGen.cpp
@@ -40,15 +40,9 @@ enum ActionType {
   GenClangDiagsDefs,
   GenClangDiagGroups,
   GenClangDiagsIndexName,
-  GenClangCommentNodes,
   GenClangDeclNodes,
   GenClangStmtNodes,
   GenClangSACheckers,
-  GenClangCommentHTMLTags,
-  GenClangCommentHTMLTagsProperties,
-  GenClangCommentHTMLNamedCharacterReferences,
-  GenClangCommentCommandInfo,
-  GenClangCommentCommandList,
   GenArmNeon,
   GenArmNeonSema,
   GenArmNeonTest,
@@ -101,31 +95,12 @@ cl::opt<ActionType> Action(
                    "Generate Clang diagnostic groups"),
         clEnumValN(GenClangDiagsIndexName, "gen-clang-diags-index-name",
                    "Generate Clang diagnostic name index"),
-        clEnumValN(GenClangCommentNodes, "gen-clang-comment-nodes",
-                   "Generate Clang AST comment nodes"),
         clEnumValN(GenClangDeclNodes, "gen-clang-decl-nodes",
                    "Generate Clang AST declaration nodes"),
         clEnumValN(GenClangStmtNodes, "gen-clang-stmt-nodes",
                    "Generate Clang AST statement nodes"),
         clEnumValN(GenClangSACheckers, "gen-clang-sa-checkers",
                    "Generate Clang Static Analyzer checkers"),
-        clEnumValN(GenClangCommentHTMLTags, "gen-clang-comment-html-tags",
-                   "Generate efficient matchers for HTML tag "
-                   "names that are used in documentation comments"),
-        clEnumValN(GenClangCommentHTMLTagsProperties,
-                   "gen-clang-comment-html-tags-properties",
-                   "Generate efficient matchers for HTML tag "
-                   "properties"),
-        clEnumValN(GenClangCommentHTMLNamedCharacterReferences,
-                   "gen-clang-comment-html-named-character-references",
-                   "Generate function to translate named character "
-                   "references to UTF-8 sequences"),
-        clEnumValN(GenClangCommentCommandInfo, "gen-clang-comment-command-info",
-                   "Generate command properties for commands that "
-                   "are used in documentation comments"),
-        clEnumValN(GenClangCommentCommandList, "gen-clang-comment-command-list",
-                   "Generate list of commands that are used in "
-                   "documentation comments"),
         clEnumValN(GenArmNeon, "gen-arm-neon", "Generate arm_neon.h for clang"),
         clEnumValN(GenArmNeonSema, "gen-arm-neon-sema",
                    "Generate ARM NEON sema support for clang"),
@@ -193,9 +168,6 @@ bool ClangTableGenMain(raw_ostream &OS, RecordKeeper &Records) {
   case GenClangDiagsIndexName:
     EmitClangDiagsIndexName(Records, OS);
     break;
-  case GenClangCommentNodes:
-    EmitClangASTNodes(Records, OS, "Comment", "");
-    break;
   case GenClangDeclNodes:
     EmitClangASTNodes(Records, OS, "Decl", "Decl");
     EmitClangDeclContext(Records, OS);
@@ -206,21 +178,6 @@ bool ClangTableGenMain(raw_ostream &OS, RecordKeeper &Records) {
   case GenClangSACheckers:
     EmitClangSACheckers(Records, OS);
     break;
-  case GenClangCommentHTMLTags:
-    EmitClangCommentHTMLTags(Records, OS);
-    break;
-  case GenClangCommentHTMLTagsProperties:
-    EmitClangCommentHTMLTagsProperties(Records, OS);
-    break;
-  case GenClangCommentHTMLNamedCharacterReferences:
-    EmitClangCommentHTMLNamedCharacterReferences(Records, OS);
-    break;
-  case GenClangCommentCommandInfo:
-    EmitClangCommentCommandInfo(Records, OS);
-    break;
-  case GenClangCommentCommandList:
-    EmitClangCommentCommandList(Records, OS);
-    break;
   case GenArmNeon:
     EmitNeon(Records, OS);
     break;


More information about the cfe-commits mailing list