18 lines · cpp
1// This test checks that we are no instrumenting a memory access twice2// (before and after inlining)3// RUN: %clangxx_asan -O1 %if MSVC %{ /Ob1 %} %s -o %t && %run %t4// RUN: %clangxx_asan -O0 %if MSVC %{ /Ob1 %} %s -o %t && %run %t5 6#include "defines.h"7 8ATTRIBUTE_ALWAYS_INLINE9void foo(int *x) {10 *x = 0;11}12 13int main() {14 int x;15 foo(&x);16 return x;17}18