"Expression bound to a temporary must have record or array type!")(static_cast <bool> ((SubExpr->getType()->isRecordType() || SubExpr->getType()->isArrayType()) && "Expression bound to a temporary must have record or array type!") ? void (0) : __assert_fail ("(SubExpr->getType()->isRecordType() || SubExpr->getType()->isArrayType()) && \"Expression bound to a temporary must have record or array type!\"", "/build/llvm-toolchain-snapshot-7~svn338205/tools/clang/lib/AST/ExprCXX.cpp", 757, __extension__ __PRETTY_FUNCTION__));

// Unlike for UnresolvedLookupExpr, it is very easy to re-derive this.

1283

1284

// If there was a nested name specifier, it names the naming class.

1285

// It can't be dependent: after all, we were actually able to do the

1286

// lookup.

1287

CXXRecordDecl *Record = nullptr;

1288

auto *NNS = getQualifier();

1289

if (NNS && NNS->getKind() != NestedNameSpecifier::Super) {

1290

const Type *T = getQualifier()->getAsType();

1291

assert(T && "qualifier in member expression does not name type")(static_cast <bool> (T && "qualifier in member expression does not name type") ? void (0) : __assert_fail ("T && \"qualifier in member expression does not name type\"", "/build/llvm-toolchain-snapshot-7~svn338205/tools/clang/lib/AST/ExprCXX.cpp", 1291, __extension__ __PRETTY_FUNCTION__));

1292

Record = T->getAsCXXRecordDecl();

1293

assert(Record && "qualifier in member expression does not name record")(static_cast <bool> (Record && "qualifier in member expression does not name record") ? void (0) : __assert_fail ("Record && \"qualifier in member expression does not name record\"", "/build/llvm-toolchain-snapshot-7~svn338205/tools/clang/lib/AST/ExprCXX.cpp", 1293, __extension__ __PRETTY_FUNCTION__));

1294

}

1295

// Otherwise the naming class must have been the base class.

1296

else {

1297

QualType BaseType = getBaseType().getNonReferenceType();

1298

if (isArrow()) {

1299

constauto *PT = BaseType->getAs<PointerType>();

1300

assert(PT && "base of arrow member access is not pointer")(static_cast <bool> (PT && "base of arrow member access is not pointer") ? void (0) : __assert_fail ("PT && \"base of arrow member access is not pointer\"", "/build/llvm-toolchain-snapshot-7~svn338205/tools/clang/lib/AST/ExprCXX.cpp", 1300, __extension__ __PRETTY_FUNCTION__));

1301

BaseType = PT->getPointeeType();

1302

}

1303

1304

Record = BaseType->getAsCXXRecordDecl();

1305

assert(Record && "base of member expression does not name record")(static_cast <bool> (Record && "base of member expression does not name record") ? void (0) : __assert_fail ("Record && \"base of member expression does not name record\"", "/build/llvm-toolchain-snapshot-7~svn338205/tools/clang/lib/AST/ExprCXX.cpp", 1305, __extension__ __PRETTY_FUNCTION__));