diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-10 02:19:05 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-10 02:19:05 +0000 |
| commit | afe4aa8b2c69630c4cd5f40cc506bccef279ba17 (patch) | |
| tree | b6caa07a95d839f757dfca9632635500e9a35a18 /clang/lib/Sema/SemaDecl.cpp | |
| parent | 205bfdb3e9b0d046c788ae611a80f691058fd9a1 (diff) | |
| download | bcm5719-llvm-afe4aa8b2c69630c4cd5f40cc506bccef279ba17.tar.gz bcm5719-llvm-afe4aa8b2c69630c4cd5f40cc506bccef279ba17.zip | |
[c++1z] P0512R0: support for 'explicit' specifier on deduction-guides.
llvm-svn: 294693
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 7749bef4e77..abb9f510628 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -7659,11 +7659,12 @@ static FunctionDecl* CreateNewFunctionDecl(Sema &SemaRef, Declarator &D, // We don't need to store much extra information for a deduction guide, so // just model it as a plain FunctionDecl. - // FIXME: Store IsExplicit! - return FunctionDecl::Create(SemaRef.Context, DC, - D.getLocStart(), - NameInfo, R, TInfo, SC, isInline, - true/*HasPrototype*/, isConstexpr); + auto *FD = FunctionDecl::Create(SemaRef.Context, DC, D.getLocStart(), + NameInfo, R, TInfo, SC, isInline, + true /*HasPrototype*/, isConstexpr); + if (isExplicit) + FD->setExplicitSpecified(); + return FD; } else if (DC->isRecord()) { // If the name of the function is the same as the name of the record, // then this must be an invalid constructor that has a return type. |

