Thread a SourceLocation into the EmitCheck for "load_invalid_value". This occurs

when scalars are loaded / undergo lvalue-to-rvalue conversion.

llvm-svn: 191808
This commit is contained in:
Nick Lewycky
2013-10-02 02:29:49 +00:00
parent b7aa592c19
commit 2d84e84236
15 changed files with 182 additions and 133 deletions

View File

@@ -238,7 +238,7 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) {
DI->EmitFunctionEnd(Builder);
}
EmitFunctionEpilog(*CurFnInfo, EmitRetDbgLoc);
EmitFunctionEpilog(*CurFnInfo, EmitRetDbgLoc, EndLoc);
EmitEndEHSpec(CurCodeDecl);
assert(EHStack.empty() &&
@@ -591,7 +591,8 @@ void CodeGenFunction::StartFunction(GlobalDecl GD,
if (LambdaThisCaptureField) {
// If this lambda captures this, load it.
LValue ThisLValue = EmitLValueForLambdaField(LambdaThisCaptureField);
CXXThisValue = EmitLoadOfLValue(ThisLValue).getScalarVal();
CXXThisValue = EmitLoadOfLValue(ThisLValue,
SourceLocation()).getScalarVal();
}
} else {
// Not in a lambda; just use 'this' from the method.