Commit 0e1066e6 authored by Bill Wendling's avatar Bill Wendling
Browse files

---Merging r196453

    Parse: Recover better from bad definitions with base specifiers
    
    We would skip until the next comma, hoping good things whould lie there,
    however this would fail when we have such things as this:
    
    struct A {};
    template <typename>
    struct D;
    template <>
    struct D<C> : B, A::D;
    
    Once this happens, we would believe that D with a nested namespace
    specifier of A was a variable that was being declared. We would go on
    to complain that there was an extraneous 'template <>' on their variable
    declaration.
    
    Crashes would happen when 'A' gets defined as 'enum class A {}' as
    various asserts would fire.
    
    Instead, we should skip up until the semicolon if we see that we are in
    the middle of a definition and the current token is a ':'
    
    This fixes PR17084.

llvm-svn: 197905
parent 04501dbc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment