bool IgnoreAccess = false);
bool CheckDerivedToBaseConversion(QualType Derived, QualType Base,
unsigned InaccessibleBaseID,
- unsigned AmbigiousBaseConvID,
+ unsigned AmbiguousBaseConvID,
SourceLocation Loc, SourceRange Range,
DeclarationName Name,
CXXCastPath *BasePath,
/// if there is an error, and Range is the source range to highlight
/// if there is an error.
///
-/// If either InaccessibleBaseID or AmbigiousBaseConvID are 0, then the
+/// If either InaccessibleBaseID or AmbiguousBaseConvID are 0, then the
/// diagnostic for the respective type of error will be suppressed, but the
/// check for ill-formed code will still be performed.
bool
Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base,
unsigned InaccessibleBaseID,
- unsigned AmbigiousBaseConvID,
+ unsigned AmbiguousBaseConvID,
SourceLocation Loc, SourceRange Range,
DeclarationName Name,
CXXCastPath *BasePath,
for (const CXXBasePath &PossiblePath : Paths) {
if (PossiblePath.size() == 1) {
Path = &PossiblePath;
- if (AmbigiousBaseConvID)
+ if (AmbiguousBaseConvID)
Diag(Loc, diag::ext_ms_ambiguous_direct_base)
<< Base << Derived << Range;
break;
return false;
}
- if (AmbigiousBaseConvID) {
+ if (AmbiguousBaseConvID) {
// We know that the derived-to-base conversion is ambiguous, and
// we're going to produce a diagnostic. Perform the derived-to-base
// search just one more time to compute all of the possible paths so
// to each base class subobject.
std::string PathDisplayStr = getAmbiguousPathsDisplayString(Paths);
- Diag(Loc, AmbigiousBaseConvID)
+ Diag(Loc, AmbiguousBaseConvID)
<< Derived << Base << PathDisplayStr << Range << Name;
}
return true;
// We must have a derived-to-base conversion. Check an
// ambiguous or inaccessible conversion.
unsigned InaccessibleID = 0;
- unsigned AmbigiousID = 0;
+ unsigned AmbiguousID = 0;
if (Diagnose) {
InaccessibleID = diag::err_upcast_to_inaccessible_base;
- AmbigiousID = diag::err_ambiguous_derived_to_base_conv;
+ AmbiguousID = diag::err_ambiguous_derived_to_base_conv;
}
if (CheckDerivedToBaseConversion(
- FromPointeeType, ToPointeeType, InaccessibleID, AmbigiousID,
+ FromPointeeType, ToPointeeType, InaccessibleID, AmbiguousID,
From->getExprLoc(), From->getSourceRange(), DeclarationName(),
&BasePath, IgnoreBaseAccess))
return true;
assert(T::alive == 0);
}
-void test_ambigious_assign() {
+void test_ambiguous_assign() {
using OptInt = std::optional<int>;
{
using T = AssignableFrom<OptInt const&>;
int main(int, char**)
{
test_with_test_type();
- test_ambigious_assign();
+ test_ambiguous_assign();
{
optional<int> opt;
constexpr optional<short> opt2;
}
-void test_ambigious_assign() {
+void test_ambiguous_assign() {
using OptInt = std::optional<int>;
{
using T = AssignableFrom<OptInt&&>;
int main(int, char**)
{
test_with_test_type();
- test_ambigious_assign();
+ test_ambiguous_assign();
{
optional<int> opt;
optional<short> opt2;
// Now walk checking that the rest of the instructions will compute the same
// value and that we're not overwriting anything. Don't move the instruction
- // past any memory, control-flow or other ambigious instructions.
+ // past any memory, control-flow or other ambiguous instructions.
for (auto I = ++Iterator(From), E = Iterator(To); I != E; ++I) {
if (mayHaveSideEffects(*I))
return false;