]> granicus.if.org Git - clang/commit
Do not crash if class is defined in wrong scope.
authorSerge Pavlov <sepavloff@gmail.com>
Mon, 28 Dec 2015 19:40:14 +0000 (19:40 +0000)
committerSerge Pavlov <sepavloff@gmail.com>
Mon, 28 Dec 2015 19:40:14 +0000 (19:40 +0000)
commit59d0d7461d22cc832c228fa887a79376186a8ffb
tree93c2b124eda42b54b6b8c0bd956002852e6dfc47
parent80a66617369eac2ca8cbc8c9980a4f9d338b3054
Do not crash if class is defined in wrong scope.

This patch fixes PR16677. The latter represents the case when due to
misprinted character class definition occurs in the scope of template
arguments. Base class of this class depends on the template parameter in the
same scope and cannot be resolved, it causes crash. Right behavior is to
make semantic processing even if the definition is wrong, as the code
that emits appropriate message is called after the processing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256511 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDeclCXX.cpp
test/SemaCXX/PR16677.cpp [new file with mode: 0644]