summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* MDNodes that refer to an instruction are local to a function; in that case, ↵Victor Hernandez2009-12-162-5/+16
| | | | | | explicitly keep track of the function they are local to llvm-svn: 91497
* Add encoding bits for some Thumb instructions. Plus explicitly set the top twoJohnny Chen2009-12-163-10/+18
| | | | | | bytes of Inst to 0x0000 for the benefit of the Thumb decoder. llvm-svn: 91496
* XFAIL on ppc-darwin.Devang Patel2009-12-161-1/+1
| | | | llvm-svn: 91495
* 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
* Re-enable 91381 with fixes.Evan Cheng2009-12-164-13/+40
| | | | llvm-svn: 91489
* revert my strstr optimization, I'm told it breaks x86-64 bootstrap.Chris Lattner2009-12-162-123/+9
| | | | | | Will reapply with a fix when I get a chance. llvm-svn: 91486
* Do better with physical reg operands (typically, from inline asm)Dale Johannesen2009-12-163-18/+92
| | | | | | | | | | | | | | | | | | in local register allocator. If a reg-reg copy has a phys reg input and a virt reg output, and this is the last use of the phys reg, assign the phys reg to the virt reg. If a reg-reg copy has a phys reg output and we need to reload its spilled input, reload it directly into the phys reg than passing it through another reg. Following 76208, there is sometimes no dependency between the def of a phys reg and its use; this creates a window where that phys reg can be used for spilling (this is true in linear scan also). This is bad and needs to be fixed a better way, although 76208 works too well in practice to be reverted. However, there should normally be no spilling within inline asm blocks. The patch here goes a long way towards making this actually be true. llvm-svn: 91485
* Every anonymous namespace is different. Caught by clang++.John McCall2009-12-161-4/+0
| | | | llvm-svn: 91481
* Explicit template instantiations must happen in the template's immediatelyJohn McCall2009-12-162-0/+4
| | | | | | enclosing namespace. Caught by clang++. llvm-svn: 91480
* Helpful comment added. Some code cleanup. No functional change.Bill Wendling2009-12-161-11/+27
| | | | llvm-svn: 91479
* Initialize uninitialized variables.Bill Wendling2009-12-161-1/+1
| | | | llvm-svn: 91477
* Initialize uninitialized variables.Bill Wendling2009-12-161-1/+1
| | | | llvm-svn: 91475
* 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
* Change indirect-globals to use a dedicated allocIndirectGV. This lets usJeffrey Yasskin2009-12-157-108/+85
| | | | | | | | | remove start/finishGVStub and the BufferState helper class from the MachineCodeEmitter interface. It has the side-effect of not setting the indirect global writable and then executable on ARM, but that shouldn't be necessary. llvm-svn: 91464
* Some command lines don't like numbers with leading zeros. Remove them.Bill Wendling2009-12-151-1/+5
| | | | llvm-svn: 91463
* 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
* Reapply 91184 with fixes and an addition to the testcase to cover the problemBob Wilson2009-12-152-404/+513
| | | | | | | | | | found last time. Instead of trying to modify the IR while iterating over it, I've change it to keep a list of WeakVH references to dead instructions, and then delete those instructions later. I also added some special case code to detect and handle the situation when both operands of a memcpy intrinsic are referencing the same alloca. llvm-svn: 91459
* lit: Improve error when gtest discovery fails.Daniel Dunbar2009-12-151-3/+8
| | | | llvm-svn: 91458
* 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
* Revert 90628, which was incorrect.Dan Gohman2009-12-152-8/+10
| | | | llvm-svn: 91448
* 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
* Fix GetConstantStringInfo to not look into MDString (it works on Chris Lattner2009-12-152-15/+7
| | | | | | | real data, not metadata) and fix DbgInfoPrinter to not abuse GetConstantStringInfo. llvm-svn: 91444
* whitespaceJim Grosbach2009-12-151-26/+26
| | | | llvm-svn: 91442
* Add support to emit debug info for C++ namespaces.Devang Patel2009-12-155-23/+128
| | | | llvm-svn: 91440
* 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
* optimize strstr, PR5783Chris Lattner2009-12-152-9/+123
| | | | llvm-svn: 91438
OpenPOWER on IntegriCloud