summaryrefslogtreecommitdiffstats
path: root/clang/docs
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2016-12-15 22:55:21 +0000
committerAnna Zaks <ganna@apple.com>2016-12-15 22:55:21 +0000
commit136e9f466ec506c12ded1761a7dd4c785889cae3 (patch)
tree6d55a16444ed9ef5413381594da99b9a3d6aa63a /clang/docs
parent44cdeb1da230ee22e836f040848813d1c499e442 (diff)
downloadbcm5719-llvm-136e9f466ec506c12ded1761a7dd4c785889cae3.tar.gz
bcm5719-llvm-136e9f466ec506c12ded1761a7dd4c785889cae3.zip
[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 llvm-svn: 289887
Diffstat (limited to 'clang/docs')
-rw-r--r--clang/docs/AddressSanitizer.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/docs/AddressSanitizer.rst b/clang/docs/AddressSanitizer.rst
index f64f60d0d48..ed28ad4de6e 100644
--- a/clang/docs/AddressSanitizer.rst
+++ b/clang/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.
OpenPOWER on IntegriCloud