| 272 | |
| 273 | |
| 274 | bool VisitCallExpr(clang::CallExpr *e) { |
| 275 | // Find out arguments passed by references |
| 276 | auto decl = e->getDirectCallee(); |
| 277 | if (decl && !llvm::isa<clang::CXXOperatorCallExpr>(e)) { |
| 278 | // Don't handle CXXOperatorCallExpr because it is obvious for operator= += and so on. |
| 279 | // And also because of the wierd rules regarding the member operators and their number |
| 280 | // of arguments |
| 281 | for (uint i = 0; decl && i < e->getNumArgs() && i < decl->getNumParams() ; ++i) { |
| 282 | auto t = decl->getParamDecl(i)->getType(); |
| 283 | if (t->isLValueReferenceType() && !t.getNonReferenceType().isConstQualified()) { |
| 284 | annotator.annotateSourceRange(e->getArg(i)->getSourceRange(), "span", "class='refarg'"); |
| 285 | } |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | // support QObject::connect SIGNAL and SLOT |
| 290 | QtSupport qt{annotator, currentContext}; |
| 291 | qt.visitCallExpr(e); |
| 292 | return true; |
| 293 | } |
| 294 | |
| 295 | |
| 296 | bool VisitGotoStmt(clang::GotoStmt *stm) { |
nothing calls this directly
no test coverage detected