From dd81583b1a146c901c8f38056fe541cb2adc257b Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 29 Nov 2017 11:27:21 -0800 Subject: [PATCH] [Parse] Fix a couple typos in PR #12964 --- lib/Basic/LangOptions.cpp | 2 +- lib/Parse/ParseIfConfig.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Basic/LangOptions.cpp b/lib/Basic/LangOptions.cpp index 8196024f7626d..53d526a9b6b0f 100644 --- a/lib/Basic/LangOptions.cpp +++ b/lib/Basic/LangOptions.cpp @@ -263,7 +263,7 @@ std::pair LangOptions::setTarget(llvm::Triple triple) { addPlatformConditionValue(PlatformConditionKind::Runtime, "_Native"); // Set the "targetEnvironment" platform condition if targeting a simulator - // environmet. Otherwise _no_ value is present for targetEnvironment; it's + // environment. Otherwise _no_ value is present for targetEnvironment; it's // an optional disambiguating refinement of the triple. if (swift::tripleIsAnySimulator(Target)) addPlatformConditionValue(PlatformConditionKind::TargetEnvironment, diff --git a/lib/Parse/ParseIfConfig.cpp b/lib/Parse/ParseIfConfig.cpp index 3b7c3a5168c1d..a09142e798847 100644 --- a/lib/Parse/ParseIfConfig.cpp +++ b/lib/Parse/ParseIfConfig.cpp @@ -550,7 +550,7 @@ static bool isVersionIfConfigCondition(Expr *Condition) { /// Get the identifier string from an \c Expr if it's an /// \c UnresolvedDeclRefExpr, otherwise the empty string. static StringRef getDeclRefStr(Expr *E) { - if (auto *UDRE = cast(E)) { + if (auto *UDRE = dyn_cast(E)) { return UDRE->getName().getBaseIdentifier().str(); } return "";