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 @@ -357,17 +357,18 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) {
357
357
bool HasOnlyLifetimeMarkers =
358
358
HasCleanups && EHStack.containsOnlyLifetimeMarkers (PrologueCleanupDepth);
359
359
bool EmitRetDbgLoc = !HasCleanups || HasOnlyLifetimeMarkers;
360
+
361
+ Optional<ApplyDebugLocation> OAL;
360
362
if (HasCleanups) {
361
363
// Make sure the line table doesn't jump back into the body for
362
364
// the ret after it's been at EndLoc.
363
- Optional<ApplyDebugLocation> AL;
364
365
if (CGDebugInfo *DI = getDebugInfo ()) {
365
366
if (OnlySimpleReturnStmts)
366
367
DI->EmitLocation (Builder, EndLoc);
367
368
else
368
369
// We may not have a valid end location. Try to apply it anyway, and
369
370
// fall back to an artificial location if needed.
370
- AL = ApplyDebugLocation::CreateDefaultArtificial (*this , EndLoc);
371
+ OAL = ApplyDebugLocation::CreateDefaultArtificial (*this , EndLoc);
371
372
}
372
373
373
374
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