forked from OSchip/llvm-project
Don't try to check override control for invalid member functions. Fixes a crash in a corner case. Patch by Olivier Goffart!
llvm-svn: 163337
This commit is contained in:
parent
866908c42c
commit
09b031fbc0
|
@ -1420,6 +1420,9 @@ bool Sema::ActOnAccessSpecifier(AccessSpecifier Access,
|
|||
|
||||
/// CheckOverrideControl - Check C++11 override control semantics.
|
||||
void Sema::CheckOverrideControl(Decl *D) {
|
||||
if (D->isInvalidDecl())
|
||||
return;
|
||||
|
||||
const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D);
|
||||
|
||||
// Do we know which functions this declaration might be overriding?
|
||||
|
|
|
@ -155,3 +155,8 @@ namespace PR10924 {
|
|||
{
|
||||
};
|
||||
}
|
||||
|
||||
class Outer1 {
|
||||
template <typename T> struct X;
|
||||
template <typename T> int X<T>::func() {} // expected-error{{out-of-line definition of 'func' from class 'X<T>' without definition}}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue