[cfe-commits] r103707 - /cfe/trunk/lib/Checker/MallocChecker.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Thu May 13 01:26:32 PDT 2010
Author: zhongxingxu
Date: Thu May 13 03:26:32 2010
New Revision: 103707
URL: http://llvm.org/viewvc/llvm-project?rev=103707&view=rev
Log:
Relax an assertion. Various cases could lead to non-symbol values.
Modified:
cfe/trunk/lib/Checker/MallocChecker.cpp
Modified: cfe/trunk/lib/Checker/MallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/MallocChecker.cpp?rev=103707&r1=103706&r2=103707&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/MallocChecker.cpp (original)
+++ cfe/trunk/lib/Checker/MallocChecker.cpp Thu May 13 03:26:32 2010
@@ -182,7 +182,10 @@
return state;
SymbolRef Sym = ArgVal.getAsLocSymbol();
- assert(Sym);
+
+ // Various cases could lead to non-symbol values here.
+ if (!Sym)
+ return state;
const RefState *RS = state->get<RegionState>(Sym);
More information about the cfe-commits
mailing list