Author: Volodymyr Sapsai Date: 2022-05-30T10:07:03-07:00 New Revision: f3defc23488eb29c69d2a33c0c5b652c874fb0f3
URL: https://github.com/llvm/llvm-project/commit/f3defc23488eb29c69d2a33c0c5b652c874fb0f3 DIFF: https://github.com/llvm/llvm-project/commit/f3defc23488eb29c69d2a33c0c5b652c874fb0f3.diff LOG: [ODRHash][NFC] Add missing 'select' case for `ODRMismatchDecl`. No test changes because `err_module_odr_violation_mismatch_decl_unknown` is a catch-all when custom diagnostic is missing. And missing custom diagnostic we should fix by implementing it, not by improving the general case. But if we pass enum value not covered by 'select', clang can crash, so protect against that. Differential Revision: https://reviews.llvm.org/D126566 Added: Modified: clang/include/clang/Basic/DiagnosticSerializationKinds.td Removed: ################################################################################ diff --git a/clang/include/clang/Basic/DiagnosticSerializationKinds.td b/clang/include/clang/Basic/DiagnosticSerializationKinds.td index 3fcdb616bd21a..33eba6cf0c3f2 100644 --- a/clang/include/clang/Basic/DiagnosticSerializationKinds.td +++ b/clang/include/clang/Basic/DiagnosticSerializationKinds.td @@ -375,12 +375,14 @@ def err_module_odr_violation_mismatch_decl_unknown : Error< "%q0 %select{with definition in module '%2'|defined here}1 has diff erent " "definitions in diff erent modules; first diff erence is this " "%select{||||static assert|field|method|type alias|typedef|data member|" - "friend declaration|unexpected decl}3">; + "friend declaration|function template|" + "unexpected decl}3">; def note_module_odr_violation_mismatch_decl_unknown : Note< "but in '%0' found " "%select{|||| diff erent static assert| diff erent field| diff erent method|" " diff erent type alias| diff erent typedef| diff erent data member|" - " diff erent friend declaration|another unexpected decl}1">; + " diff erent friend declaration| diff erent function template|" + "another unexpected decl}1">; def warn_duplicate_module_file_extension : Warning< "duplicate module file extension block name '%0'">, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits