forked from OSchip/llvm-project
[Sema][NFC] Remove Redundant Condition
Condition `TypeQuals` is checked both in an outer and in an inner `if` statement in static function `ConvertDeclSpecToType()` in file `SemaType.cpp`. This patch removes the redundant inner check. The issue was found using `clang-tidy` check under review `misc-redundant-condition`. See https://reviews.llvm.org/D81272. Differential Revision: https://reviews.llvm.org/D82563
This commit is contained in:
parent
ff2d09148c
commit
40c50bdee4
|
@ -1759,7 +1759,7 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) {
|
|||
// The effect of a cv-qualifier-seq in a function declarator is not the
|
||||
// same as adding cv-qualification on top of the function type. In the
|
||||
// latter case, the cv-qualifiers are ignored.
|
||||
if (TypeQuals && Result->isFunctionType()) {
|
||||
if (Result->isFunctionType()) {
|
||||
diagnoseAndRemoveTypeQualifiers(
|
||||
S, DS, TypeQuals, Result, DeclSpec::TQ_const | DeclSpec::TQ_volatile,
|
||||
S.getLangOpts().CPlusPlus
|
||||
|
|
Loading…
Reference in New Issue