[PATCH] D11106: use-after-dtor cmd option

Eric Christopher echristo at gmail.com
Fri Jul 10 13:30:10 PDT 2015


echristo added a subscriber: echristo.
echristo added a comment.

Couple of nits I noticed when looking.

-eric


================
Comment at: .arclint:1-8
@@ +1,8 @@
+{
+  "linters": {
+    "cppcheck": {
+      "type": "cppcheck",
+      "include": "(\\.cpp$)"
+    }
+  }
+}
----------------
Probably don't want this.

================
Comment at: include/clang/Driver/Options.td:561-563
@@ -560,2 +560,5 @@
                                         HelpText<"Disable origins tracking in MemorySanitizer">;
+def fsanitize_memory_use_after_dtor : Flag<["-"], "fsanitize-memory-use-after-dtor">,
+                                     Group<f_clang_Group>, Flags<[CC1Option]>,
+                                     HelpText<"Enable use-after-destroy detection in MemorySanitizer">;
 def fsanitize_address_field_padding : Joined<["-"], "fsanitize-address-field-padding=">,
----------------
clang-format? also inverse option?

================
Comment at: lib/CodeGen/CGClass.cpp:1459
@@ +1458,3 @@
+
+ // insert memory-posioning instrumentation
+  if (CGM.getCodeGenOpts().SanitizeMemoryUseAfterDtor) {
----------------
Comments are complete sentences.


http://reviews.llvm.org/D11106







More information about the llvm-commits mailing list