[cfe-commits] r59533 - /cfe/trunk/include/clang/Basic/Diagnostic.h
Chris Lattner
sabre at nondot.org
Tue Nov 18 09:18:22 PST 2008
Author: lattner
Date: Tue Nov 18 11:18:16 2008
New Revision: 59533
URL: http://llvm.org/viewvc/llvm-project?rev=59533&view=rev
Log:
don't dereference a null pointer
Modified:
cfe/trunk/include/clang/Basic/Diagnostic.h
Modified: cfe/trunk/include/clang/Basic/Diagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.h?rev=59533&r1=59532&r2=59533&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.h Tue Nov 18 11:18:16 2008
@@ -214,6 +214,7 @@
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;
More information about the cfe-commits
mailing list