Commit Graph

17 Commits

Author SHA1 Message Date
Chris Lattner
a3d232ad27 zap more dead code.
llvm-svn: 113076
2010-09-04 18:19:08 +00:00
Chris Lattner
48eb14dd79 Fix:
Decl.cpp:716:28: warning: initialization of pointer of type 'clang::VarDecl *' from literal 'false' [-Wbool-conversions]
  VarDecl *LastTentative = false;
                           ^
RewriteRope.cpp:535:12: warning: initialization of pointer of type '<anonymous>::RopePieceBTreeNode *' from literal 'false'
      [-Wbool-conversions]
    return false;
           ^

llvm-svn: 105946
2010-06-14 18:31:46 +00:00
Ted Kremenek
2e385f9319 Call 'clear()' in ~RopePieceBTreeLeaf(), decrementing the reference
counts of the bufffers referened by the RopePieces in
RopePieceBTreeLeaf.  This (I believe) corrently fixes the leak I meant
to fix in r84601 (which ended up causing an overrelease).

llvm-svn: 84615
2009-10-20 06:31:34 +00:00
Ted Kremenek
988c5811ee Revert 84601. Looks like it was causing failures on some systems.
llvm-svn: 84610
2009-10-20 05:53:05 +00:00
Ted Kremenek
2f9876cf7c Fix a reference count imbalance in RewriteRope::MakeRopeString().
This was causing a ton of memory to be leaked when using HTML
diagnostics with the static analyzer (on large files with many errors).

llvm-svn: 84601
2009-10-20 05:25:11 +00:00
Mike Stump
11289f4280 Remove tabs, and whitespace cleanups.
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Zhongxing Xu
5912c6e6f0 Fixed an offset calculation error.
llvm-svn: 56242
2008-09-16 07:58:21 +00:00
Chris Lattner
ae2c57fbbe Fix rewrite rope to keep the leaf list up-to-date as it erases leaves
from the rope.  rdar://5952468

llvm-svn: 51651
2008-05-28 18:45:56 +00:00
Chris Lattner
10a7bd6341 fix a nasty off-by-one error.
llvm-svn: 51519
2008-05-23 23:29:33 +00:00
Chris Lattner
2b88c1e4c4 Fix rdar://5919567: assertion failure: split didn't occur before erase!
llvm-svn: 50839
2008-05-08 03:23:46 +00:00
Chris Lattner
68a27fac9d fix a rewriter crash on zero length files.
llvm-svn: 50126
2008-04-23 03:21:50 +00:00
Chris Lattner
3e142b2585 finish commenting RewriteRope
llvm-svn: 49712
2008-04-15 06:37:11 +00:00
Chris Lattner
492530d2df simplify the implementation of the insert/split operation to return
the new RHS directly instead of indirecting through the 'InsertResult'
struct.  This eliminates InsertResult.

llvm-svn: 49694
2008-04-14 22:10:58 +00:00
Chris Lattner
e58408d8db Add a bunch of comments, move RewriteRope::MakeRopeString out of line.
llvm-svn: 49689
2008-04-14 21:41:00 +00:00
Chris Lattner
dc217191d1 fix more uninit ivars, who wrote this junk? :)
llvm-svn: 49679
2008-04-14 20:07:03 +00:00
Chris Lattner
ca94e4263b Fix an assertion ted was hitting, due to an uninitialized variable.
llvm-svn: 49678
2008-04-14 20:05:32 +00:00
Chris Lattner
d80edddccd move a ton of code out of line, from RewriteRope.h -> RewriteRope.cpp
llvm-svn: 49664
2008-04-14 17:54:23 +00:00