[cfe-commits] r99114 - /cfe/trunk/lib/Checker/BugReporter.cpp
Ted Kremenek
kremenek at apple.com
Sat Mar 20 21:38:40 PDT 2010
Author: kremenek
Date: Sat Mar 20 23:38:40 2010
New Revision: 99114
URL: http://llvm.org/viewvc/llvm-project?rev=99114&view=rev
Log:
Delete the new visitor if an old one already exists.
Modified:
cfe/trunk/lib/Checker/BugReporter.cpp
Modified: cfe/trunk/lib/Checker/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/BugReporter.cpp?rev=99114&r1=99113&r2=99114&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/BugReporter.cpp (original)
+++ cfe/trunk/lib/Checker/BugReporter.cpp Sat Mar 20 23:38:40 2010
@@ -44,8 +44,10 @@
visitor->Profile(ID);
void *InsertPos;
- if (CallbacksSet.FindNodeOrInsertPos(ID, InsertPos))
+ if (CallbacksSet.FindNodeOrInsertPos(ID, InsertPos)) {
+ delete visitor;
return;
+ }
CallbacksSet.InsertNode(visitor, InsertPos);
Callbacks = F.Add(visitor, Callbacks);
More information about the cfe-commits
mailing list