Commit Graph

1 Commits

Author SHA1 Message Date
Volodymyr Sapsai ddf524c031 [Sema] Fix using old initializer during switch statement transformation.
It fixes a crash in CodeGen when we are trying to generate code for
initializer expression created before template instantiation, like

    CallExpr '<dependent type>'
    |-UnresolvedLookupExpr '<overloaded function type>' lvalue (ADL) = 'parse'
    `-DeclRefExpr 'Buffer<N>' lvalue ParmVar 'buffer' 'Buffer<N>'

rdar://problem/33888545

Reviewers: rsmith, ahatanak

Reviewed By: ahatanak

Subscribers: aemerson, kristof.beyls, cfe-commits

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

llvm-svn: 313896
2017-09-21 17:58:27 +00:00