LCOV - code coverage report
Current view: top level - build-llvm/tools/clang/include/clang/AST - CommentHTMLTags.inc (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 22 50 44.0 %
Date: 2018-10-20 13:21:21 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
       2             : |*                                                                            *|
       3             : |* HTML tag name matcher                                                      *|
       4             : |*                                                                            *|
       5             : |* Automatically generated file, do not edit!                                 *|
       6             : |*                                                                            *|
       7             : \*===----------------------------------------------------------------------===*/
       8             : 
       9         254 : bool isHTMLTagName(StringRef Name) {
      10         254 :   switch (Name.size()) {
      11             :   default: break;
      12         126 :   case 1:        // 6 strings to match.
      13             :     switch (Name[0]) {
      14             :     default: break;
      15             :     case 'a':    // 1 string to match.
      16             :       return true;       // "a"
      17             :     case 'b':    // 1 string to match.
      18             :       return true;       // "b"
      19             :     case 'i':    // 1 string to match.
      20             :       return true;       // "i"
      21             :     case 'p':    // 1 string to match.
      22             :       return true;       // "p"
      23             :     case 's':    // 1 string to match.
      24             :       return true;       // "s"
      25             :     case 'u':    // 1 string to match.
      26             :       return true;       // "u"
      27             :     }
      28             :     break;
      29          65 :   case 2:        // 19 strings to match.
      30             :     switch (Name[0]) {
      31             :     default: break;
      32          21 :     case 'b':    // 1 string to match.
      33          21 :       if (Name[1] != 'r')
      34             :         break;
      35             :       return true;       // "br"
      36           0 :     case 'd':    // 3 strings to match.
      37             :       switch (Name[1]) {
      38             :       default: break;
      39             :       case 'd':  // 1 string to match.
      40             :         return true;     // "dd"
      41             :       case 'l':  // 1 string to match.
      42             :         return true;     // "dl"
      43             :       case 't':  // 1 string to match.
      44             :         return true;     // "dt"
      45             :       }
      46             :       break;
      47          36 :     case 'e':    // 1 string to match.
      48          36 :       if (Name[1] != 'm')
      49             :         break;
      50             :       return true;       // "em"
      51           8 :     case 'h':    // 7 strings to match.
      52             :       switch (Name[1]) {
      53             :       default: break;
      54             :       case '1':  // 1 string to match.
      55             :         return true;     // "h1"
      56             :       case '2':  // 1 string to match.
      57             :         return true;     // "h2"
      58             :       case '3':  // 1 string to match.
      59             :         return true;     // "h3"
      60             :       case '4':  // 1 string to match.
      61             :         return true;     // "h4"
      62             :       case '5':  // 1 string to match.
      63             :         return true;     // "h5"
      64             :       case '6':  // 1 string to match.
      65             :         return true;     // "h6"
      66             :       case 'r':  // 1 string to match.
      67             :         return true;     // "hr"
      68             :       }
      69             :       break;
      70           0 :     case 'l':    // 1 string to match.
      71           0 :       if (Name[1] != 'i')
      72             :         break;
      73             :       return true;       // "li"
      74           0 :     case 'o':    // 1 string to match.
      75           0 :       if (Name[1] != 'l')
      76             :         break;
      77             :       return true;       // "ol"
      78           0 :     case 't':    // 4 strings to match.
      79             :       switch (Name[1]) {
      80             :       default: break;
      81             :       case 'd':  // 1 string to match.
      82             :         return true;     // "td"
      83             :       case 'h':  // 1 string to match.
      84             :         return true;     // "th"
      85             :       case 'r':  // 1 string to match.
      86             :         return true;     // "tr"
      87             :       case 't':  // 1 string to match.
      88             :         return true;     // "tt"
      89             :       }
      90             :       break;
      91           0 :     case 'u':    // 1 string to match.
      92           0 :       if (Name[1] != 'l')
      93             :         break;
      94             :       return true;       // "ul"
      95             :     }
      96             :     break;
      97          44 :   case 3:        // 9 strings to match.
      98             :     switch (Name[0]) {
      99             :     default: break;
     100             :     case 'b':    // 1 string to match.
     101           0 :       if (memcmp(Name.data()+1, "ig", 2) != 0)
     102             :         break;
     103             :       return true;       // "big"
     104             :     case 'c':    // 1 string to match.
     105           0 :       if (memcmp(Name.data()+1, "ol", 2) != 0)
     106             :         break;
     107             :       return true;       // "col"
     108           8 :     case 'd':    // 2 strings to match.
     109             :       switch (Name[1]) {
     110             :       default: break;
     111           0 :       case 'e':  // 1 string to match.
     112           0 :         if (Name[2] != 'l')
     113             :           break;
     114             :         return true;     // "del"
     115           8 :       case 'i':  // 1 string to match.
     116           8 :         if (Name[2] != 'v')
     117             :           break;
     118             :         return true;     // "div"
     119             :       }
     120             :       break;
     121          32 :     case 'i':    // 2 strings to match.
     122             :       switch (Name[1]) {
     123             :       default: break;
     124          32 :       case 'm':  // 1 string to match.
     125          32 :         if (Name[2] != 'g')
     126             :           break;
     127             :         return true;     // "img"
     128           0 :       case 'n':  // 1 string to match.
     129           0 :         if (Name[2] != 's')
     130             :           break;
     131             :         return true;     // "ins"
     132             :       }
     133             :       break;
     134             :     case 'p':    // 1 string to match.
     135           2 :       if (memcmp(Name.data()+1, "re", 2) != 0)
     136             :         break;
     137             :       return true;       // "pre"
     138           0 :     case 's':    // 2 strings to match.
     139           0 :       if (Name[1] != 'u')
     140             :         break;
     141             :       switch (Name[2]) {
     142             :       default: break;
     143             :       case 'b':  // 1 string to match.
     144             :         return true;     // "sub"
     145             :       case 'p':  // 1 string to match.
     146             :         return true;     // "sup"
     147             :       }
     148             :       break;
     149             :     }
     150             :     break;
     151           0 :   case 4:        // 3 strings to match.
     152             :     switch (Name[0]) {
     153             :     default: break;
     154             :     case 'c':    // 1 string to match.
     155           0 :       if (memcmp(Name.data()+1, "ode", 3) != 0)
     156             :         break;
     157             :       return true;       // "code"
     158             :     case 'f':    // 1 string to match.
     159           0 :       if (memcmp(Name.data()+1, "ont", 3) != 0)
     160             :         break;
     161             :       return true;       // "font"
     162             :     case 's':    // 1 string to match.
     163           0 :       if (memcmp(Name.data()+1, "pan", 3) != 0)
     164             :         break;
     165             :       return true;       // "span"
     166             :     }
     167             :     break;
     168           6 :   case 5:        // 5 strings to match.
     169             :     switch (Name[0]) {
     170             :     default: break;
     171             :     case 's':    // 1 string to match.
     172           2 :       if (memcmp(Name.data()+1, "mall", 4) != 0)
     173             :         break;
     174             :       return true;       // "small"
     175           4 :     case 't':    // 4 strings to match.
     176             :       switch (Name[1]) {
     177             :       default: break;
     178             :       case 'a':  // 1 string to match.
     179           4 :         if (memcmp(Name.data()+2, "ble", 3) != 0)
     180             :           break;
     181             :         return true;     // "table"
     182             :       case 'b':  // 1 string to match.
     183           0 :         if (memcmp(Name.data()+2, "ody", 3) != 0)
     184             :           break;
     185             :         return true;     // "tbody"
     186             :       case 'f':  // 1 string to match.
     187           0 :         if (memcmp(Name.data()+2, "oot", 3) != 0)
     188             :           break;
     189             :         return true;     // "tfoot"
     190             :       case 'h':  // 1 string to match.
     191           0 :         if (memcmp(Name.data()+2, "ead", 3) != 0)
     192             :           break;
     193             :         return true;     // "thead"
     194             :       }
     195             :       break;
     196             :     }
     197             :     break;
     198             :   case 6:        // 2 strings to match.
     199           0 :     if (memcmp(Name.data()+0, "str", 3) != 0)
     200             :       break;
     201             :     switch (Name[3]) {
     202             :     default: break;
     203             :     case 'i':    // 1 string to match.
     204           0 :       if (memcmp(Name.data()+4, "ke", 2) != 0)
     205             :         break;
     206             :       return true;       // "strike"
     207             :     case 'o':    // 1 string to match.
     208           0 :       if (memcmp(Name.data()+4, "ng", 2) != 0)
     209             :         break;
     210             :       return true;       // "strong"
     211             :     }
     212             :     break;
     213             :   case 7:        // 1 string to match.
     214           0 :     if (memcmp(Name.data()+0, "caption", 7) != 0)
     215             :       break;
     216             :     return true;         // "caption"
     217             :   case 8:        // 1 string to match.
     218           0 :     if (memcmp(Name.data()+0, "colgroup", 8) != 0)
     219             :       break;
     220             :     return true;         // "colgroup"
     221             :   case 10:       // 1 string to match.
     222           8 :     if (memcmp(Name.data()+0, "blockquote", 10) != 0)
     223             :       break;
     224             :     return true;         // "blockquote"
     225             :   }
     226             :   return false;
     227             : }
     228             : 

Generated by: LCOV version 1.13