diff options
| author | Dmitri Gribenko <gribozavr@gmail.com> | 2014-04-30 21:54:30 +0000 |
|---|---|---|
| committer | Dmitri Gribenko <gribozavr@gmail.com> | 2014-04-30 21:54:30 +0000 |
| commit | 89a92d3570559455ad76df4a77f29c6b3046d11e (patch) | |
| tree | 9b97d279bee96b5a74c4a02150960318516e7747 /utils | |
| parent | ac011f7b0309ebcea9ce1e4dc118c22afb21c2b8 (diff) | |
| download | clang-89a92d3570559455ad76df4a77f29c6b3046d11e.tar.gz clang-89a92d3570559455ad76df4a77f29c6b3046d11e.tar.bz2 clang-89a92d3570559455ad76df4a77f29c6b3046d11e.tar.xz | |
Comment parsing: remove HTML attribute validation
Since the community says that a blacklist is not good enough, and I don't have
enough time now to implement a proper whitelist, let's just remove the
attribute validation.
But, nevertheless, we can still communicate in the generated XML if our parser
found an issue with the HTML. But this bit is best-effort and is specifically
called out in the schema as such.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/TableGen/ClangCommentHTMLTagsEmitter.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp b/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp index 2a9110f8eb..22c6226cfe 100644 --- a/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp +++ b/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp @@ -61,21 +61,5 @@ void clang::EmitClangCommentHTMLTagsProperties(RecordKeeper &Records, 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"; } |
