]> granicus.if.org Git - clang/commit
Mark instantiated function decls as inline specified if any pattern is
authorReid Kleckner <reid@kleckner.net>
Wed, 1 Apr 2015 16:23:44 +0000 (16:23 +0000)
committerReid Kleckner <reid@kleckner.net>
Wed, 1 Apr 2015 16:23:44 +0000 (16:23 +0000)
commitc53a86c0cb8a657864ca6826c97e62c0d4b356dc
tree0c980ae3785ccdea355f25c7608bf56d8dad4ff3
parentf29633f1785c24cf7322a59fc1c55c372bcc870e
Mark instantiated function decls as inline specified if any pattern is

A function template pattern can be declared without the 'inline'
specifier and defined later with the 'inline' specifier. However, during
instantiation, we were only looking at the canonical decl to see if we
should mark the instantiated decl as inline specified. Since the
instantiated decl actually represents many pattern declarations, put the
inline specifier on the instantiation decl if any of the pattern decls
have it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233817 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplateInstantiateDecl.cpp
test/CodeGenCXX/inlinehint.cpp [new file with mode: 0644]