forked from OSchip/llvm-project
Changed error for nested type qualifier mismatch to
warning, to match gcc. It used to be warning, so better keep it a warning (it broke a certain project). llvm-svn: 86597
This commit is contained in:
parent
4ef1d400d9
commit
b98dade25b
|
@ -1836,7 +1836,7 @@ def ext_typecheck_convert_incompatible_pointer : ExtWarn<
|
|||
"incompatible pointer types %2 %1, expected %0">;
|
||||
def ext_typecheck_convert_discards_qualifiers : ExtWarn<
|
||||
"%2 %1 discards qualifiers, expected %0">;
|
||||
def err_nested_pointer_qualifier_mismatch : Error<
|
||||
def ext_nested_pointer_qualifier_mismatch : ExtWarn<
|
||||
"%2, %0 and %1 have different qualifiers in nested pointer types">;
|
||||
def warn_incompatible_vectors : Warning<
|
||||
"incompatible vector types %2 %1, expected %0">,
|
||||
|
|
|
@ -6242,7 +6242,7 @@ bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy,
|
|||
DiagKind = diag::ext_typecheck_convert_discards_qualifiers;
|
||||
break;
|
||||
case IncompatibleNestedPointerQualifiers:
|
||||
DiagKind = diag::err_nested_pointer_qualifier_mismatch;
|
||||
DiagKind = diag::ext_nested_pointer_qualifier_mismatch;
|
||||
break;
|
||||
case IntToBlockPointer:
|
||||
DiagKind = diag::err_int_to_block_pointer;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
//RUN: clang-cc -fsyntax-only -verify %s
|
||||
|
||||
char * c;
|
||||
char const ** c2 = &c; // expected-error {{initializing, 'char const **' and 'char **' have different qualifiers in nested pointer types}}
|
||||
char const ** c2 = &c; // expected-warning {{initializing, 'char const **' and 'char **' have different qualifiers in nested pointer types}}
|
||||
|
||||
typedef char dchar;
|
||||
dchar *** c3 = &c2; // expected-error {{initializing, 'dchar ***' and 'char const ***' have different qualifiers in nested pointer types}}
|
||||
dchar *** c3 = &c2; // expected-warning {{initializing, 'dchar ***' and 'char const ***' have different qualifiers in nested pointer types}}
|
||||
|
||||
volatile char * c4;
|
||||
char ** c5 = &c4; // expected-error {{initializing, 'char **' and 'char volatile **' have different qualifiers in nested pointer types}}
|
||||
char ** c5 = &c4; // expected-warning {{initializing, 'char **' and 'char volatile **' have different qualifiers in nested pointer types}}
|
||||
|
|
Loading…
Reference in New Issue