diff options
author | Richard Trieu <rtrieu@google.com> | 2018-12-14 03:35:10 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2018-12-14 03:35:10 +0000 |
commit | c18971ee2305995d7b953dac2e6a65304ba95408 (patch) | |
tree | 27aecece32f006a9aa4ffc91590975dfc53aafcf /include/clang/Basic/DiagnosticASTKinds.td | |
parent | db2a2bc824742204d0b901604afd8a87f31a377b (diff) |
Fix up diagnostics.
Move some diagnostics around between Diagnostic*Kinds.td files. Diagnostics
used in multiple places were moved to DiagnosticCommonKinds.td. Diagnostics
listed in the wrong place (ie, Sema diagnostics listed in
DiagnosticsParseKinds.td) were moved to the correct places. One diagnostic
split into two so that the diagnostic string is in the .td file instead of in
code. Cleaned up the diagnostic includes after all the changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349125 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticASTKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticASTKinds.td | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticASTKinds.td b/include/clang/Basic/DiagnosticASTKinds.td index e98e48931f..c39673a44a 100644 --- a/include/clang/Basic/DiagnosticASTKinds.td +++ b/include/clang/Basic/DiagnosticASTKinds.td @@ -314,4 +314,34 @@ def err_odr_non_type_parameter_type_inconsistent : Error< "non-type template parameter declared with incompatible types in different " "translation units (%0 vs. %1)">; def err_unsupported_ast_node: Error<"cannot import unsupported AST node %0">; + +def remark_sanitize_address_insert_extra_padding_accepted : Remark< + "-fsanitize-address-field-padding applied to %0">, ShowInSystemHeader, + InGroup<SanitizeAddressRemarks>; +def remark_sanitize_address_insert_extra_padding_rejected : Remark< + "-fsanitize-address-field-padding ignored for %0 because it " + "%select{is not C++|is packed|is a union|is trivially copyable|" + "has trivial destructor|is standard layout|is in a blacklisted file|" + "is blacklisted}1">, ShowInSystemHeader, + InGroup<SanitizeAddressRemarks>; + +def warn_npot_ms_struct : Warning< + "ms_struct may not produce Microsoft-compatible layouts with fundamental " + "data types with sizes that aren't a power of two">, + DefaultError, InGroup<IncompatibleMSStruct>; + +// -Wpadded, -Wpacked +def warn_padded_struct_field : Warning< + "padding %select{struct|interface|class}0 %1 with %2 " + "%select{byte|bit}3%s2 to align %4">, + InGroup<Padded>, DefaultIgnore; +def warn_padded_struct_anon_field : Warning< + "padding %select{struct|interface|class}0 %1 with %2 " + "%select{byte|bit}3%s2 to align anonymous bit-field">, + InGroup<Padded>, DefaultIgnore; +def warn_padded_struct_size : Warning< + "padding size of %0 with %1 %select{byte|bit}2%s1 to alignment boundary">, + InGroup<Padded>, DefaultIgnore; +def warn_unnecessary_packed : Warning< + "packed attribute is unnecessary for %0">, InGroup<Packed>, DefaultIgnore; } |