From: Chandler Carruth Date: Fri, 29 Apr 2011 20:58:14 +0000 (+0000) Subject: Disable -Wnon-pod-memset for now while I try to reduce the false X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=202e123d0d680af6d1754b22246ea63fb3604931;p=clang 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 --- 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>; + InGroup>, 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);