Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Sema/SemaChecking.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 14,047 Lines • ▼ Show 20 Lines | static void CheckImplicitConversion(Sema &S, Expr *E, QualType T, | ||||
if (isa<VectorType>(Source)) { | if (isa<VectorType>(Source)) { | ||||
if (Target->isVLSTBuiltinType() && | if (Target->isVLSTBuiltinType() && | ||||
(S.Context.areCompatibleSveTypes(QualType(Target, 0), | (S.Context.areCompatibleSveTypes(QualType(Target, 0), | ||||
QualType(Source, 0)) || | QualType(Source, 0)) || | ||||
S.Context.areLaxCompatibleSveTypes(QualType(Target, 0), | S.Context.areLaxCompatibleSveTypes(QualType(Target, 0), | ||||
QualType(Source, 0)))) | QualType(Source, 0)))) | ||||
return; | return; | ||||
if (Target->isRVVVLSBuiltinType() && | |||||
(S.Context.areCompatibleRVVTypes(QualType(Target, 0), | |||||
QualType(Source, 0)) || | |||||
S.Context.areLaxCompatibleRVVTypes(QualType(Target, 0), | |||||
QualType(Source, 0)))) | |||||
return; | |||||
if (!isa<VectorType>(Target)) { | if (!isa<VectorType>(Target)) { | ||||
if (S.SourceMgr.isInSystemMacro(CC)) | if (S.SourceMgr.isInSystemMacro(CC)) | ||||
return; | return; | ||||
return DiagnoseImpCast(S, E, T, CC, diag::warn_impcast_vector_scalar); | return DiagnoseImpCast(S, E, T, CC, diag::warn_impcast_vector_scalar); | ||||
} | } | ||||
// If the vector cast is cast between two vectors of the same size, it is | // If the vector cast is cast between two vectors of the same size, it is | ||||
// a bitcast, not a conversion. | // a bitcast, not a conversion. | ||||
▲ Show 20 Lines • Show All 4,261 Lines • Show Last 20 Lines |