aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/CMakeLists.txt2
-rw-r--r--lib/AST/CommentLexer.cpp28
-rw-r--r--lib/AST/CommentSema.cpp29
3 files changed, 8 insertions, 51 deletions
diff --git a/lib/AST/CMakeLists.txt b/lib/AST/CMakeLists.txt
index bcc96f912e..14c0aa5eed 100644
--- a/lib/AST/CMakeLists.txt
+++ b/lib/AST/CMakeLists.txt
@@ -65,6 +65,8 @@ add_dependencies(clangAST
ClangAttrList
ClangAttrImpl
ClangCommentNodes
+ ClangCommentHTMLTags
+ ClangCommentHTMLTagsProperties
ClangDeclNodes
ClangDiagnosticAST
ClangDiagnosticComment
diff --git a/lib/AST/CommentLexer.cpp b/lib/AST/CommentLexer.cpp
index 870db2be5f..eb0ac2472a 100644
--- a/lib/AST/CommentLexer.cpp
+++ b/lib/AST/CommentLexer.cpp
@@ -29,32 +29,8 @@ bool isHTMLHexCharacterReferenceCharacter(char C) {
(C >= 'A' && C <= 'F');
}
-bool isHTMLTagName(StringRef Name) {
- return llvm::StringSwitch<bool>(Name)
- .Cases("em", "strong", true)
- .Cases("tt", "i", "b", "big", "small", true)
- .Cases("strike", "s", "u", "font", true)
- .Case("a", true)
- .Case("hr", true)
- .Cases("div", "span", true)
- .Cases("h1", "h2", "h3", true)
- .Cases("h4", "h5", "h6", true)
- .Case("code", true)
- .Case("blockquote", true)
- .Cases("sub", "sup", true)
- .Case("img", true)
- .Case("p", true)
- .Case("br", true)
- .Case("pre", true)
- .Cases("ins", "del", true)
- .Cases("ul", "ol", "li", true)
- .Cases("dl", "dt", "dd", true)
- .Cases("table", "caption", true)
- .Cases("thead", "tfoot", "tbody", true)
- .Cases("colgroup", "col", true)
- .Cases("tr", "th", "td", true)
- .Default(false);
-}
+#include "clang/AST/CommentHTMLTags.inc"
+
} // unnamed namespace
StringRef Lexer::resolveHTMLNamedCharacterReference(StringRef Name) const {
diff --git a/lib/AST/CommentSema.cpp b/lib/AST/CommentSema.cpp
index 923081dda6..ffb6e86788 100644
--- a/lib/AST/CommentSema.cpp
+++ b/lib/AST/CommentSema.cpp
@@ -18,6 +18,10 @@
namespace clang {
namespace comments {
+namespace {
+#include "clang/AST/CommentHTMLTagsProperties.inc"
+} // unnamed namespace
+
Sema::Sema(llvm::BumpPtrAllocator &Allocator, const SourceManager &SourceMgr,
DiagnosticsEngine &Diags, const CommandTraits &Traits) :
Allocator(Allocator), SourceMgr(SourceMgr), Diags(Diags), Traits(Traits),
@@ -745,31 +749,6 @@ Sema::getInlineCommandRenderKind(StringRef Name) const {
.Default(InlineCommandComment::RenderNormal);
}
-bool Sema::isHTMLEndTagOptional(StringRef Name) {
- return llvm::StringSwitch<bool>(Name)
- .Case("p", true)
- .Case("li", true)
- .Case("dt", true)
- .Case("dd", true)
- .Case("tr", true)
- .Case("th", true)
- .Case("td", true)
- .Case("thead", true)
- .Case("tfoot", true)
- .Case("tbody", true)
- .Case("colgroup", true)
- .Default(false);
-}
-
-bool Sema::isHTMLEndTagForbidden(StringRef Name) {
- return llvm::StringSwitch<bool>(Name)
- .Case("br", true)
- .Case("hr", true)
- .Case("img", true)
- .Case("col", true)
- .Default(false);
-}
-
} // end namespace comments
} // end namespace clang