summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove use of ObjCObjectRegion from BasicStoreManager.Ted Kremenek2009-12-161-9/+5
| | | | llvm-svn: 91553
* Fix test case to unbreak testingDouglas Gregor2009-12-161-2/+2
| | | | llvm-svn: 91551
* When value-initializing a class with no user-defined constructors butDouglas Gregor2009-12-1611-37/+112
| | | | | | | with a non-trivial default constructor, zero-initialize the storage and then call the default constructor. Fixes PR5800. llvm-svn: 91548
* Compute the right extension for preprocessed Objective-C++ files.Ted Kremenek2009-12-161-1/+1
| | | | llvm-svn: 91547
* Diagnose property of reference type as unsupportedFariborz Jahanian2009-12-163-6/+9
| | | | | | instead of crashing for now. llvm-svn: 91546
* Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one.Anders Carlsson2009-12-164-6/+31
| | | | llvm-svn: 91545
* implement PR5654: add -fassume-sane-operator-new, which is enabled by ↵Nuno Lopes2009-12-1611-7/+56
| | | | | | | | default, and adds the malloc attribute to the global function new() and to the overloaded new operators. feel free to chage the name to this lengthy argument llvm-svn: 91543
* In Sema::CheckInitializerTypes, replace a use of CheckReferenceInit with an ↵Douglas Gregor2009-12-164-8/+14
| | | | | | InitializationSequence llvm-svn: 91542
* Update C++ status page to reflect realityDouglas Gregor2009-12-161-58/+58
| | | | llvm-svn: 91541
* fix PR5689: add support for 'o' and 'V' asm input operandsNuno Lopes2009-12-161-0/+2
| | | | llvm-svn: 91540
* fix buildNuno Lopes2009-12-161-1/+1
| | | | llvm-svn: 91539
* Shift things around so that it's easier to recover from a missingJohn McCall2009-12-166-264/+197
| | | | | | | | | function in a C++ call using an arbitrary call-expression type. Actually exploit this to fix the recovery implemented earlier. The diagnostic is still iffy, though. llvm-svn: 91538
* Fix pretty stack traces.Daniel Dunbar2009-12-161-2/+0
| | | | llvm-svn: 91537
* Add a new kind of region: CXXObjectRegion. Currently it has only one Zhongxing Xu2009-12-167-25/+102
| | | | | | | | attribute: the object type. Add initial support for visiting CXXThisExpr. Fix a bunch of 80-col violations. llvm-svn: 91535
* Introduce a centralized routine in Sema for diagnosing failed lookups (whenJohn McCall2009-12-1615-25/+148
| | | | | | | | | used as expressions). In dependent contexts, try to recover by doing a lookup in previously-dependent base classes. We get better diagnostics out, but unfortunately the recovery fails: we need to turn it into a method call expression, not a bare call expression. Thus this is still a WIP. llvm-svn: 91525
* Use GetAddrOfRTTI everywhere and remove GenerateRTTI and GenerateRTTIRef. ↵Anders Carlsson2009-12-165-39/+9
| | | | | | With this change, we can now compile and link TableGen. llvm-svn: 91520
* Handle ImplicitValueInitExpr in AggExprEmitter.Anders Carlsson2009-12-162-2/+14
| | | | llvm-svn: 91519
* remove dead code.Zhongxing Xu2009-12-161-3/+0
| | | | llvm-svn: 91517
* Eliminate Sema::CheckValueInitialization; its callers now useDouglas Gregor2009-12-163-110/+181
| | | | | | | | | | | | | | InitializationSequence to perform the actual initialization. Also, introduced the notion of a tree of initialized entities, so that we can know where an initialization began when dealing with nested initializations (as occur when performing list initialization). This will, eventually, be useful for producing better diagnostics when list initialization fails, because we can show the path from the top-level object being initialized down to the actual subobject where initialization failed. llvm-svn: 91516
* Add abort() as a builtin. This has two effects: one, we warn for incorrect Eli Friedman2009-12-165-0/+6
| | | | | | | | declarations of abort(), and two, we mark it noreturn. Missing the latter shows up in one of the "embarassing" tests (from the thread on llvmdev "detailed comparison of generated code size for LLVM and other compilers"). llvm-svn: 91515
* More FullExpr work.Anders Carlsson2009-12-161-45/+53
| | | | llvm-svn: 91514
* More work on the FullExpr class.Anders Carlsson2009-12-163-23/+69
| | | | llvm-svn: 91513
* Teach RetainSummaryManager::getSummary(FunctionDecl* FD) that ↵Ted Kremenek2009-12-161-1/+5
| | | | | | 'FD->getIdentifier()' will not always return a non-null IdentifierInfo*. llvm-svn: 91512
* Teach OSAtomicChecker that a FunctionDecl's name isn't always a simple ↵Ted Kremenek2009-12-161-3/+7
| | | | | | IdentifierInfo*. llvm-svn: 91511
* Teach NoReturnFunctionChecker that FunctionDecl::getIdentifier() is not ↵Ted Kremenek2009-12-161-3/+2
| | | | | | guaranteed to return a non-null IdentifierInfo*. llvm-svn: 91510
* Teach CheckerVisitor about CXXOperatorCallExpr.Ted Kremenek2009-12-162-19/+28
| | | | llvm-svn: 91509
* Teach CFRecStmtDeclVisitor about CXXMethodDecl.Ted Kremenek2009-12-161-0/+3
| | | | llvm-svn: 91508
* Mangle CXXOperatorCallExprs, fixes PR5796.Anders Carlsson2009-12-162-0/+26
| | | | llvm-svn: 91507
* Expose C++ methods to GRExprEngine.Zhongxing Xu2009-12-161-0/+14
| | | | llvm-svn: 91506
* Add logic for computing preprocessor file extensions for C++ files.Ted Kremenek2009-12-161-0/+2
| | | | llvm-svn: 91505
* Make GRSubEngine.h standaloneDouglas Gregor2009-12-161-0/+1
| | | | llvm-svn: 91504
* Fix semantic diagnostics that embed English works, from Nicola Gigante!Douglas Gregor2009-12-1610-86/+110
| | | | llvm-svn: 91503
* Refine a little. WIP.Mike Stump2009-12-161-3/+3
| | | | llvm-svn: 91502
* Add (initial?) static analyzer support for handling C++ references.Ted Kremenek2009-12-1613-141/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change was a lot bigger than I originally anticipated; among other things it requires us storing more information in the CFG to record what block-level expressions need to be evaluated as lvalues. The big change is that CFGBlocks no longer contain Stmt*'s by CFGElements. Currently CFGElements just wrap Stmt*, but they also store a bit indicating whether the block-level expression should be evalauted as an lvalue. DeclStmts involving the initialization of a reference require us treating the initialization expression as an lvalue, even though that information isn't recorded in the AST. Conceptually this change isn't that complicated, but it required bubbling up the data through the CFGBuilder, to GRCoreEngine, and eventually to GRExprEngine. The addition of CFGElement is also useful for when we want to handle more control-flow constructs or other data we want to keep in the CFG that isn't represented well with just a block of statements. In GRExprEngine, this patch introduces logic for evaluating the lvalues of references, which currently retrieves the internal "pointer value" that the reference represents. EvalLoad does a two stage load to catch null dereferences involving an invalid reference (although this could possibly be caught earlier during the initialization of a reference). Symbols are currently symbolicated using the reference type, instead of a pointer type, and special handling is required creating ElementRegions that layer on SymbolicRegions (see the changes to RegionStoreManager). Along the way, the DeadStoresChecker also silences warnings involving dead stores to references. This was the original change I introduced (which I wrote test cases for) that I realized caused GRExprEngine to crash. llvm-svn: 91501
* Add some documentation for recent checkins. WIP.Mike Stump2009-12-161-0/+4
| | | | llvm-svn: 91500
* Add an addition check for undefined behavior for when we hit aMike Stump2009-12-161-0/+2
| | | | | | __builtin_unreachable. WIP. llvm-svn: 91499
* Implement additional undefined checks for additional loads and stores. WIP.Mike Stump2009-12-163-4/+49
| | | | llvm-svn: 91498
* Check in a rudimentary FullExpr class that isn't used anywhere yet. Rename ↵Anders Carlsson2009-12-1611-16/+136
| | | | | | Action::FullExpr to Action::MakeFullExpr to avoid name clashes. llvm-svn: 91494
* Successive anonymous namespaces name the same scope. I misinterpreted theJohn McCall2009-12-163-16/+77
| | | | | | standard the last time. Fixes PR5766. llvm-svn: 91493
* Switch the C++ new expression over to InitializationSequence, ratherDouglas Gregor2009-12-1614-126/+254
| | | | | | | | | | | | | | | | | | | | | than using its own partial implementation of initialization. Switched CheckInitializerTypes over to InitializedEntity/InitializationKind, to help move us closer to InitializationSequence. Added InitializedEntity::getName() to retrieve the name of the entity, for diagnostics that care about such things. Implemented support for default initialization in InitializationSequence. Clean up the determination of the "source expressions" for an initialization sequence in InitializationSequence::Perform. Taught CXXConstructExpr to store more location information. llvm-svn: 91492
* Diagnose attempting to assign to a sub-structure of an ivarFariborz Jahanian2009-12-155-6/+43
| | | | | | using objective-c property. (fixes radar 7449707) llvm-svn: 91474
* Remove ValueManager::getRegionValueSymbolValOrUnknown(). It was just extra ↵Ted Kremenek2009-12-152-14/+6
| | | | | | veneer on top of getRegionValueSymbolVal(). llvm-svn: 91471
* Link up member-class redeclarations during template instantiation.John McCall2009-12-152-0/+20
| | | | | | This test courtesy of LLVM. llvm-svn: 91462
* Update tests to use %clang instead of 'clang', and forcibly disable use of 'Daniel Dunbar2009-12-1577-174/+183
| | | | | | | clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to garbage). llvm-svn: 91460
* Fixes a code gen bug related to accessing a nowFariborz Jahanian2009-12-153-1/+13
| | | | | | | | | non-existing 'isa' field of a non-existing struct type all related to legacy type definition for 'id' which we have dropped in clang in favor of a built-in type. (fixes radar 7470820). llvm-svn: 91455
* ShouldDestroyTemporaries? I don't think so.Anders Carlsson2009-12-1511-53/+22
| | | | llvm-svn: 91450
* enable reuse of MacroArgs objects. This is a small (2.5%) win Chris Lattner2009-12-151-10/+32
| | | | | | | | | | on PR5610 (2.185 -> 2.130s). The big issue is that this is making insanely huge macro argument lists with over a million tokens in it. The reason that mallco and free are so expensive is that we are actually going to the kernel to get it, and switching to a bump pointer allocator won't change this in an interesting way. llvm-svn: 91449
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151814-2250/+2251
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* If a ParmVarDecl's default argument is a CXXExprWithTemporaries, return the ↵Anders Carlsson2009-12-153-27/+41
| | | | | | underlying expr instead. Add getNumDefaultArgTemporaries and getDefaultArgTemporary which returns the temporaries a default arg creates. llvm-svn: 91439
* Support OpenCL 1.1 odd-length vector component accessors.Nate Begeman2009-12-153-13/+6
| | | | | | | For hi/odd of an odd-length vector, the last component is undefined. Since we shuffle with an undef vector, no CodeGen needs to change to support this. llvm-svn: 91437
OpenPOWER on IntegriCloud