- Feb 07, 2009
-
-
Ted Kremenek authored
- Made allocation of Stmt objects using vanilla new/delete a *compiler error* by making this new/delete "protected" within class Stmt. - Now the only way to allocate Stmt objects is by using the new operator that takes ASTContext& as an argument. This ensures that all Stmt nodes are allocated from the same (pool) allocator. - Naturally, these two changes required that *all* creation sites for AST nodes use new (ASTContext&). This is a large patch, but the majority of the changes are just this mechanical adjustment. - The above changes also mean that AST nodes can no longer be deallocated using 'delete'. Instead, one most do StmtObject->Destroy(ASTContext&) or do ASTContextObject.Deallocate(StmtObject) (the latter not running the 'Destroy' method). Along the way I also... - Made CompoundStmt allocate its array of Stmt* using the allocator in ASTContext (previously it used std::vector). There are a whole bunch of other Stmt classes that need to be similarly changed to ensure that all memory allocated for ASTs comes from the allocator in ASTContext. - Added a new smart pointer ExprOwningPtr to Sema.h. This replaces the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used 'delete' to free memory instead of a Stmt's 'Destroy' method. Big thanks to Doug Gregor for helping with the acrobatics of making 'new/delete' private and the new smart pointer ExprOwningPtr! llvm-svn: 63997
-
Ted Kremenek authored
GRExprEngine: When processing compound assignments, do a switch table lookup to get the non-compound opcode from the compound opcode instead of relying on the order of BinaryOperator::opcode values. This unbreaks the misc-ps.c test. llvm-svn: 63991
-
Chris Lattner authored
llvm-svn: 63990
-
Sebastian Redl authored
llvm-svn: 63987
-
Daniel Dunbar authored
non-empty. llvm-svn: 63986
-
Sebastian Redl authored
llvm-svn: 63985
-
Chris Lattner authored
long instead of int. This is because system heaers like to redefine typedefs and that is an error if they don't exactly match. Use long for intptr_t on all systems where long is the right size. llvm-svn: 63984
-
Sebastian Redl authored
llvm-svn: 63983
-
Sebastian Redl authored
llvm-svn: 63982
-
Fariborz Jahanian authored
Now we can say 'hello world' objective-c style in the nonfragile abi. llvm-svn: 63981
-
Chris Lattner authored
don't typecast CHAR_MIN to char, this makes it not a PP constant and gives it the wrong unpromoted type. Thanks to Sebastian for pointing this out! llvm-svn: 63980
-
- Feb 06, 2009
-
-
Chris Lattner authored
llvm-svn: 63977
-
Chris Lattner authored
in a gcc 4.5 compatible way so that stdint.h can follow the compiler's notion of types. llvm-svn: 63976
-
Douglas Gregor authored
llvm-svn: 63975
-
Douglas Gregor authored
redeclarations. For example, checks that a class template redeclaration has the same template parameters as previous declarations. Detangled class-template checking from ActOnTag, whose logic was getting rather convoluted because it tried to handle C, C++, and C++ template semantics in one shot. Made some inroads toward eliminating extraneous "declaration does not declare anything" errors by adding an "error" type specifier. llvm-svn: 63973
-
Ted Kremenek authored
llvm-svn: 63961
-
Fariborz Jahanian authored
llvm-svn: 63959
-
Ted Kremenek authored
ASTContext. This required changing all clients to pass in the ASTContext& to the constructor of StringLiteral. I also changed all allocations of StringLiteral to use new(ASTContext&). Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the allocator from ASTContext& (not complete). llvm-svn: 63958
-
Ted Kremenek authored
Add sub-testcase where we process Cocoa.h using --disable-free (i.e., test the usage of the BumpPtrAllocator in ASTContext). llvm-svn: 63957
-
Daniel Dunbar authored
llvm-svn: 63955
-
Daniel Dunbar authored
-dynamiclib. Re-audited translations to make sure I didn't miss something else. llvm-svn: 63953
-
Daniel Dunbar authored
llvm-svn: 63952
-
Ted Kremenek authored
Added special versions of new[]/delete[] to complement the new/delete which uses ASTContext's allocator. Updated some comments along the way. llvm-svn: 63949
-
Chris Lattner authored
llvm-svn: 63947
-
Chris Lattner authored
llvm-svn: 63945
-
Chris Lattner authored
llvm-svn: 63942
-
Douglas Gregor authored
matching member exists. Thanks to Piotr Rak for reporting the problem! llvm-svn: 63939
-
Zhongxing Xu authored
llvm-svn: 63930
-
Zhongxing Xu authored
llvm-svn: 63929
-
Zhongxing Xu authored
for FieldRegion. This enables us to track more values. Simplify SymbolicRegion::getRValueType(). We assume the symbol always has pointer type. llvm-svn: 63928
-
Chris Lattner authored
diffing the output of: clang -dM -o - -E -x c foo.c | sort llvm-svn: 63926
-
Chris Lattner authored
llvm-svn: 63925
-
Chris Lattner authored
llvm-svn: 63924
-
Chris Lattner authored
llvm-svn: 63922
-
Chris Lattner authored
llvm-svn: 63921
-
Chris Lattner authored
llvm-svn: 63920
-
Chris Lattner authored
predefines buffer initialization. llvm-svn: 63919
-
Chris Lattner authored
Now you too can have a 47 bit long long! llvm-svn: 63918
-
Chris Lattner authored
llvm-svn: 63917
-
Chris Lattner authored
implementing PR3492: #include failures should be a fatal error llvm-svn: 63915
-