summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Waste two bits in every clang::Type so that the type class can be readJohn McCall2010-02-121-1/+1
| | | | | | in a single byte-load rather than some crazy bitmunging operation. llvm-svn: 95964
* When dumping vtables, dump whether a virtual member function is pure or not.Anders Carlsson2010-02-121-1/+9
| | | | llvm-svn: 95963
* More work on the final overriders.Anders Carlsson2010-02-121-10/+130
| | | | llvm-svn: 95954
* Do not ignore anonymous records.Devang Patel2010-02-121-2/+2
| | | | llvm-svn: 95953
* Cache new compile unit.Devang Patel2010-02-121-1/+8
| | | | llvm-svn: 95952
* Handle AST merges of incomplete class types. Douglas Gregor2010-02-121-40/+50
| | | | llvm-svn: 95941
* Implementing unused function warning.Tanya Lattner2010-02-126-0/+53
| | | | llvm-svn: 95940
* Warn about using the new force_align_arg_pointer attribute on a functionCharles Davis2010-02-111-4/+6
| | | | | | | pointer. If you don't like the new warning, you can turn it off with -Wno-force-align-arg-pointer. llvm-svn: 95939
* Fixes a rewriting bug where order of constructor expression arguments did ↵Fariborz Jahanian2010-02-111-15/+28
| | | | | | | | | | not match order of constructor arguments (all block API specific). This was exposed only in a large block literal expression in a large file where PtrSet container size execceded its limit and required reallocation. Fixes radar 7638294 llvm-svn: 95936
* When we have a dependent direct initializer but not a dependentDouglas Gregor2010-02-112-18/+27
| | | | | | | | variable type, we can (and should) still check for completeness of the variable's type. Do so, to work around an assertion that shows up in Boost's shared_ptr. llvm-svn: 95934
* Fix leak in CXXNewExpr where the SubExprs array would get allocated directly ↵Ted Kremenek2010-02-112-6/+17
| | | | | | using 'new[]' instead of the allocator associated with ASTContext. llvm-svn: 95933
* Fix re-allocation in AttrWithString::ReplaceString() to use the allocator ↵Ted Kremenek2010-02-111-1/+1
| | | | | | assosciated with ASTContext. llvm-svn: 95931
* Allocate the SubExprs array in ObjCMessageExpr using the allocator ↵Ted Kremenek2010-02-114-30/+45
| | | | | | associated with ASTContext. This fixes yet another leak (<rdar://problem/7639260>). llvm-svn: 95930
* Stub out the final overriders class.Anders Carlsson2010-02-111-1/+128
| | | | llvm-svn: 95922
* Use getAs instead of cast/dyn_cast on types. (I'm sure Doug will appreciate ↵Anders Carlsson2010-02-111-6/+6
| | | | | | this). llvm-svn: 95911
* Move two functions to the top. No functionality change.Anders Carlsson2010-02-111-77/+77
| | | | llvm-svn: 95908
* Uncomment lines I never meant to have left commented in a commit.Ted Kremenek2010-02-111-3/+3
| | | | llvm-svn: 95906
* When AST merging for record declarations fails, warn about theDouglas Gregor2010-02-112-44/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | incompatibility and show where the structural differences are. For example: struct1.c:36:8: warning: type 'struct S7' has incompatible definitions in different translation units struct S7 { int i : 8; unsigned j : 8; } x7; ^ struct1.c:36:33: note: bit-field 'j' with type 'unsigned int' and length 8 here struct S7 { int i : 8; unsigned j : 8; } x7; ^ struct2.c:33:33: note: bit-field 'j' with type 'unsigned int' and length 16 here struct S7 { int i : 8; unsigned j : 16; } x7; ^ There are a few changes to make this work: - ASTImporter now has only a single Diagnostic object, not multiple diagnostic objects. Otherwise, having a warning/error printed via one Diagnostic and its note printed on the other Diagnostic could cause the note to be suppressed. - Implemented import functionality for IntegerLiteral (along with general support for statements and expressions) llvm-svn: 95900
* More vtable layout dumper improvements. Handle destructors, dump the ↵Anders Carlsson2010-02-115-22/+69
| | | | | | complete function type of the member functions (using PredefinedExpr::ComputeName. llvm-svn: 95887
* Driver: Fix clang -ccc-no-clang -x c++-header foo.h on Darwin.Daniel Dunbar2010-02-111-1/+2
| | | | llvm-svn: 95876
* Keep track of, and dump, vtable address points.Anders Carlsson2010-02-111-2/+33
| | | | llvm-svn: 95874
* Suppress warnings if their instantiation location is in a system header, notJohn McCall2010-02-111-1/+1
| | | | | | | | | | | | | their spelling location. This prevents warnings from being swallowed just because the caret is on the first parenthesis in, say, NULL. This is an experiment; the risk is that there might be a substantial number of system headers which #define symbols to expressions which inherently cause warnings. My theory is that that's rare enough that it can be worked around case-by-case, and that producing useful warnings around NULL is worth it. But I'm willing to accept that I might be empirically wrong. llvm-svn: 95870
* Patch by Cristian Draghici:Ted Kremenek2010-02-111-2/+34
| | | | | | | | | | | | Enhance the printf format string checking when using the format specifier flags ' ', '0', '+' with the 'p' or 's' conversions (since they are nonsensical and undefined). This is similar to GCC's checking. Also warning when a precision is used with the 'p' conversin specifier, since it has no meaning. llvm-svn: 95869
* Check in the beginnings of my new vtable layout builder idea.Anders Carlsson2010-02-112-9/+210
| | | | | | | | Right now, it's off by default but can be tested by passing -fdump-vtable-layouts to clang -cc1. This option will cause all vtables that will normally be emitted as part of codegen to also be dumped using the new layout code. I've also added a very simple new vtable layout test case. llvm-svn: 95865
* Use the allocator associated with ASTContext to allocate the argsTed Kremenek2010-02-113-3/+19
| | | | | | | | array associated with NonNullAttr. This fixes yet another leak when ASTContext uses a BumpPtrAllocator. Fixes: <rdar://problem/7637150> llvm-svn: 95863
* Have ~ASTContext() delete StoredDeclsMap (internal to DeclContext) byTed Kremenek2010-02-112-5/+34
| | | | | | | | | storing the set of StoredDeclsMaps in an internal vector of void*. This isn't an ideal solution, but for the time being this fixes a major memory leak with these DenseMaps not being freed. Fixes: <rdar://problem/7634755> llvm-svn: 95861
* Remove use of 'std::string' from Attr objects, using instead a byteTed Kremenek2010-02-116-31/+56
| | | | | | | | | array allocated using the allocator in ASTContext. This addresses these strings getting leaked when using a BumpPtrAllocator (in ASTContext). Fixes: <rdar://problem/7636765> llvm-svn: 95853
* Driver: Add -rewrite-objc, which is an interface to clang -cc1 -rewrite-objc.Daniel Dunbar2010-02-112-3/+23
| | | | llvm-svn: 95849
* Driver: Fix infinite loop and wrong message on invalid -ccc-clang-arch argument.Daniel Dunbar2010-02-111-4/+2
| | | | llvm-svn: 95848
* Clean up ownership of 'AttributeList' objects in Parser. ApparentlyTed Kremenek2010-02-115-46/+83
| | | | | | | | | | | | | | | | | | | | | we would just leak them all over the place, with no clear ownership of these objects at all. AttributeList objects would get leaked on both error and non-error paths. Note: I introduced the usage of llvm::OwningPtr<AttributeList> to manage these objects, which is particularly useful for methods with multiple return sites. In at least one method I used them even when they weren't strictly necessary because it clarified the ownership semantics and made the code easier to read. Should the excessive 'take()' and 'reset()' calls become a performance issue we can always re-evaluate. Note+1: I believe I have not introduced any double-frees, but it would be nice for someone to review this. This fixes <rdar://problem/7635046>. llvm-svn: 95847
* Strip attributes and 'inline' off the "previous declaration" of aJohn McCall2010-02-111-15/+27
| | | | | | | template explicit specialization. Complete an apparently stalled refactor towards using CheckSpecializationInstantiationRedecl(). llvm-svn: 95845
* Remove another redundant ASTContext parameterDouglas Gregor2010-02-113-4/+5
| | | | llvm-svn: 95843
* Eliminate a bunch of unnecessary ASTContexts from members functions ofDouglas Gregor2010-02-1112-58/+48
| | | | | | Decl subclasses. No functionality change. llvm-svn: 95841
* Diagnose when user provided getter is being used as lvalueFariborz Jahanian2010-02-112-5/+16
| | | | | | using property dot-syntax. Fixes radar 7628953. llvm-svn: 95838
* Eliminate the ASTContext parameter from RecordDecl::getDefinition()Douglas Gregor2010-02-1115-28/+27
| | | | | | | and CXXRecordDecl::getDefinition(); it's totally unnecessary. No functionality change. llvm-svn: 95836
* Allocate 'ObjCMethodList' objects (owned by Sema) using Sema's ↵Ted Kremenek2010-02-112-4/+10
| | | | | | BumpPtrAllocator. Previously they were not getting freed. Fixes <rdar://problem/7635663>. llvm-svn: 95834
* Implement basic AST merging for classes, structs, and unions in C.Douglas Gregor2010-02-111-0/+228
| | | | llvm-svn: 95833
* Generate the objc_read_weak API when callingFariborz Jahanian2010-02-101-1/+16
| | | | | | a __weak block. Fixes radar 7628591. llvm-svn: 95822
* Fix a potential null-pointer use, and fix the style of my new function.Charles Davis2010-02-101-2/+2
| | | | | | Thanks, Anton! llvm-svn: 95821
* Add support for the force_align_arg_pointer attribute. This is an x86-specificCharles Davis2010-02-102-0/+43
| | | | | | | | attribute, so it uses Anton's new target-specific attribute support. It's supposed to ensure that the stack is 16-byte aligned, but since necessary support is lacking from LLVM, this is a no-op for now. llvm-svn: 95820
* hopefully silence a warning on the clang-i386-darwin9 tester.Chris Lattner2010-02-101-1/+1
| | | | llvm-svn: 95812
* Move TypedefDecl importer to match the ordering in DeclNodes. No ↵Douglas Gregor2010-02-101-56/+56
| | | | | | functionality change. llvm-svn: 95805
* Patch to rewrite blocks into unique api names.Fariborz Jahanian2010-02-101-13/+16
| | | | | | Fixes radar 7630551 llvm-svn: 95796
* Implement basic support for merging function declarations acrossDouglas Gregor2010-02-102-38/+188
| | | | | | translation units. llvm-svn: 95794
* Provide rewriting suppport for use of __typeof__Fariborz Jahanian2010-02-101-1/+43
| | | | | | in a declaration statement. Fixes radar 7628153. llvm-svn: 95788
* Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixesDaniel Dunbar2010-02-107-9/+16
| | | | | | | calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling, for Darwin ARM. llvm-svn: 95787
* Refactor code that generates debug info for variables that has BlocksAttr.Devang Patel2010-02-102-245/+129
| | | | llvm-svn: 95786
* clang -cc1: Add -fsjlj-exceptions, which requires far too much button pushing.Daniel Dunbar2010-02-103-0/+6
| | | | llvm-svn: 95785
* Implement AST importing and merging for typedefs. As part of this, provide a ↵Douglas Gregor2010-02-101-14/+84
| | | | | | lame implementation for importing TypeSourceInfos. llvm-svn: 95783
* Teach AST merging that variables with incomplete array types can beDouglas Gregor2010-02-102-2/+31
| | | | | | | | merged with variables of constant array types. Also, make sure that we call DiagnosticClient's BeginSourceFile/EndSourceFile, so that it has a LangOptions to work with. llvm-svn: 95782
OpenPOWER on IntegriCloud