[llvm-branch-commits] [cfe-branch] r293783 - Merging r291963:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Feb 1 09:10:27 PST 2017
Author: hans
Date: Wed Feb 1 11:10:26 2017
New Revision: 293783
URL: http://llvm.org/viewvc/llvm-project?rev=293783&view=rev
Log:
Merging r291963:
------------------------------------------------------------------------
r291963 | ericwf | 2017-01-13 14:11:40 -0800 (Fri, 13 Jan 2017) | 9 lines
[clang] Emit `diagnose_if` warnings from system headers
Summary: In order for libc++ to meaningfully use `diagnose_if` warnings they need to be emitted from system headers by default. This patch changes the `diagnose_if` warning diagnostic to be shown in system headers.
Reviewers: george.burgess.iv, rsmith, aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D28703
------------------------------------------------------------------------
Added:
cfe/branches/release_40/test/Sema/Inputs/diagnose-if-warn-system-header.h
- copied unchanged from r291963, cfe/trunk/test/Sema/Inputs/diagnose-if-warn-system-header.h
Modified:
cfe/branches/release_40/ (props changed)
cfe/branches/release_40/include/clang/Basic/DiagnosticSemaKinds.td
cfe/branches/release_40/test/Sema/diagnose_if.c
Propchange: cfe/branches/release_40/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 1 11:10:26 2017
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:291850,291853,291865,291871,291877,291879,291881,291907,291955,291964,292032,292052,292183,292194,292247,292265,292497,292555,292558-292559,292561,292590,292800,292847,292874,292991,293134,293596,293678
+/cfe/trunk:291850,291853,291865,291871,291877,291879,291881,291907,291955,291963-291964,292032,292052,292183,292194,292247,292265,292497,292555,292558-292559,292561,292590,292800,292847,292874,292991,293134,293596,293678
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_40/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/include/clang/Basic/DiagnosticSemaKinds.td?rev=293783&r1=293782&r2=293783&view=diff
==============================================================================
--- cfe/branches/release_40/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/branches/release_40/include/clang/Basic/DiagnosticSemaKinds.td Wed Feb 1 11:10:26 2017
@@ -3373,7 +3373,8 @@ def note_ovl_candidate_has_pass_object_s
"candidate address cannot be taken because parameter %0 has "
"pass_object_size attribute">;
def err_diagnose_if_succeeded : Error<"%0">;
-def warn_diagnose_if_succeeded : Warning<"%0">, InGroup<UserDefinedWarnings>;
+def warn_diagnose_if_succeeded : Warning<"%0">, InGroup<UserDefinedWarnings>,
+ ShowInSystemHeader;
def note_ovl_candidate_disabled_by_function_cond_attr : Note<
"candidate disabled: %0">;
def note_ovl_candidate_disabled_by_extension : Note<
Modified: cfe/branches/release_40/test/Sema/diagnose_if.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/test/Sema/diagnose_if.c?rev=293783&r1=293782&r2=293783&view=diff
==============================================================================
--- cfe/branches/release_40/test/Sema/diagnose_if.c (original)
+++ cfe/branches/release_40/test/Sema/diagnose_if.c Wed Feb 1 11:10:26 2017
@@ -150,3 +150,6 @@ void alwaysWarnWithArg(int a) _diagnose_
void runAlwaysWarnWithArg(int a) {
alwaysWarnWithArg(a); // expected-warning{{alwaysWarn}}
}
+
+// Test that diagnose_if warnings generated in system headers are not ignored.
+#include "Inputs/diagnose-if-warn-system-header.h"
More information about the llvm-branch-commits
mailing list