diff --git a/lib/Sema/TypeCheckConstraints.cpp b/lib/Sema/TypeCheckConstraints.cpp
index 8672970..8ce2247 100644
--- a/lib/Sema/TypeCheckConstraints.cpp
+++ b/lib/Sema/TypeCheckConstraints.cpp
@@ -638,12 +638,27 @@ namespace {
     /// node when visited.
     Expr *UnresolvedCtorRebindTarget = nullptr;
 
+    /// The expressions that are direct arguments of call expressions.
+    llvm::SmallPtrSet<Expr *, 4> CallArgs;
+
   public:
     PreCheckExpression(TypeChecker &tc, DeclContext *dc) : TC(tc), DC(dc) { }
 
     bool walkToClosureExprPre(ClosureExpr *expr);
 
     std::pair<bool, Expr *> walkToExprPre(Expr *expr) override {
+      // If this is a call, record the argument expression.
+      if (auto call = dyn_cast<CallExpr>(expr)) {
+        CallArgs.insert(call->getArg());
+      }
+
+      // If this is an unresolved member with a call argument (e.g.,
+      // .some(x)), record the argument expression.
+      if (auto unresolvedMember = dyn_cast<UnresolvedMemberExpr>(expr)) {
+        if (auto arg = unresolvedMember->getArgument())
+          CallArgs.insert(arg);
+      }
+
       // Local function used to finish up processing before returning. Every
       // return site should call through here.
       auto finish = [&](bool recursive, Expr *expr) {
@@ -875,6 +890,9 @@ bool PreCheckExpression::walkToClosureExprPre(ClosureExpr *closure) {
 /// as expressions due to the parser not knowing which identifiers are
 /// type names.
 TypeExpr *PreCheckExpression::simplifyTypeExpr(Expr *E) {
+  // Don't try simplifying a call argument, because we don't want to
+  // simplify away the required ParenExpr/TupleExpr.
+  if (CallArgs.count(E) > 0) return nullptr;
 
   // Fold 'T.Type' or 'T.Protocol' into a metatype when T is a TypeExpr.
   if (auto *MRE = dyn_cast<UnresolvedDotExpr>(E)) {
diff --git a/stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift b/stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift
index 52d6ecc..3be7b26 100644
--- a/stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift
+++ b/stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift
@@ -40,7 +40,7 @@ public var _stdlib_FD_SETSIZE: CInt {
 public struct _stdlib_fd_set {
   var _data: [UInt]
   static var _wordBits: Int {
-    return sizeof(UInt) * 8
+    return sizeof(UInt.self) * 8
   }
 
   public init() {
diff --git a/stdlib/public/core/Builtin.swift b/stdlib/public/core/Builtin.swift
index 2802b6a..6c56839 100644
--- a/stdlib/public/core/Builtin.swift
+++ b/stdlib/public/core/Builtin.swift
@@ -98,7 +98,7 @@ internal func _roundUp<T, DestinationType>(
   return UnsafeMutablePointer<DestinationType>(
     bitPattern: _roundUpImpl(
       UInt(bitPattern: pointer),
-      toAlignment: alignof(DestinationType))
+      toAlignment: alignof(DestinationType.self))
   ).unsafelyUnwrapped
 }
 
diff --git a/stdlib/public/core/HashedCollections.swift.gyb b/stdlib/public/core/HashedCollections.swift.gyb
index f6b0fc1..0eea19a 100644
--- a/stdlib/public/core/HashedCollections.swift.gyb
+++ b/stdlib/public/core/HashedCollections.swift.gyb
@@ -2475,14 +2475,14 @@ final internal class _Native${Self}StorageImpl<${TypeParameters}> :
   /// padding to align the start to word alignment.
   internal static func bytesForBitMap(capacity: Int) -> Int {
     let numWords = _UnsafeBitMap.sizeInWords(forSizeInBits: capacity)
-    return numWords * strideof(UInt) + alignof(UInt)
+    return numWords * strideof(UInt.self) + alignof(UInt.self)
   }
 
   /// Returns the bytes necessary to store 'capacity' keys and padding to align
   /// the start to the alignment of the 'Key' type assuming a word aligned base
   /// address.
   internal static func bytesForKeys(capacity: Int) -> Int {
-    let padding = max(0, alignof(Key.self) - alignof(UInt))
+    let padding = max(0, alignof(Key.self) - alignof(UInt.self))
     return strideof(Key.self) * capacity + padding
   }
 
@@ -2492,7 +2492,7 @@ final internal class _Native${Self}StorageImpl<${TypeParameters}> :
   /// address aligned to the maximum of the alignment of the 'Key' type and the
   /// alignment of a word.
   internal static func bytesForValues(capacity: Int) -> Int {
-    let maxPrevAlignment = max(alignof(Key.self), alignof(UInt))
+    let maxPrevAlignment = max(alignof(Key.self), alignof(UInt.self))
     let padding = max(0, alignof(Value.self) - maxPrevAlignment)
     return strideof(Value.self) * capacity + padding
   }
@@ -2540,7 +2540,7 @@ final internal class _Native${Self}StorageImpl<${TypeParameters}> :
     let bitMapSizeInBytes =
       _unsafeMultiply(
         _UnsafeBitMap.sizeInWords(forSizeInBits: _capacity),
-        strideof(UInt))
+        strideof(UInt.self))
     let start =
       UnsafeMutablePointer<UInt8>(_initializedHashtableEntriesBitMapStorage)
       + bitMapSizeInBytes
diff --git a/stdlib/public/core/ManagedBuffer.swift b/stdlib/public/core/ManagedBuffer.swift
index cd9f47b..30077a2 100644
--- a/stdlib/public/core/ManagedBuffer.swift
+++ b/stdlib/public/core/ManagedBuffer.swift
@@ -248,7 +248,7 @@ public struct ManagedBufferPointer<Value, Element> : Equatable {
   /// idea to store this information in the "value" area when
   /// an instance is created.
   public var capacity: Int {
-    return (_capacityInBytes &- _My._elementOffset) / strideof(Element)
+    return (_capacityInBytes &- _My._elementOffset) / strideof(Element.self)
   }
 
   /// Call `body` with an `UnsafeMutablePointer` to the stored
diff --git a/stdlib/public/core/Runtime.swift.gyb b/stdlib/public/core/Runtime.swift.gyb
index 1f91d1d..72b92af 100644
--- a/stdlib/public/core/Runtime.swift.gyb
+++ b/stdlib/public/core/Runtime.swift.gyb
@@ -459,7 +459,7 @@ func _rawPointerToString(_ value: Builtin.RawPointer) -> String {
       radix: 16,
       uppercase: false
     )
-  for _ in 0..<(2 * sizeof(UnsafePointer<Void>) - result.utf16.count) {
+  for _ in 0..<(2 * sizeof(UnsafePointer<Void>.self) - result.utf16.count) {
     result = "0" + result
   }
   return "0x" + result
