From: Craig Topper Date: Tue, 29 Sep 2015 04:53:28 +0000 (+0000) Subject: Simplify or remove calls to makeArrayRef based on feedback from David Blaikie. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c7f8c8ee3a14235fca28c91b0d043f780a94865;p=clang Simplify or remove calls to makeArrayRef based on feedback from David Blaikie. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248776 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/Analyses/ThreadSafetyTIL.h b/include/clang/Analysis/Analyses/ThreadSafetyTIL.h index e4b8d478d7..9864999133 100644 --- a/include/clang/Analysis/Analyses/ThreadSafetyTIL.h +++ b/include/clang/Analysis/Analyses/ThreadSafetyTIL.h @@ -1395,7 +1395,7 @@ public: /// Return the list of basic blocks that this terminator can branch to. ArrayRef successors() { - return llvm::makeArrayRef(TargetBlock); + return TargetBlock; } template @@ -1445,7 +1445,7 @@ public: /// Return the list of basic blocks that this terminator can branch to. ArrayRef successors() { - return llvm::makeArrayRef(Branches); + return Branches; } template diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp index 7a54f5a03b..3379f9c455 100644 --- a/lib/Serialization/ASTWriterDecl.cpp +++ b/lib/Serialization/ASTWriterDecl.cpp @@ -208,7 +208,7 @@ namespace clang { auto &&PartialSpecializations = getPartialSpecializations(Common); ArrayRef LazySpecializations; if (auto *LS = Common->LazySpecializations) - LazySpecializations = llvm::makeArrayRef(LS + 1, LS + 1 + LS[0]); + LazySpecializations = llvm::makeArrayRef(LS + 1, LS[0]); // Add a slot to the record for the number of specializations. unsigned I = Record.size();