Skip to content

Commit cc1bb88

Browse files
committed
[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
1 parent 328d2d9 commit cc1bb88

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/AddressSanitizer.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ you may need to disable inlining (just use ``-O1``) and tail call elimination
4949
}
5050
5151
# Compile and link
52-
% clang -O1 -g -fsanitize=address -fno-omit-frame-pointer example_UseAfterFree.cc
52+
% clang++ -O1 -g -fsanitize=address -fno-omit-frame-pointer example_UseAfterFree.cc
5353
5454
or:
5555

5656
.. code-block:: console
5757
5858
# Compile
59-
% clang -O1 -g -fsanitize=address -fno-omit-frame-pointer -c example_UseAfterFree.cc
59+
% clang++ -O1 -g -fsanitize=address -fno-omit-frame-pointer -c example_UseAfterFree.cc
6060
# Link
61-
% clang -g -fsanitize=address example_UseAfterFree.o
61+
% clang++ -g -fsanitize=address example_UseAfterFree.o
6262
6363
If a bug is detected, the program will print an error message to stderr and
6464
exit with a non-zero exit code. AddressSanitizer exits on the first detected error.

0 commit comments

Comments
 (0)