зеркало из https://github.com/microsoft/clang-1.git
Fix a null dereference Neil ran into
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41564 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
1d40060a37
Коммит
e9ca85163e
Sema
|
@ -965,9 +965,10 @@ Sema::DeclTy *Sema::ParseEnumConstant(Scope *S, DeclTy *theEnumDecl,
|
||||||
Id->getName());
|
Id->getName());
|
||||||
// FIXME: Don't leak memory: delete Val;
|
// FIXME: Don't leak memory: delete Val;
|
||||||
Val = 0; // Just forget about it.
|
Val = 0; // Just forget about it.
|
||||||
}
|
} else {
|
||||||
EltTy = Val->getType();
|
EltTy = Val->getType();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!Val) {
|
if (!Val) {
|
||||||
if (LastEnumConst) {
|
if (LastEnumConst) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче