Lines 9150-9158
static void DiagnoseNarrowingInInitList(Sema &S,
Link Here
|
9150 |
return; |
9150 |
return; |
9151 |
|
9151 |
|
9152 |
case NK_Type_Narrowing: |
9152 |
case NK_Type_Narrowing: |
9153 |
// This was a floating-to-integer conversion, which is always considered a |
9153 |
// This was a floating-to-integer conversion or a boolean conversion from a |
9154 |
// narrowing conversion even if the value is a constant and can be |
9154 |
// pointer, which is always considered a narrowing conversion even if the |
9155 |
// represented exactly as an integer. |
9155 |
// value is a constant and can be represented exactly as an integer. |
9156 |
S.Diag(PostInit->getBeginLoc(), NarrowingErrs(S.getLangOpts()) |
9156 |
S.Diag(PostInit->getBeginLoc(), NarrowingErrs(S.getLangOpts()) |
9157 |
? diag::ext_init_list_type_narrowing |
9157 |
? diag::ext_init_list_type_narrowing |
9158 |
: diag::warn_init_list_type_narrowing) |
9158 |
: diag::warn_init_list_type_narrowing) |