diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2020-01-13 14:41:16 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2020-01-13 15:07:56 +0000 |
commit | 025941785faf25a3d9ba2c1e7682ca6c2ad063af (patch) | |
tree | 951aaa3306787b74fd2c0c24f0e5aee8c65a0b00 /clang/lib/AST/ASTContext.cpp | |
parent | 40311f9724953541ab7b755fb6a96b31c1e63f00 (diff) | |
download | bcm5719-llvm-025941785faf25a3d9ba2c1e7682ca6c2ad063af.tar.gz bcm5719-llvm-025941785faf25a3d9ba2c1e7682ca6c2ad063af.zip |
Fix some cppcheck shadow variable warnings. NFCI.
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 0b2d8b4d1e2..481affafc87 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -3608,10 +3608,10 @@ ASTContext::getDependentVectorType(QualType VecType, Expr *SizeExpr, (void)CanonCheck; DependentVectorTypes.InsertNode(New, InsertPos); } else { - QualType Canon = getDependentSizedExtVectorType(CanonVecTy, SizeExpr, - SourceLocation()); + QualType CanonExtTy = getDependentSizedExtVectorType(CanonVecTy, SizeExpr, + SourceLocation()); New = new (*this, TypeAlignment) DependentVectorType( - *this, VecType, Canon, SizeExpr, AttrLoc, VecKind); + *this, VecType, CanonExtTy, SizeExpr, AttrLoc, VecKind); } } @@ -3681,10 +3681,10 @@ ASTContext::getDependentSizedExtVectorType(QualType vecType, (void)CanonCheck; DependentSizedExtVectorTypes.InsertNode(New, InsertPos); } else { - QualType Canon = getDependentSizedExtVectorType(CanonVecTy, SizeExpr, - SourceLocation()); - New = new (*this, TypeAlignment) - DependentSizedExtVectorType(*this, vecType, Canon, SizeExpr, AttrLoc); + QualType CanonExtTy = getDependentSizedExtVectorType(CanonVecTy, SizeExpr, + SourceLocation()); + New = new (*this, TypeAlignment) DependentSizedExtVectorType( + *this, vecType, CanonExtTy, SizeExpr, AttrLoc); } } @@ -6875,21 +6875,19 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string &S, S += ObjCEncodingForEnumType(this, cast<EnumType>(CT)); return; - case Type::Complex: { - const auto *CT = T->castAs<ComplexType>(); + case Type::Complex: S += 'j'; - getObjCEncodingForTypeImpl(CT->getElementType(), S, ObjCEncOptions(), + getObjCEncodingForTypeImpl(T->castAs<ComplexType>()->getElementType(), S, + ObjCEncOptions(), /*Field=*/nullptr); return; - } - case Type::Atomic: { - const auto *AT = T->castAs<AtomicType>(); + case Type::Atomic: S += 'A'; - getObjCEncodingForTypeImpl(AT->getValueType(), S, ObjCEncOptions(), + getObjCEncodingForTypeImpl(T->castAs<AtomicType>()->getValueType(), S, + ObjCEncOptions(), /*Field=*/nullptr); return; - } // encoding for pointer or reference types. case Type::Pointer: |