* @throws InternalError thrown if index is out of bounds */
| 358 | * @throws InternalError thrown if index is out of bounds |
| 359 | */ |
| 360 | AstNodePtr getChild(int c) { |
| 361 | if (c >= children.size()) { |
| 362 | std::ostringstream err; |
| 363 | err << "ClangImport: AstNodePtr::getChild(" << c << ") out of bounds. children.size=" << children.size() << " " << nodeType; |
| 364 | for (const std::string &s: mExtTokens) |
| 365 | err << " " << s; |
| 366 | throw InternalError(nullptr, err.str()); |
| 367 | } |
| 368 | return children[c]; |
| 369 | } |
| 370 | private: |
| 371 | /** |
| 372 | * @throws InternalError thrown if CXXForRangeStmt cannot be imported |
no test coverage detected