| 261 | } |
| 262 | |
| 263 | bool IsValidMemberName(const char* s) { |
| 264 | bool angle_name = false; |
| 265 | |
| 266 | switch (*s) { |
| 267 | case '\0': |
| 268 | // The empty string is not a valid name. |
| 269 | return false; |
| 270 | case '<': |
| 271 | angle_name = true; |
| 272 | s++; |
| 273 | break; |
| 274 | } |
| 275 | |
| 276 | while (true) { |
| 277 | switch (*s) { |
| 278 | case '\0': |
| 279 | return !angle_name; |
| 280 | case '>': |
| 281 | return angle_name && s[1] == '\0'; |
| 282 | } |
| 283 | |
| 284 | if (!IsValidPartOfMemberNameUtf8(&s)) { |
| 285 | return false; |
| 286 | } |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | enum ClassNameType { kName, kDescriptor }; |
| 291 | template<ClassNameType kType, char kSeparator> |
no test coverage detected