summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Revert r107828 and r107827, the fix for PR7556, which seems to beDouglas Gregor2010-07-0718-63/+69
| | | | | | breaking bootstrap on Linux. llvm-svn: 107837
* fix PR4499, patch by Kyle Dean!Chris Lattner2010-07-071-24/+16
| | | | llvm-svn: 107836
* Rip out the C++0x-specific handling of destructor names. The specification ↵Sebastian Redl2010-07-071-45/+25
| | | | | | is still in flux and unclear, and our interim workaround was broken. Fixes PR7467. llvm-svn: 107835
* A using declaration can redeclare a typedef to the same type. TheseDouglas Gregor2010-07-071-2/+25
| | | | | | | | typedefs won't have the same canonical declaration (since they are distinct), so we need to check for this case specifically. Fixes <rdar://problem/8018262>. llvm-svn: 107833
* Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect itsDouglas Gregor2010-07-0716-36/+36
| | | | | | newly-narrowed scope. No functionality change. llvm-svn: 107828
* Do not use CXXZeroValueInitExpr for class types. Instead, useDouglas Gregor2010-07-074-33/+27
| | | | | | | | | CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as appropriate. Fixes PR7556, and provides a slide codegen improvement when copy-initializing a POD class type from a value-initialized temporary. Previously, we weren't eliding the copy. llvm-svn: 107827
* Fix an issue with opencl init list checking.Nate Begeman2010-07-071-2/+7
| | | | llvm-svn: 107824
* When printing statistics for the ASTContext, also print them for its ↵Douglas Gregor2010-07-071-0/+3
| | | | | | BumpPtrAllocator llvm-svn: 107790
* add driver support for minix, patch by Kees van ReeuwijkChris Lattner2010-07-079-29/+322
| | | | | | from PR7583 llvm-svn: 107788
* Fix broken reading of NestedNameSpecifiers from PCH.Argyrios Kyrtzidis2010-07-071-1/+1
| | | | llvm-svn: 107784
* Delay passing InterestingDecls to the Consumer until when we know we are not ↵Argyrios Kyrtzidis2010-07-072-16/+22
| | | | | | | | in recursive loading and the declarations are fully initialized. llvm-svn: 107783
* getBody() -> hasBody()Argyrios Kyrtzidis2010-07-071-1/+1
| | | | llvm-svn: 107773
* Simplify code and remove comment that is no longer relevant.Argyrios Kyrtzidis2010-07-071-9/+2
| | | | llvm-svn: 107772
* Remove Decl::getCompoundBody().Argyrios Kyrtzidis2010-07-073-6/+2
| | | | | | | | This has 2 (slight) advantages: -Make explicit at getBody()'s callsite that we expect/handle only CompoundStmt and not CXXTryStmt. -Better tracking of Decl::getBody()'s callsites. llvm-svn: 107771
* Simplify code. CompoundStmt's RBraceLoc can be found using its SourceRange too.Argyrios Kyrtzidis2010-07-071-8/+4
| | | | llvm-svn: 107770
* Simplify code. FunctionDecl and ObjCMethodDecl have some common interfaces.Argyrios Kyrtzidis2010-07-071-15/+4
| | | | llvm-svn: 107769
* Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead ↵Argyrios Kyrtzidis2010-07-0716-36/+56
| | | | | | | | of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH. Makes de-serialization of the function body even more "lazier". llvm-svn: 107768
* Add memcmp() and bcmp() to CStringChecker. These check for valid access to ↵Jordy Rose2010-07-071-0/+66
| | | | | | the buffer arguments and have a special-case for when the buffer arguments are known to be the same address, or when the size is zero. llvm-svn: 107761
* Cleanup on CStringChecker and its associated tests. Also check for null ↵Jordy Rose2010-07-071-8/+77
| | | | | | arguments...which are allowed if the access length is 0! llvm-svn: 107759
* Teach function-try-blocks on constructors and destructors to implicitlyJohn McCall2010-07-073-18/+24
| | | | | | rethrow. Fixes rdar://problem/7696603 llvm-svn: 107757
* implement PR7569, warning about assignment to null, which Chris Lattner2010-07-071-0/+17
| | | | | | | | people seem to write when they want a deterministic trap. Suggest instead that they use a volatile pointer or __builtin_trap. llvm-svn: 107756
* Don't consider casted non-global pointers to be evaluatable.John McCall2010-07-071-0/+2
| | | | | | Fixes rdar://problem/8154689 llvm-svn: 107755
* Change explicit handling of impossible condition to call llvm_unreachable in ↵Tom Care2010-07-071-2/+2
| | | | | | IdempotentOperationChecker::PreVisitBinaryOperator. llvm-svn: 107748
* Silence an annoying GCC warning about use of an uninitialized variable. EvenChandler Carruth2010-07-071-1/+1
| | | | | | | making the other switch case unreachable, or sinking the 'continue' into it doesn't silence this. llvm-svn: 107745
* Use 'llvm_unreachable' to mark impossible code paths so that GCC doesn'tChandler Carruth2010-07-071-1/+2
| | | | | | consider them for warnings. llvm-svn: 107741
* Provide a hook for the benefit of clients using clang IR gen as a subroutine:John McCall2010-07-064-0/+80
| | | | | | | | | | | | emit metadata associating allocas and global values with a Decl*. This feature is controlled by an option that (intentionally) cannot be enabled on the command line. To use this feature, simply set CodeGenOptions.EmitDeclMetadata = true; and then interpret the completely underspecified metadata. :) llvm-svn: 107739
* Fix casts in RegionStore to not always assume that bindings are only to ↵Ted Kremenek2010-07-061-4/+4
| | | | | | | | SubRegions. Fixes assertion failure reported in PR 7572. llvm-svn: 107738
* Implement dumpToStream() for NonStaticGlobalSpaceRegion and ↵Ted Kremenek2010-07-061-1/+8
| | | | | | StaticGlobalSpaceRegion. llvm-svn: 107731
* Add comment noting VLASizeChecker's duty in defining a VLA's extent.Jordy Rose2010-07-061-0/+6
| | | | llvm-svn: 107728
* Add a new path-sensitive checker for functions in <string.h>, for both ↵Jordy Rose2010-07-064-0/+361
| | | | | | null-terminated strings and memory blocks. Currently only checks memcpy(), memmove(), and bcopy(), but this is intended to be expanded soon. llvm-svn: 107722
* Sort CMake file.Ted Kremenek2010-07-061-9/+9
| | | | llvm-svn: 107709
* Added a path-sensitive idempotent operation checker ↵Tom Care2010-07-067-69/+470
| | | | | | | | | | | | | | | | | | | (-analyzer-idempotent-operation). Finds idempotent and/or tautological operations in a path sensitive context, flagging operations that have no effect or a predictable effect. Example: { int a = 1; int b = 5; int c = b / a; // a is 1 on all paths } - New IdempotentOperationChecker class - Moved recursive Stmt functions in r107675 to IdempotentOperationChecker - Minor refactoring of SVal to allow checking for any integer - Added command line option for check - Added basic test cases llvm-svn: 107706
* Fix multiple emission of the this-> fixit for each instantiation by fixing theNick Lewycky2010-07-063-5/+38
| | | | | | AST during the instantiation. Fixes PR7417! llvm-svn: 107690
* Make CGBuilderTy a typedef again; its functionality has been rolled backJohn McCall2010-07-061-49/+2
| | | | | | into IRBuilder. llvm-svn: 107687
* Improve the accuracy of getSourceRange() for DeclaratorDecl andDouglas Gregor2010-07-061-5/+24
| | | | | | | TagDecl subclasses when out-of-line template declaration information is available, from Peter Collingbourne! llvm-svn: 107686
* Correctly set the location of the "template" keyword for a classDouglas Gregor2010-07-061-1/+2
| | | | | | template specialization, from Peter Collingbourne. llvm-svn: 107682
* Remove my egregious hack that forced deserialization of visibleDouglas Gregor2010-07-061-31/+0
| | | | | | | | declarations when implicitly declaring the default constructor, copy constructor, destructor, and copy-assignment operators of a class. Argiris fixed the underlying problem in r107596. llvm-svn: 107681
* Pacify versions of gcc that think these variables may be usedDuncan Sands2010-07-061-3/+3
| | | | | | | uninitialized (which doesn't seem to be the case), by giving them arbitrary initial values. llvm-svn: 107679
* When destroying a cleanup, kill any references to instructions in the entryJohn McCall2010-07-061-0/+6
| | | | | | | | block before deleting it. Fixes PR7575. This really just a short-term fix before implementing lazy cleanups. llvm-svn: 107676
* Added several helper functions to Stmt to recursively check for different ↵Tom Care2010-07-061-0/+66
| | | | | | elements (macros, enum constants, etc). llvm-svn: 107675
* Read/write function template specializations for PCH, properly this time.Argyrios Kyrtzidis2010-07-062-6/+12
| | | | llvm-svn: 107665
* Add to PCH missing Sema information about VTable uses and dynamic classes.Argyrios Kyrtzidis2010-07-062-0/+58
| | | | llvm-svn: 107664
* Allow a CXXRecordDecl to get a DefinitionData pointer even when its owner is ↵Argyrios Kyrtzidis2010-07-062-87/+118
| | | | | | still initializing. llvm-svn: 107663
* Read/write instantiated-from-member of EnumDecl for PCH.Argyrios Kyrtzidis2010-07-062-2/+3
| | | | llvm-svn: 107662
* Add an assertion.Zhongxing Xu2010-07-061-0/+3
| | | | llvm-svn: 107645
* Collect function definitions in the Indexer when indexing through the ASTs.Zhongxing Xu2010-07-063-17/+64
| | | | | | Add an API to get an Entity associated with a name in the global namespace. llvm-svn: 107642
* When creating functions to run global initializers and destructors, mark themJohn McCall2010-07-061-0/+3
| | | | | | as nounwind in -fno-exceptions. Fixes rdar://problem/8090834. llvm-svn: 107639
* Remove the now-unused GRState::isEqual method. Instead of asking if an ↵Jordy Rose2010-07-061-25/+0
| | | | | | expression equals a certain value, use SValuator::EvalEQ and GRState::Assume to see if it can, must, or must not equal that value. llvm-svn: 107638
* Improve NULL-checking for CFRetain/CFRelease. We now remember that the ↵Jordy Rose2010-07-062-44/+52
| | | | | | argument was non-NULL, and we report where the null assumption came from (like AttrNonNullChecker already did). llvm-svn: 107633
* Validated by nightly-test runs on x86 and x86-64 darwin, including afterJohn McCall2010-07-0618-1794/+2964
| | | | | | | | | | | | | | | | | | | | | | | | self-host. Hopefully these results hold up on different platforms. I tried to keep the GNU ObjC runtime happy, but it's hard for me to test. Reimplement how clang generates IR for exceptions. Instead of creating new invoke destinations which sequentially chain to the previous destination, push a more semantic representation of *why* we need the cleanup/catch/filter behavior, then collect that information into a single landing pad upon request. Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional control flow) are generated, since it's actually fairly closely tied in with the former. Remove the need to track which cleanup scope a block is associated with. Document a lot of previously poorly-understood (by me, at least) behavior. The new framework implements the Horrible Hack (tm), which requires every landing pad to have a catch-all so that inlining will work. Clang no longer requires the Horrible Hack just to make exceptions flow correctly within a function, however. The HH is an unfortunate requirement of LLVM's EH IR. llvm-svn: 107631
OpenPOWER on IntegriCloud