Sema: Allow IndirectFieldDecl to appear in a non-type template argument
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 22 Oct 2013 21:56:38 +0000 (21:56 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 22 Oct 2013 21:56:38 +0000 (21:56 +0000)
commit255ca71082810ac8d3084f43727675e02a384683
treebe32dfecaf12d7ae13c610d4d5e3b7c66766d9bb
parent65f958dca64ef64d43bf85e871ec64e638ff2602
Sema: Allow IndirectFieldDecl to appear in a non-type template argument

We would not identify pointer-to-member construction in a non-type
template argument if it was either a FieldDecl or a CXXMethodDecl.
However, this would incorrectly reject declarations that were injected
via an IndirectFieldDecl (e.g. a field inside of an anonymous union).

This fixes PR17657.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193203 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplate.cpp
test/SemaTemplate/temp_arg_nontype.cpp