//===- CXComment.cpp - libclang APIs for manipulating CXComments ----------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file defines all libclang APIs related to walking comment AST.////===----------------------------------------------------------------------===//#include"clang-c/Index.h"#include"CXComment.h"#include"CXCursor.h"#include"CXString.h"#include"SimpleFormatContext.h"#include"clang/AST/CommentCommandTraits.h"#include"clang/AST/CommentVisitor.h"#include"clang/AST/Decl.h"#include"clang/AST/PrettyPrinter.h"#include"clang/Format/Format.h"#include"clang/Lex/Lexer.h"#include"llvm/ADT/StringExtras.h"#include"llvm/ADT/StringSwitch.h"#include"llvm/Support/ErrorHandling.h"#include"llvm/Support/raw_ostream.h"#include<climits>usingnamespaceclang;usingnamespaceclang::comments;usingnamespaceclang::cxcomment;extern"C"{enumCXCommentKindclang_Comment_getKind(CXCommentCXC){constComment*C=getASTNode(CXC);if(!C)returnCXComment_Null;switch(C->getCommentKind()){caseComment::NoCommentKind:returnCXComment_Null;caseComment::TextCommentKind:returnCXComment_Text;caseComment::InlineCommandCommentKind:returnCXComment_InlineCommand;caseComment::HTMLStartTagCommentKind:returnCXComment_HTMLStartTag;caseComment::HTMLEndTagCommentKind:returnCXComment_HTMLEndTag;caseComment::ParagraphCommentKind:returnCXComment_Paragraph;caseComment::BlockCommandCommentKind:returnCXComment_BlockCommand;caseComment::