[PATCH] D27598: [asan][docs] Fix the documentation to use clang++ for the C++ example

Anna Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 04:00:00 PST 2016


zaks.anna created this revision.
zaks.anna added reviewers: kcc, kubabrecka.
zaks.anna added a subscriber: llvm-commits.

After Darwin has been updated not to link in stdc++ on Darwin this actually started to break.


https://reviews.llvm.org/D27598

Files:
  docs/AddressSanitizer.rst


Index: docs/AddressSanitizer.rst
===================================================================
--- docs/AddressSanitizer.rst
+++ docs/AddressSanitizer.rst
@@ -49,16 +49,16 @@
     }
 
     # 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27598.80841.patch
Type: text/x-patch
Size: 917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161209/19df019b/attachment-0001.bin>


More information about the llvm-commits mailing list