]> granicus.if.org Git - clang/commitdiff
Use None to avoid re-mentioning the ArrayRef type to call the default constructor.
authorCraig Topper <craig.topper@gmail.com>
Sat, 26 Sep 2015 05:22:17 +0000 (05:22 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sat, 26 Sep 2015 05:22:17 +0000 (05:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248660 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/Analyses/ThreadSafetyTIL.h
include/clang/Sema/Sema.h
lib/AST/Type.cpp

index 4b5946617dfc422431b879cd6117d209dd6efbf0..9f3bbdb8e5125b1a2ebcd4c7f0350f9134306682 100644 (file)
@@ -1479,7 +1479,7 @@ public:
 
   /// Return an empty list.
   ArrayRef<BasicBlock*> successors() {
-    return ArrayRef<BasicBlock*>();
+    return None;
   }
 
   SExpr *returnValue() { return Retval; }
@@ -1507,7 +1507,7 @@ inline ArrayRef<BasicBlock*> Terminator::successors() {
     case COP_Branch: return cast<Branch>(this)->successors();
     case COP_Return: return cast<Return>(this)->successors();
     default:
-      return ArrayRef<BasicBlock*>();
+      return None;
   }
 }
 
index 60228f4f3996fb98209006183abfc0fb5cb5e114..f166402efa015a73cdf284f965dc23023ab2755b 100644 (file)
@@ -6737,7 +6737,7 @@ public:
         Sema &SemaRef, ActiveTemplateInstantiation::InstantiationKind Kind,
         SourceLocation PointOfInstantiation, SourceRange InstantiationRange,
         Decl *Entity, NamedDecl *Template = nullptr,
-        ArrayRef<TemplateArgument> TemplateArgs = ArrayRef<TemplateArgument>(),
+        ArrayRef<TemplateArgument> TemplateArgs = None,
         sema::TemplateDeductionInfo *DeductionInfo = nullptr);
 
     InstantiatingTemplate(const InstantiatingTemplate&) = delete;
index 40fe903feab0eccea446ccffa8b402eb451d10db..74bb1451d1e41ed3af6751640252434afe706ac5 100644 (file)
@@ -1307,7 +1307,7 @@ Optional<ArrayRef<QualType>> Type::getObjCSubstitutions(
   if (!curClassDecl) {
     // If we don't have a context type (e.g., this is "id" or some
     // variant thereof), substitute the bounds.
-    return llvm::ArrayRef<QualType>();
+    return None;
   }
 
   // Follow the superclass chain until we've mapped the receiver type
@@ -1327,7 +1327,7 @@ Optional<ArrayRef<QualType>> Type::getObjCSubstitutions(
   // If we don't have a receiver type, or the receiver type does not
   // have type arguments, substitute in the defaults.
   if (!objectType || objectType->isUnspecialized()) {
-    return llvm::ArrayRef<QualType>();
+    return None;
   }
 
   // The receiver type has the type arguments we want.