[PATCH] Add -fsanitize=leak to driver options.

Alexey Samsonov samsonov at google.com
Thu May 23 06:20:37 PDT 2013


  Please add a test case to show how different flag sets are handled.


================
Comment at: lib/Driver/Tools.cpp:1605
@@ +1604,3 @@
+    D.Diag(diag::err_drv_argument_not_allowed_with)
+      << lastArgumentForKind(D, Args, Leak)
+      << lastArgumentForKind(D, Args, NeedsTsanRt);
----------------
Why not NeedsLeakDetection here?

================
Comment at: lib/Driver/Tools.cpp:1609
@@ +1608,3 @@
+    D.Diag(diag::err_drv_argument_not_allowed_with)
+      << lastArgumentForKind(D, Args, Leak)
+      << lastArgumentForKind(D, Args, NeedsMsanRt);
----------------
and here

================
Comment at: lib/Driver/Tools.cpp:1718
@@ -1708,4 +1717,3 @@
       addSanitizerRTLinkFlagsLinux(TC, Args, CmdArgs, "asan", true);
-    }
   }
 }
----------------
So, what about flipping the default leak detection on/off in presence of -fsanitize=address,leaks?


http://llvm-reviews.chandlerc.com/D837



More information about the cfe-commits mailing list