Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/lib/AST/ASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3558,7 +3558,7 @@ ASTContext::adjustType(QualType Orig,
llvm::function_ref<QualType(QualType)> Adjust) const {
switch (Orig->getTypeClass()) {
case Type::Attributed: {
const auto *AT = dyn_cast<AttributedType>(Orig);
const auto *AT = cast<AttributedType>(Orig);
return getAttributedType(AT->getAttrKind(),
adjustType(AT->getModifiedType(), Adjust),
adjustType(AT->getEquivalentType(), Adjust),
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaFunctionEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ class Analyzer {
IsNoexcept = isNoexcept(FD);
} else if (auto *BD = dyn_cast<BlockDecl>(D)) {
if (auto *TSI = BD->getSignatureAsWritten()) {
auto *FPT = TSI->getType()->getAs<FunctionProtoType>();
auto *FPT = TSI->getType()->castAs<FunctionProtoType>();
IsNoexcept = FPT->isNothrow() || BD->hasAttr<NoThrowAttr>();
}
}
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Sema/SemaHLSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1908,9 +1908,9 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
return true;
// ensure both args have 3 elements
int NumElementsArg1 =
TheCall->getArg(0)->getType()->getAs<VectorType>()->getNumElements();
TheCall->getArg(0)->getType()->casAs<VectorType>()->getNumElements();
int NumElementsArg2 =
TheCall->getArg(1)->getType()->getAs<VectorType>()->getNumElements();
TheCall->getArg(1)->getType()->castAs<VectorType>()->getNumElements();

if (NumElementsArg1 != 3) {
int LessOrMore = NumElementsArg1 > 3 ? 1 : 0;
Expand Down
Loading