summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/use-after-scope-loop-removed.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/asan/TestCases/use-after-scope-loop-removed.cc')
-rw-r--r--test/asan/TestCases/use-after-scope-loop-removed.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/asan/TestCases/use-after-scope-loop-removed.cc b/test/asan/TestCases/use-after-scope-loop-removed.cc
index cd71a5046cd48..730bf3a3ebe33 100644
--- a/test/asan/TestCases/use-after-scope-loop-removed.cc
+++ b/test/asan/TestCases/use-after-scope-loop-removed.cc
@@ -1,9 +1,5 @@
// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \
// RUN: not %run %t 2>&1 | FileCheck %s
-//
-// FIXME: Compiler removes for-loop but keeps x variable. For unknown reason
-// @llvm.lifetime.* are not emitted for x.
-// XFAIL: *
#include <stdlib.h>
@@ -14,6 +10,9 @@ int main() {
int x;
p = &x;
}
- return **p; // BOOM
+ return *p; // BOOM
// CHECK: ERROR: AddressSanitizer: stack-use-after-scope
+ // CHECK: #0 0x{{.*}} in main {{.*}}use-after-scope-loop-removed.cc:[[@LINE-2]]
+ // CHECK: Address 0x{{.*}} is located in stack of thread T{{.*}} at offset [[OFFSET:[^ ]+]] in frame
+ // {{\[}}[[OFFSET]], {{[0-9]+}}) 'x'
}