Skip to content
Commit 76945821 authored by Elizabeth Andrews's avatar Elizabeth Andrews
Browse files

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
parent 0a04a062
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment