aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-04-29 20:58:14 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-04-29 20:58:14 +0000
commit202e123d0d680af6d1754b22246ea63fb3604931 (patch)
tree9bf96d8998ecb4da7e6cd7f802db2df5ada9821f
parent0a241a1755b5e4d3adb0d828dff42f96a5a8bd95 (diff)
Disable -Wnon-pod-memset for now while I try to reduce the false
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
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td2
-rw-r--r--test/SemaCXX/warn-non-pod-memset.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index e62a59831b..04ff97c155 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -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">;
diff --git a/test/SemaCXX/warn-non-pod-memset.cpp b/test/SemaCXX/warn-non-pod-memset.cpp
index 1ca7149711..fbdceadae2 100644
--- a/test/SemaCXX/warn-non-pod-memset.cpp
+++ b/test/SemaCXX/warn-non-pod-memset.cpp
@@ -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);