aboutsummaryrefslogtreecommitdiff
path: root/lib/AST
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-05-05 00:41:58 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-05-05 00:41:58 +0000
commit5543169296beeb183b9c9392debc774fcf493eeb (patch)
tree75b21e8590578c6b6ad309667d587424206786ca /lib/AST
parent3ce0de611e7f754df9ba9f883333eef8399f7af7 (diff)
Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef constructor from None
Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181139 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST')
-rw-r--r--lib/AST/Comment.cpp2
-rw-r--r--lib/AST/CommentParser.cpp5
-rw-r--r--lib/AST/Decl.cpp2
-rw-r--r--lib/AST/DeclObjC.cpp4
-rw-r--r--lib/AST/ExprCXX.cpp3
5 files changed, 7 insertions, 9 deletions
diff --git a/lib/AST/Comment.cpp b/lib/AST/Comment.cpp
index db55c04544..68c73fd48e 100644
--- a/lib/AST/Comment.cpp
+++ b/lib/AST/Comment.cpp
@@ -134,7 +134,7 @@ void DeclInfo::fill() {
IsObjCMethod = false;
IsInstanceMethod = false;
IsClassMethod = false;
- ParamVars = ArrayRef<const ParmVarDecl *>();
+ ParamVars = None;
TemplateParameters = NULL;
if (!CommentDecl) {
diff --git a/lib/AST/CommentParser.cpp b/lib/AST/CommentParser.cpp
index 1224db6e0e..d89c79b3d9 100644
--- a/lib/AST/CommentParser.cpp
+++ b/lib/AST/CommentParser.cpp
@@ -329,8 +329,7 @@ BlockCommandComment *Parser::parseBlockCommand() {
if (isTokBlockCommand()) {
// Block command ahead. We can't nest block commands, so pretend that this
// command has an empty argument.
- ParagraphComment *Paragraph = S.actOnParagraphComment(
- ArrayRef<InlineContentComment *>());
+ ParagraphComment *Paragraph = S.actOnParagraphComment(None);
if (PC) {
S.actOnParamCommandFinish(PC, Paragraph);
return PC;
@@ -372,7 +371,7 @@ BlockCommandComment *Parser::parseBlockCommand() {
ParagraphComment *Paragraph;
if (EmptyParagraph)
- Paragraph = S.actOnParagraphComment(ArrayRef<InlineContentComment *>());
+ Paragraph = S.actOnParagraphComment(None);
else {
BlockContentComment *Block = parseParagraphOrBlockCommand();
// Since we have checked for a block command, we should have parsed a
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 1f4248c8e5..ff012fc401 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -3429,7 +3429,7 @@ ImportDecl *ImportDecl::CreateDeserialized(ASTContext &C, unsigned ID,
ArrayRef<SourceLocation> ImportDecl::getIdentifierLocs() const {
if (!ImportedAndComplete.getInt())
- return ArrayRef<SourceLocation>();
+ return None;
const SourceLocation *StoredLocs
= reinterpret_cast<const SourceLocation *>(this + 1);
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index b441f7ff1e..4ddbb22199 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -604,12 +604,12 @@ void ObjCMethodDecl::setMethodParams(ASTContext &C,
assert((!SelLocs.empty() || isImplicit()) &&
"No selector locs for non-implicit method");
if (isImplicit())
- return setParamsAndSelLocs(C, Params, ArrayRef<SourceLocation>());
+ return setParamsAndSelLocs(C, Params, llvm::None);
SelLocsKind = hasStandardSelectorLocs(getSelector(), SelLocs, Params,
DeclEndLoc);
if (SelLocsKind != SelLoc_NonStandard)
- return setParamsAndSelLocs(C, Params, ArrayRef<SourceLocation>());
+ return setParamsAndSelLocs(C, Params, llvm::None);
setParamsAndSelLocs(C, Params, SelLocs);
}
diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp
index 277c8c09a5..402d7b532b 100644
--- a/lib/AST/ExprCXX.cpp
+++ b/lib/AST/ExprCXX.cpp
@@ -178,8 +178,7 @@ CXXPseudoDestructorExpr::CXXPseudoDestructorExpr(ASTContext &Context,
SourceLocation ColonColonLoc, SourceLocation TildeLoc,
PseudoDestructorTypeStorage DestroyedType)
: Expr(CXXPseudoDestructorExprClass,
- Context.getPointerType(Context.getFunctionType(Context.VoidTy,
- ArrayRef<QualType>(),
+ Context.getPointerType(Context.getFunctionType(Context.VoidTy, None,
FunctionProtoType::ExtProtoInfo())),
VK_RValue, OK_Ordinary,
/*isTypeDependent=*/(Base->isTypeDependent() ||