Lines Matching defs:CMD
517 // If CMD is of the form T foo() { return FieldName; } then returns "FieldName".
518 std::optional<StringRef> getterVariableName(const CXXMethodDecl *CMD) {
519 assert(CMD->hasBody());
520 if (CMD->getNumParams() != 0 || CMD->isVariadic())
522 const auto *Body = llvm::dyn_cast<CompoundStmt>(CMD->getBody());
531 // If CMD is one of the forms:
537 std::optional<StringRef> setterVariableName(const CXXMethodDecl *CMD) {
538 assert(CMD->hasBody());
539 if (CMD->isConst() || CMD->getNumParams() != 1 || CMD->isVariadic())
541 const ParmVarDecl *Arg = CMD->getParamDecl(0);
545 const auto *Body = llvm::dyn_cast<CompoundStmt>(CMD->getBody());
597 if (const auto *CMD = llvm::dyn_cast<CXXMethodDecl>(ND)) {
599 if (CMD->getDeclName().isIdentifier() && !CMD->isStatic() &&
600 (CMD = llvm::dyn_cast_or_null<CXXMethodDecl>(CMD->getDefinition())) &&
601 CMD->hasBody()) {
602 if (const auto GetterField = getterVariableName(CMD))
604 if (const auto SetterField = setterVariableName(CMD))