From cc1bb88a8399d6e9ff5d65dbc1b5d0b70ae723f2 Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Thu, 15 Dec 2016 22:55:21 +0000 Subject: [PATCH] [asan][docs] Fix the documentation to use clang++ for the C++ example After Darwin has been updated not to link in stdc++ on Darwin this actually started to break. Differential Revision: https://reviews.llvm.org/D27598 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289887 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/AddressSanitizer.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/AddressSanitizer.rst b/docs/AddressSanitizer.rst index f64f60d0d4..ed28ad4de6 100644 --- a/docs/AddressSanitizer.rst +++ b/docs/AddressSanitizer.rst @@ -49,16 +49,16 @@ you may need to disable inlining (just use ``-O1``) and tail call elimination } # Compile and link - % clang -O1 -g -fsanitize=address -fno-omit-frame-pointer example_UseAfterFree.cc + % clang++ -O1 -g -fsanitize=address -fno-omit-frame-pointer example_UseAfterFree.cc or: .. code-block:: console # Compile - % clang -O1 -g -fsanitize=address -fno-omit-frame-pointer -c example_UseAfterFree.cc + % clang++ -O1 -g -fsanitize=address -fno-omit-frame-pointer -c example_UseAfterFree.cc # Link - % clang -g -fsanitize=address example_UseAfterFree.o + % clang++ -g -fsanitize=address example_UseAfterFree.o If a bug is detected, the program will print an error message to stderr and exit with a non-zero exit code. AddressSanitizer exits on the first detected error. -- 2.50.1