File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -361,17 +361,18 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) {
361
361
bool HasOnlyLifetimeMarkers =
362
362
HasCleanups && EHStack.containsOnlyLifetimeMarkers (PrologueCleanupDepth);
363
363
bool EmitRetDbgLoc = !HasCleanups || HasOnlyLifetimeMarkers;
364
+
365
+ std::optional<ApplyDebugLocation> OAL;
364
366
if (HasCleanups) {
365
367
// Make sure the line table doesn't jump back into the body for
366
368
// the ret after it's been at EndLoc.
367
- std::optional<ApplyDebugLocation> AL;
368
369
if (CGDebugInfo *DI = getDebugInfo ()) {
369
370
if (OnlySimpleReturnStmts)
370
371
DI->EmitLocation (Builder, EndLoc);
371
372
else
372
373
// We may not have a valid end location. Try to apply it anyway, and
373
374
// fall back to an artificial location if needed.
374
- AL = ApplyDebugLocation::CreateDefaultArtificial (*this , EndLoc);
375
+ OAL = ApplyDebugLocation::CreateDefaultArtificial (*this , EndLoc);
375
376
}
376
377
377
378
PopCleanupBlocks (PrologueCleanupDepth);
Original file line number Diff line number Diff line change
1
+ // RUN: %clang -x objective-c -target arm64-apple-macos12.0 -fobjc-arc -std=gnu99 -O0 -fsanitize=undefined -fsanitize=nullability -c %s -v -g
2
+
3
+ @interface NSString
4
+ @end
5
+
6
+ struct A {
7
+ NSString *a;
8
+ };
9
+
10
+ NSString * _Nonnull foo ()
11
+ {
12
+ struct A a;
13
+ return 0 ;
14
+ }
You can’t perform that action at this time.
0 commit comments