diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-08 01:27:29 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-08 01:27:29 +0000 |
commit | 7b0f692041cfa8e45f1d3762299924931276fffe (patch) | |
tree | c4c5c48915938afaa9c110728420415bd4468fa8 /lib/Sema/SemaDeclCXX.cpp | |
parent | 50aef85f74be35bc3b5fd09c62fcdc166f0bdae2 (diff) |
Diagnose an attempt to give a deduction-guide a function body.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294397 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 1ae89ea89b..e3310b60a2 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -8129,6 +8129,9 @@ void Sema::CheckDeductionGuideDeclarator(Declarator &D, QualType &R, // FIXME: Check that the return type can instantiate to a specialization of // the template specified as the deduction-guide's name. + + if (D.isFunctionDefinition()) + Diag(D.getIdentifierLoc(), diag::err_deduction_guide_defines_function); } //===----------------------------------------------------------------------===// |