summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2013-12-05 01:36:53 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2013-12-05 01:36:53 +0000
commita813e2bd4bd98db0c7067b6e51dff2042a5bba5c (patch)
tree7d4ad872410cbef28fa03acb74d26374ec382215 /lib/CodeGen/CGExprScalar.cpp
parent8e77b2bb5a22893e5f177997434ed7a529cf1cbc (diff)
downloadclang-a813e2bd4bd98db0c7067b6e51dff2042a5bba5c.tar.gz
clang-a813e2bd4bd98db0c7067b6e51dff2042a5bba5c.tar.bz2
clang-a813e2bd4bd98db0c7067b6e51dff2042a5bba5c.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196453 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
0 files changed, 0 insertions, 0 deletions