Index: projects/compiler-rt/test/asan/TestCases/use-after-scope.cc =================================================================== --- projects/compiler-rt/test/asan/TestCases/use-after-scope.cc +++ projects/compiler-rt/test/asan/TestCases/use-after-scope.cc @@ -1,6 +1,10 @@ // RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \ // RUN: not %run %t 2>&1 | FileCheck %s +// -fsanitize-address-use-after-scope is now on by default: +// RUN: %clangxx_asan -O1 %s -o %t && \ +// RUN: not %run %t 2>&1 | FileCheck %s + volatile int *p = 0; int main() { Index: tools/clang/include/clang/Driver/SanitizerArgs.h =================================================================== --- tools/clang/include/clang/Driver/SanitizerArgs.h +++ tools/clang/include/clang/Driver/SanitizerArgs.h @@ -34,7 +34,7 @@ bool CfiCrossDso = false; int AsanFieldPadding = 0; bool AsanSharedRuntime = false; - bool AsanUseAfterScope = false; + bool AsanUseAfterScope = true; bool LinkCXXRuntimes = false; bool NeedPIE = false; bool Stats = false; Index: tools/clang/test/Driver/fsanitize.c =================================================================== --- tools/clang/test/Driver/fsanitize.c +++ tools/clang/test/Driver/fsanitize.c @@ -121,7 +121,7 @@ // CHECK-USE-AFTER-SCOPE-BOTH-OFF-NOT: -cc1{{.*}}address-use-after-scope // RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-WITHOUT-USE-AFTER-SCOPE -// CHECK-ASAN-WITHOUT-USE-AFTER-SCOPE-NOT: -cc1{{.*}}address-use-after-scope +// CHECK-ASAN-WITHOUT-USE-AFTER-SCOPE: -cc1{{.*}}address-use-after-scope // RUN: %clang -target x86_64-linux-gnu -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ONLY-TRACK-ORIGINS // CHECK-ONLY-TRACK-ORIGINS: warning: argument unused during compilation: '-fsanitize-memory-track-origins'