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
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">;
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wnon-pod-memset -verify %s
extern void *memset(void *, int, unsigned);