}
SourceLocation CXXCtorInitializer::getSourceLocation() const {
- if (isAnyMemberInitializer())
- return getMemberLocation();
-
if (isInClassMemberInitializer())
return getAnyMember()->getLocation();
+ if (isAnyMemberInitializer())
+ return getMemberLocation();
+
if (TypeSourceInfo *TSInfo = Initializee.get<TypeSourceInfo*>())
return TSInfo->getTypeLoc().getLocalSourceRange().getBegin();
CXXCtorInitializer *MemberInit,
const CXXConstructorDecl *Constructor,
FunctionArgList &Args) {
- ApplyDebugLocation Loc(CGF, MemberInit->getMemberLocation());
+ ApplyDebugLocation Loc(CGF, MemberInit->getSourceLocation());
assert(MemberInit->isAnyMemberInitializer() &&
"Must have member initializer!");
assert(MemberInit->getInit() && "Must have initializer!");
ArrayRef<VarDecl *> ArrayIndexes;
if (MemberInit->getNumArrayIndices())
ArrayIndexes = MemberInit->getArrayIndexes();
- ApplyDebugLocation DL(CGF, MemberInit->getMemberLocation());
CGF.EmitInitializerForField(Field, LHS, MemberInit->getInit(), ArrayIndexes);
}
// CHECK-LABEL: define
// CHECK-LABEL: define
// CHECK-LABEL: define
+struct {
// CHECK: call {{.*}}, !dbg [[DBG_F14_CTOR_CALL:![0-9]*]]
-// FIXME: The ctor call should be attributed to the line of the NSDMI, not the
-// start of this declaration.
#line 1600
-struct {
- f14 v = 1;
+ f14 v
+ =
+ 1;
} f14_inst;
// CHECK-LABEL: define