forked from OSchip/llvm-project
Consolidating some mode attribute diagnostics. No functional changes intended.
llvm-svn: 197911
This commit is contained in:
parent
4d31d5499f
commit
0390908588
|
@ -2354,8 +2354,7 @@ def warn_attribute_protected_visibility :
|
|||
InGroup<DiagGroup<"unsupported-visibility">>;
|
||||
def err_mismatched_visibility: Error<"visibility does not match previous declaration">;
|
||||
def note_previous_attribute : Note<"previous attribute is here">;
|
||||
def err_unknown_machine_mode : Error<"unknown machine mode %0">;
|
||||
def err_unsupported_machine_mode : Error<"unsupported machine mode %0">;
|
||||
def err_machine_mode : Error<"%select{unknown|unsupported}0 machine mode %1">;
|
||||
def err_mode_not_primitive : Error<
|
||||
"mode attribute only supported for integer and floating-point types">;
|
||||
def err_mode_wrong_type : Error<
|
||||
|
|
|
@ -2989,7 +2989,7 @@ static void handleModeAttr(Sema &S, Decl *D, const AttributeList &Attr) {
|
|||
// FIXME: Make sure floating-point mappings are accurate
|
||||
// FIXME: Support XF and TF types
|
||||
if (!DestWidth) {
|
||||
S.Diag(Attr.getLoc(), diag::err_unknown_machine_mode) << Name;
|
||||
S.Diag(Attr.getLoc(), diag::err_machine_mode) << 0 /*Unknown*/ << Name;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3002,7 +3002,7 @@ static void handleModeAttr(Sema &S, Decl *D, const AttributeList &Attr) {
|
|||
NewTy = S.Context.getRealTypeForBitwidth(DestWidth);
|
||||
|
||||
if (NewTy.isNull()) {
|
||||
S.Diag(Attr.getLoc(), diag::err_unsupported_machine_mode) << Name;
|
||||
S.Diag(Attr.getLoc(), diag::err_machine_mode) << 1 /*Unsupported*/ << Name;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue