usama54321 updated this revision to Diff 490923.
usama54321 added a comment.
Renaming identifiers in test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142242/new/
https://reviews.llvm.org/D142242
Files:
clang/lib/CodeGen/CodeGenFunction.cpp
clang/test/CodeGenObjC/objc-arc-ubsan-debugging.m
Index: clang/test/CodeGenObjC/objc-arc-ubsan-debugging.m
===================================================================
--- /dev/null
+++ clang/test/CodeGenObjC/objc-arc-ubsan-debugging.m
@@ -0,0 +1,17 @@
+// RUN: %clang -x objective-c -target arm64-apple-macos12.0 -fobjc-arc
-std=gnu99 -O0 -fsanitize=undefined -fsanitize=nullability -c %s -v -g
+#include <Foundation/Foundation.h>
+
+struct A {
+ NSString *a;
+};
+
+@class B;
+
+@interface C: NSObject
+@end
+
+NSArray<C*> * _Nonnull foo(B* bar)
+{
+ struct A a;
+ return nil;
+}
Index: clang/lib/CodeGen/CodeGenFunction.cpp
===================================================================
--- clang/lib/CodeGen/CodeGenFunction.cpp
+++ clang/lib/CodeGen/CodeGenFunction.cpp
@@ -361,17 +361,18 @@
bool HasOnlyLifetimeMarkers =
HasCleanups && EHStack.containsOnlyLifetimeMarkers(PrologueCleanupDepth);
bool EmitRetDbgLoc = !HasCleanups || HasOnlyLifetimeMarkers;
+
+ std::optional<ApplyDebugLocation> OAL;
if (HasCleanups) {
// Make sure the line table doesn't jump back into the body for
// the ret after it's been at EndLoc.
- std::optional<ApplyDebugLocation> AL;
if (CGDebugInfo *DI = getDebugInfo()) {
if (OnlySimpleReturnStmts)
DI->EmitLocation(Builder, EndLoc);
else
// We may not have a valid end location. Try to apply it anyway, and
// fall back to an artificial location if needed.
- AL = ApplyDebugLocation::CreateDefaultArtificial(*this, EndLoc);
+ OAL = ApplyDebugLocation::CreateDefaultArtificial(*this, EndLoc);
}
PopCleanupBlocks(PrologueCleanupDepth);
Index: clang/test/CodeGenObjC/objc-arc-ubsan-debugging.m
===================================================================
--- /dev/null
+++ clang/test/CodeGenObjC/objc-arc-ubsan-debugging.m
@@ -0,0 +1,17 @@
+// RUN: %clang -x objective-c -target arm64-apple-macos12.0 -fobjc-arc -std=gnu99 -O0 -fsanitize=undefined -fsanitize=nullability -c %s -v -g
+#include <Foundation/Foundation.h>
+
+struct A {
+ NSString *a;
+};
+
+@class B;
+
+@interface C: NSObject
+@end
+
+NSArray<C*> * _Nonnull foo(B* bar)
+{
+ struct A a;
+ return nil;
+}
Index: clang/lib/CodeGen/CodeGenFunction.cpp
===================================================================
--- clang/lib/CodeGen/CodeGenFunction.cpp
+++ clang/lib/CodeGen/CodeGenFunction.cpp
@@ -361,17 +361,18 @@
bool HasOnlyLifetimeMarkers =
HasCleanups && EHStack.containsOnlyLifetimeMarkers(PrologueCleanupDepth);
bool EmitRetDbgLoc = !HasCleanups || HasOnlyLifetimeMarkers;
+
+ std::optional<ApplyDebugLocation> OAL;
if (HasCleanups) {
// Make sure the line table doesn't jump back into the body for
// the ret after it's been at EndLoc.
- std::optional<ApplyDebugLocation> AL;
if (CGDebugInfo *DI = getDebugInfo()) {
if (OnlySimpleReturnStmts)
DI->EmitLocation(Builder, EndLoc);
else
// We may not have a valid end location. Try to apply it anyway, and
// fall back to an artificial location if needed.
- AL = ApplyDebugLocation::CreateDefaultArtificial(*this, EndLoc);
+ OAL = ApplyDebugLocation::CreateDefaultArtificial(*this, EndLoc);
}
PopCleanupBlocks(PrologueCleanupDepth);
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits