]> granicus.if.org Git - clang/commitdiff
Disable -Wnon-pod-memset for now while I try to reduce the false
authorChandler Carruth <chandlerc@gmail.com>
Fri, 29 Apr 2011 20:58:14 +0000 (20:58 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 29 Apr 2011 20:58:14 +0000 (20:58 +0000)
positives still further.

The plan is to:

1) Create a more targeted warning for memset of memory pointing at
   a type with virtual methods or bases where a vptr would be
   overwritten.
2) Consider turning the above warning back on by default.
3) Evaluate whether any false positives in the existing warning can be
   detected and white listed in the warning implementation.
4) If #3 lowers the noise floor enough, enable the full warning in -Wall
   or -Wextra.

Comments or suggestions welcome. Even more welcome are specific test
cases which trigger the warning and shouldn't.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130538 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
test/SemaCXX/warn-non-pod-memset.cpp

index e62a59831b9d12802507c0c3ad58af0f1f0104ff..04ff97c1550975b64c018ee88810bca57eaad215 100644 (file)
@@ -263,7 +263,7 @@ def err_types_compatible_p_in_cplusplus : Error<
 def warn_builtin_unknown : Warning<"use of unknown builtin %0">, DefaultError;
 def warn_non_pod_memset : Warning<
   "destination for this memset call is a pointer to a non-POD type %0">,
-  InGroup<DiagGroup<"non-pod-memset">>;
+  InGroup<DiagGroup<"non-pod-memset">>, DefaultIgnore;
 def note_non_pod_memset_silence : Note<
   "explicitly cast the pointer to silence this warning">;
 
index 1ca71497112eff8af15dc8d02088a52acf8f6472..fbdceadae29bf919c2fd0d03b0342a98b8817de5 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wnon-pod-memset -verify %s
 
 extern void *memset(void *, int, unsigned);