summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Diagnose when base classes and members to be intializedFariborz Jahanian2009-07-233-13/+46
| | | | | | with constructors don't have a matching constructor. llvm-svn: 76913
* Refactor and push the evaluation as late as possible.Mike Stump2009-07-231-105/+54
| | | | llvm-svn: 76911
* Factor out map lookup for CFString constants.Daniel Dunbar2009-07-231-38/+53
| | | | llvm-svn: 76908
* Don't just store the field/bit field info one field, do it for all fields in ↵Anders Carlsson2009-07-231-12/+6
| | | | | | the union. llvm-svn: 76907
* Some cleanups suggested by Daniel.Mike Stump2009-07-231-36/+47
| | | | llvm-svn: 76906
* Implement: <rdar://problem/6335715> rule request: gets() buffer overflowTed Kremenek2009-07-231-2/+64
| | | | llvm-svn: 76905
* Fix another thinko.Anders Carlsson2009-07-231-2/+2
| | | | llvm-svn: 76903
* Add comments.Ted Kremenek2009-07-231-0/+2
| | | | llvm-svn: 76901
* Refine checking and diagnostics for use of floating point variable as a counter.Ted Kremenek2009-07-231-57/+104
| | | | | | | This implements <rdar://problem/6336718> and checks for CERT secure coding advisory FLP30-C. llvm-svn: 76900
* Correct a thinko in bitfield layout code. Fixes PR4611.Anders Carlsson2009-07-231-4/+2
| | | | llvm-svn: 76898
* Simplify, NFC.Daniel Dunbar2009-07-231-8/+7
| | | | llvm-svn: 76897
* Switch the driver back to always using clang-cc by default (for C++, andDaniel Dunbar2009-07-231-4/+3
| | | | | | | | | | | | regardless of the architecture). - This is a good default for development & testing; for example without this any tests using 'clang' in the test suite will fail on PowerPC, since the driver will avoid using clang. - We don't want to actually ship something built this way, but that should be handled via some sort of configuration file. llvm-svn: 76886
* Simplify.Daniel Dunbar2009-07-231-5/+4
| | | | llvm-svn: 76885
* We don't need to keep track of the packed alignment, just whether the struct ↵Anders Carlsson2009-07-232-20/+13
| | | | | | is packed or not. Fixes PR4610. llvm-svn: 76884
* Move the LLVM field number for bit fields into the BitFieldInfo structure, ↵Anders Carlsson2009-07-236-41/+46
| | | | | | since it's meaning is completely different than for non-bit fields. llvm-svn: 76882
* Clean up the ActOnTag action, so that there is only a single entryDouglas Gregor2009-07-236-12/+14
| | | | | | | | | point that covers templates and non-templates. This should eliminate the flood of warnings I introduced yesterday. Removed the ActOnClassTemplate action, which is no longer used. llvm-svn: 76881
* Unbreak the CMake buildDouglas Gregor2009-07-231-0/+1
| | | | llvm-svn: 76878
* Add two nodes to the call graph:Zhongxing Xu2009-07-231-0/+12
| | | | | | | - Root is the main function or 0. - ExternalCallingNode has edges to all external functions. llvm-svn: 76876
* Add template specializations to view the call graph in dot format.Zhongxing Xu2009-07-231-0/+21
| | | | | | | - change the DenseMap used in callgraph to std::map, since DenseMap cannot be used with mapped_iterator and friends. llvm-svn: 76874
* constify methods.Zhongxing Xu2009-07-231-1/+1
| | | | llvm-svn: 76873
* Shield clang from LLVM API changes, until the dust settles.Daniel Dunbar2009-07-231-1/+3
| | | | llvm-svn: 76862
* Use llvm::BitVector instead of managing memory by hand.Daniel Dunbar2009-07-231-3/+4
| | | | | | | - As it happens, this also fixes a use-of-uninitialized memory that was causing non-deterministic test failures. llvm-svn: 76857
* Set field info for unions.Anders Carlsson2009-07-231-1/+11
| | | | llvm-svn: 76856
* Use arrays as union padding. Also, since the resulting struct will always ↵Anders Carlsson2009-07-231-7/+10
| | | | | | contain a single element and either a single i8 element or an array of i8s, there's no reason to use a packed struct. llvm-svn: 76854
* Revert r76831, there are many Analyzer test failures on multiple platforms.Daniel Dunbar2009-07-231-16/+3
| | | | | | | | --- Reverse-merging r76831 into '.': U include/clang/Analysis/PathSensitive/GRExprEngine.h U lib/Analysis/GRExprEngine.cpp llvm-svn: 76851
* Handle zero width bit fields in unions correctly (by ignoring them).Anders Carlsson2009-07-231-0/+9
| | | | llvm-svn: 76847
* Implement union layout support.Anders Carlsson2009-07-232-5/+48
| | | | llvm-svn: 76846
* Check in CGRecordLayoutBuilder which is a reimplementation of the record ↵Anders Carlsson2009-07-234-12/+423
| | | | | | layout code. (Yay, no more packed structs unless absolutely necessary). We currently don't use the layouts being built but that will change when the new code is mature enough :) llvm-svn: 76845
* These IRgen improvements have been done.Daniel Dunbar2009-07-231-18/+0
| | | | | | | Technically we could still do a bit more to avoid deferred generation of statics which we know are used, but I seriously doubt this is important. llvm-svn: 76844
* Add initial implementation of checking for uses of floating point as a loop ↵Ted Kremenek2009-07-233-0/+128
| | | | | | counter. llvm-svn: 76833
* Add 'previsit' Checker pass for ObjCMessageExprs.Ted Kremenek2009-07-231-3/+16
| | | | llvm-svn: 76831
* Remove a bunch of FIXME's related to ObjC type checking.Steve Naroff2009-07-236-242/+210
| | | | | | | | - Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext. - Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible(). - Tweak several test cases to accommodate the new/improved type checking. llvm-svn: 76830
* Add constructor used to initialize base/member inFariborz Jahanian2009-07-232-8/+44
| | | | | | | CXXBaseOrMemberInitializer AST node. Needed by its clients to do the initialization. llvm-svn: 76826
* Fix case, apparently some people still build on case sensitiveMike Stump2009-07-231-1/+1
| | | | | | filesystems. llvm-svn: 76824
* Add warning for falling off the end of a function that should return aMike Stump2009-07-222-1/+122
| | | | | | | | | | | | | | | | | | | | | value. This is on by default, and controlled by -Wreturn-type (-Wmost -Wall). I believe there should be very few false positives, though the most interesting case would be: int() { bar(); } when bar does: bar() { while (1) ; } Here, we assume functions return, unless they are marked with the noreturn attribute. I can envision a fixit note for functions that never return normally that don't have a noreturn attribute to add a noreturn attribute. If anyone spots other false positives, let me know! llvm-svn: 76821
* Implement support for out-of-line definitions of the class members of classDouglas Gregor2009-07-226-22/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | templates, e.g., template<typename T> struct Outer { struct Inner; }; template<typename T> struct Outer<T>::Inner { // ... }; Implementing this feature required some extensions to ActOnTag, which now takes a set of template parameter lists, and is the precursor to removing the ActOnClassTemplate function from the parser Action interface. The reason for this approach is simple: the parser cannot tell the difference between a class template definition and the definition of a member of a class template; both have template parameter lists, and semantic analysis determines what that template parameter list means. There is still some cleanup to do with ActOnTag and ActOnClassTemplate. This commit provides the basic functionality we need, however. llvm-svn: 76820
* Fix test breakage.Eli Friedman2009-07-221-0/+2
| | | | llvm-svn: 76816
* Improve CFG support for C++ throw expressions.Mike Stump2009-07-221-0/+21
| | | | llvm-svn: 76814
* Refactor 'PostStmt' and 'PreStmt' to subclass a common parent 'StmtPoint'.Ted Kremenek2009-07-228-67/+73
| | | | | | | | | | | | Educate GRExprEngine::VisitGraph() about 'PreStmt'. Mark the constructor of 'PostStmt' to be explicit, preventing implicit conversions and the selection of the wrong 'generateNode' method in GRStmtNodeBuilder. Constify a bunch of arguments, which falls out of the changes to ProgramPoint. llvm-svn: 76809
* Slight code reorganization to allow instantiating post-inc/dec.Eli Friedman2009-07-221-9/+5
| | | | llvm-svn: 76807
* Calls to Sema::MatchTemplateParametersToScopeSpecifier should not depend on ↵Douglas Gregor2009-07-221-2/+5
| | | | | | the order of evaluation of their arguments to be correct. llvm-svn: 76804
* Migrate the path-sensitive checking of 'nonnull' arguments over to the newTed Kremenek2009-07-221-31/+63
| | | | | | | | | 'Checker' interface. An updated test case illustrates that after calling a function with the 'nonnull' attribute we now register the fact that the passed pointer must be non-null. This retention of information was not possible with the previously used GRSimpleAPICheck interface. llvm-svn: 76797
* Fix the parsing of default arguments for inline member function Eli Friedman2009-07-222-29/+36
| | | | | | | | definitions. I'm not very familiar with this code, so please review. llvm-svn: 76796
* Make 'SaveAndRestore' and friends reusable classes in libAnalysis.Ted Kremenek2009-07-221-12/+1
| | | | llvm-svn: 76795
* Add support for registering 'Checker' objects with GRExprEngine.Ted Kremenek2009-07-221-5/+48
| | | | | | Add a 'previsit' stage (that dispatches to registered Checkers) when evaluating the effects of CallExprs. llvm-svn: 76794
* Add support for 'PreStmt' program points to GRCoreEngine and GRStmtNodeBuilder.Ted Kremenek2009-07-221-2/+5
| | | | llvm-svn: 76792
* Fix the problems with template argument deduction and array types forDouglas Gregor2009-07-221-8/+65
| | | | | | | | real. It turns out that we need to actually move all of the qualifiers up to the array type itself, then recanonicalize the deduced template argument type. llvm-svn: 76788
* Fix some memory allocation/deallocation issuesDouglas Gregor2009-07-223-6/+6
| | | | llvm-svn: 76783
* Fix a nasty little use-after-free bug.Eli Friedman2009-07-221-2/+4
| | | | llvm-svn: 76779
* Canonicalize the types produced by template argument deduction.Douglas Gregor2009-07-221-1/+2
| | | | llvm-svn: 76777
OpenPOWER on IntegriCloud