From: Craig Topper Date: Sat, 26 Sep 2015 05:22:17 +0000 (+0000) Subject: Use None to avoid re-mentioning the ArrayRef type to call the default constructor. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc4ce6d6bbc69135df4c7553997c6863caa411f1;p=clang Use None to avoid re-mentioning the ArrayRef type to call the default constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248660 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/Analyses/ThreadSafetyTIL.h b/include/clang/Analysis/Analyses/ThreadSafetyTIL.h index 4b5946617d..9f3bbdb8e5 100644 --- a/include/clang/Analysis/Analyses/ThreadSafetyTIL.h +++ b/include/clang/Analysis/Analyses/ThreadSafetyTIL.h @@ -1479,7 +1479,7 @@ public: /// Return an empty list. ArrayRef successors() { - return ArrayRef(); + return None; } SExpr *returnValue() { return Retval; } @@ -1507,7 +1507,7 @@ inline ArrayRef Terminator::successors() { case COP_Branch: return cast(this)->successors(); case COP_Return: return cast(this)->successors(); default: - return ArrayRef(); + return None; } } diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 60228f4f39..f166402efa 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -6737,7 +6737,7 @@ public: Sema &SemaRef, ActiveTemplateInstantiation::InstantiationKind Kind, SourceLocation PointOfInstantiation, SourceRange InstantiationRange, Decl *Entity, NamedDecl *Template = nullptr, - ArrayRef TemplateArgs = ArrayRef(), + ArrayRef TemplateArgs = None, sema::TemplateDeductionInfo *DeductionInfo = nullptr); InstantiatingTemplate(const InstantiatingTemplate&) = delete; diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 40fe903fea..74bb1451d1 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -1307,7 +1307,7 @@ Optional> 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(); + return None; } // Follow the superclass chain until we've mapped the receiver type @@ -1327,7 +1327,7 @@ Optional> 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(); + return None; } // The receiver type has the type arguments we want.