Skip to content
Commit 21dfe482 authored by Shafik Yaghmour's avatar Shafik Yaghmour
Browse files

[Clang] Fix assert in Sema::LookupTemplateName so that it does not attempt an...

[Clang] Fix assert in Sema::LookupTemplateName so that it does not attempt an unconditional cast to TagType

In Sema::LookupTemplateName(...) seeks to assert that the ObjectType is complete
or being defined. If the type is incomplete it will attempt to unconditionally
cast it to a TagType and not all incomplete types are a TagType. For example the
type could be void or it could be an IncompleteArray.

This change adds an additional check to confirm it is a TagType before attempting
to check if it is incomplete or being defined

Differential Revision: https://reviews.llvm.org/D132712
parent f9445ae7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment