Skip to content

Commit 3a6e09b

Browse files
committed
[Clang] Fix error caused by upstream changes in 91cdd35
1 parent fbcee77 commit 3a6e09b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

clang/lib/Sema/SemaExpr.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10771,7 +10771,10 @@ static void diagnoseScopedEnums(Sema &S, const SourceLocation Loc,
1077110771
return;
1077210772
auto DiagnosticHelper = [&S](const Expr *expr, const QualType type) {
1077310773
SourceLocation BeginLoc = expr->getBeginLoc();
10774-
QualType IntType = type->castAs<EnumType>()->getDecl()->getIntegerType();
10774+
QualType IntType = type->castAs<EnumType>()
10775+
->getOriginalDecl()
10776+
->getDefinitionOrSelf()
10777+
->getIntegerType();
1077510778
std::string InsertionString = "static_cast<" + IntType.getAsString() + ">(";
1077610779
S.Diag(BeginLoc, diag::note_no_implicit_conversion_for_scoped_enum)
1077710780
<< FixItHint::CreateInsertion(BeginLoc, InsertionString)

0 commit comments

Comments
 (0)