[Frontend] Handle skipped bodies in template instantiations
authorIlya Biryukov <ibiryukov@google.com>
Wed, 20 Dec 2017 14:32:38 +0000 (14:32 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Wed, 20 Dec 2017 14:32:38 +0000 (14:32 +0000)
commita27eca283b6e92b8520a84b2c1ce982766dfce7a
tree0cfef0c1d3e04fc2a671e6439897945fbc67bba6
parent0d5016837dd4779b879562c1835f75d8f8e7a0af
[Frontend] Handle skipped bodies in template instantiations

Summary:
- Fixed an assert in Sema::InstantiateFunctionDefinition and added
  support for instantiating a function template with skipped body.
- Properly call setHasSkippedBody for FunctionTemplateDecl passed to
  Sema::ActOnSkippedFunctionBody.

Reviewers: sepavloff, bkramer

Reviewed By: sepavloff

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D41237

llvm-svn: 321174
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/test/Index/skipped-bodies-templates.cpp [new file with mode: 0644]