Fix crash on switch conditions of non-integer types in templates
Clang currently crashes for switch statements inside a template when the condition is a non-integer field. The crash is due to incorrect type-dependency of field. Type-dependency of member expressions is currently set based on the containing class. This patch changes this for 'members of the current instantiation' to set the type dependency based on the member's type instead. A few lit tests started to fail once I applied this patch because errors are now diagnosed earlier (does not wait till instantiation). I've modified these tests in this patch as well. Patch fixes PR#40982 Differential Revision: https://reviews.llvm.org/D61027 llvm-svn: 368706
Loading
Please register or sign in to comment