| 245 | } |
| 246 | |
| 247 | void DocStringTagParser::checkParameters( |
| 248 | CallableDeclaration const& _callable, |
| 249 | StructurallyDocumented const& _node, |
| 250 | StructurallyDocumentedAnnotation& _annotation |
| 251 | ) |
| 252 | { |
| 253 | std::set<std::string> validParams; |
| 254 | for (auto const& p: _callable.parameters()) |
| 255 | validParams.insert(p->name()); |
| 256 | if (_callable.returnParameterList()) |
| 257 | for (auto const& p: _callable.returnParameterList()->parameters()) |
| 258 | validParams.insert(p->name()); |
| 259 | auto paramRange = _annotation.docTags.equal_range("param"); |
| 260 | for (auto i = paramRange.first; i != paramRange.second; ++i) |
| 261 | if (!validParams.count(i->second.paramName)) |
| 262 | m_errorReporter.docstringParsingError( |
| 263 | 3881_error, |
| 264 | _node.documentation()->location(), |
| 265 | "Documented parameter \"" + |
| 266 | i->second.paramName + |
| 267 | "\" not found in the parameter list of the function." |
| 268 | ); |
| 269 | } |
| 270 | |
| 271 | void DocStringTagParser::handleConstructor( |
| 272 | CallableDeclaration const& _callable, |
nothing calls this directly
no test coverage detected