зеркало из https://github.com/microsoft/clang-1.git
don't dereference a null pointer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59533 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
10c4262aeb
Коммит
aabb54e1ee
|
@ -214,6 +214,7 @@ class DiagnosticInfo {
|
|||
public:
|
||||
DiagnosticInfo(Diagnostic *diagObj, FullSourceLoc loc, unsigned diagID) :
|
||||
DiagObj(diagObj), Loc(loc), DiagID(diagID) {
|
||||
if (DiagObj == 0) return;
|
||||
assert(DiagObj->NumDiagArgs == -1 &&
|
||||
"Multiple diagnostics in flight at once!");
|
||||
DiagObj->NumDiagArgs = DiagObj->NumDiagRanges = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче