]> granicus.if.org Git - clang/commitdiff
[asan][docs] Fix the documentation to use clang++ for the C++ example
authorAnna Zaks <ganna@apple.com>
Thu, 15 Dec 2016 22:55:21 +0000 (22:55 +0000)
committerAnna Zaks <ganna@apple.com>
Thu, 15 Dec 2016 22:55:21 +0000 (22:55 +0000)
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

index f64f60d0d48fd2cf2d5009bab0a2a11ab6ebf3c0..ed28ad4de6ed76476f7ae72dd28094b02dbd044b 100644 (file)
@@ -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.