diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-02-21 01:47:18 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-02-21 01:47:18 +0000 |
commit | 66874fb18afbffb8b2ca05576851a64534be3352 (patch) | |
tree | d6391d232c549a7ec1e6bb31a943e468aac589d9 /lib/Sema/SemaTemplateVariadic.cpp | |
parent | 65124fe81f61eed98b845c87e3a78a780f3deb11 (diff) |
Use None rather than Optional<T>() where possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateVariadic.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateVariadic.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Sema/SemaTemplateVariadic.cpp b/lib/Sema/SemaTemplateVariadic.cpp index 2cff7aa6b7..c0ad2be6d4 100644 --- a/lib/Sema/SemaTemplateVariadic.cpp +++ b/lib/Sema/SemaTemplateVariadic.cpp @@ -443,8 +443,7 @@ TypeResult Sema::ActOnPackExpansion(ParsedType Type, if (!TSInfo) return true; - TypeSourceInfo *TSResult = - CheckPackExpansion(TSInfo, EllipsisLoc, Optional<unsigned>()); + TypeSourceInfo *TSResult = CheckPackExpansion(TSInfo, EllipsisLoc, None); if (!TSResult) return true; @@ -490,7 +489,7 @@ QualType Sema::CheckPackExpansion(QualType Pattern, SourceRange PatternRange, } ExprResult Sema::ActOnPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc) { - return CheckPackExpansion(Pattern, EllipsisLoc, Optional<unsigned>()); + return CheckPackExpansion(Pattern, EllipsisLoc, None); } ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc, @@ -662,7 +661,7 @@ Optional<unsigned> Sema::getNumArgumentsInExpansion(QualType T, if (Instantiation->is<Decl*>()) // The pattern refers to an unexpanded pack. We're not ready to expand // this pack yet. - return Optional<unsigned>(); + return None; unsigned Size = Instantiation->get<DeclArgumentPack *>()->size(); assert((!Result || *Result == Size) && "inconsistent pack sizes"); @@ -676,7 +675,7 @@ Optional<unsigned> Sema::getNumArgumentsInExpansion(QualType T, !TemplateArgs.hasTemplateArgument(Depth, Index)) // The pattern refers to an unknown template argument. We're not ready to // expand this pack yet. - return Optional<unsigned>(); + return None; // Determine the size of the argument pack. unsigned Size = TemplateArgs(Depth, Index).pack_size(); |