summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Improve access control diagnostics. Perform access control on member-pointerJohn McCall2010-02-108-293/+555
| | | | | | | conversions. Fix an access-control bug where privileges were not considered at intermediate points along the inheritance path. Prepare for friends. llvm-svn: 95775
* Convert tabs to spaces.Ted Kremenek2010-02-101-12/+12
| | | | llvm-svn: 95756
* Add comment.Zhongxing Xu2010-02-101-1/+2
| | | | llvm-svn: 95755
* Comment out category's property decls. in rewrite.Fariborz Jahanian2010-02-101-0/+4
| | | | | | Fixes radar 7630636. llvm-svn: 95744
* Use current location as the location of compiler generated arguments, e.g. ↵Devang Patel2010-02-101-8/+10
| | | | | | self, _cmd etc. llvm-svn: 95743
* Reverse a partial fix patch for radar 7214820. It broke some code andFariborz Jahanian2010-02-101-16/+3
| | | | | | I don't have time to refix it for now. llvm-svn: 95733
* Implement basic support for importing source locations from one ASTDouglas Gregor2010-02-102-8/+66
| | | | | | | | | | | | | | | | | | | | | | | | | into another AST, including their include history. Here's an example error that involves a conflict merging a variable with different types in two translation units (diagnosed in the third AST context into which everything is merged). /Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var2.c:3:5: error: external variable 'x2' declared with incompatible types in different translation units ('int' vs. 'double') int x2; ^ In file included from /Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.c:3: /Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.h:1:8: note: declared here with type 'double' double x2; ^ Although we maintain include history, we do not maintain macro instantiation history across a merge. Instead, we map down to the spelling location (for now!). llvm-svn: 95732
* Complain about types and declarations that we don't know how to import.Douglas Gregor2010-02-091-0/+14
| | | | llvm-svn: 95706
* Hook up the diagnostics-argument printer when merging AST files, soDouglas Gregor2010-02-091-5/+10
| | | | | | | | | | | that we get readable diagnostics such as: error: external variable 'x1' declared with incompatible types in different translation units ('double *' vs. 'float **') However, there is no translation of source locations, yet. llvm-svn: 95704
* Move the diagnostic argument formatting function out of Sema and makeDouglas Gregor2010-02-093-245/+270
| | | | | | | it available within the AST library, of which Sema is one client. No functionality change. llvm-svn: 95701
* Finish implementing property synthesis by default.Fariborz Jahanian2010-02-093-15/+27
| | | | | | (radar 7381956). llvm-svn: 95695
* Implement synthesizing properties by default.Fariborz Jahanian2010-02-096-4/+84
| | | | | | | | | This is a non-fragile-abi feature only. Since it breaks existing code, it is currently placed under -fobjc-nonfragile-abi2 option for test purposes only until further notice. WIP. llvm-svn: 95685
* StringRefize two random methods, remove a dead variable and a weird ↵Benjamin Kramer2010-02-091-6/+5
| | | | | | | | constructor call. This maybe fixes some of the errors GCC 4.5 gives on this code. llvm-svn: 95684
* Introduce a testbed for merging multiple ASTs into a single ASTDouglas Gregor2010-02-094-4/+194
| | | | | | | context with the AST importer. WIP, still useless but at least it has a test. llvm-svn: 95683
* Fix lookup of fields from lazy bindings to check if the region isTed Kremenek2010-02-091-9/+5
| | | | | | | | NULL, not the store, to determine if a lookup succeeded. The store can be null if it contained no bindings. This fixes a false positive reported to me by a user of the analyzer. llvm-svn: 95679
* Fix virtual bases' debug info.Devang Patel2010-02-091-2/+4
| | | | llvm-svn: 95678
* Mark implicit "this" argument as an artificial argument.Devang Patel2010-02-091-1/+4
| | | | llvm-svn: 95673
* Migrate the mish-mash of declaration checks inDouglas Gregor2010-02-093-177/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sema::ActOnUninitializedDecl over to InitializationSequence (with default initialization), eliminating redundancy. More importantly, we now check that a const definition in C++ has an initilizer, which was an #if 0'd code for many, many months. A few other tweaks were needed to get everything working again: - Fix all of the places in the testsuite where we defined const objects without initializers (now that we diagnose this issue) - Teach instantiation of static data members to find the previous declaration, so that we build proper redeclaration chains. Previously, we had the redeclaration chain but built it too late to be useful, because... - Teach instantiation of static data member definitions not to try to check an initializer if a previous declaration already had an initializer. This makes sure that we don't complain about static const data members with in-class initializers and out-of-line definitions. - Move all of the incomplete-type checking logic out of Sema::FinalizeDeclaratorGroup; it makes more sense in ActOnUnitializedDecl. There may still be a few places where we can improve these diagnostics. I'll address that as a separate commit. llvm-svn: 95657
* IRgen: Add CreateMemTemp, for creating an temporary memory object for a ↵Daniel Dunbar2010-02-098-49/+51
| | | | | | | | | | particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing. - This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome! PR6240. llvm-svn: 95648
* Reset the found-virtual-base state unless the *current* base produces a path,John McCall2010-02-091-4/+7
| | | | | | | | not *any* base up to now has produced a path. Fixes PR 6254. I'll do the access-control part of this patch RSN. llvm-svn: 95638
* Be more careful when checking initializer lists that involve referenceDouglas Gregor2010-02-091-3/+3
| | | | | | types; we don't want to give an expression reference type. Fixes PR6177. llvm-svn: 95635
* Implement a specific diagnostic when a class template partialDouglas Gregor2010-02-091-9/+20
| | | | | | | specialization does not use any of its template parameters, then recover far more gracefully. Fixes PR6181. llvm-svn: 95629
* Pass inline keyword to optimizer as the new InlineHint function attribute.Jakob Stoklund Olesen2010-02-091-0/+10
| | | | | | | | | | At the moment the inlinehint attribute is ignored by the Inliner unless you pass a -respect-inlinehint option. This will soon be the default. The inlinehint attribute is set if the inline keyword is explicitly specified on any declaration. llvm-svn: 95623
* Convert tabs to spaces.Ted Kremenek2010-02-091-5/+5
| | | | llvm-svn: 95621
* When substituting a declaration non-type template argument for aDouglas Gregor2010-02-081-8/+14
| | | | | | | | non-type template parameter that has reference type, augment the qualifiers of the non-type template argument with those of the referenced type. Fixes PR6250. llvm-svn: 95607
* Thread a source location into the template-argument deduction routines. ThereJohn McCall2010-02-0811-60/+99
| | | | | | | may be some other places that could take advantage of this new information, but I haven't really looked yet. llvm-svn: 95600
* Eliminate a pointer of storage in each ObjCInterfaceType andDouglas Gregor2010-02-082-34/+30
| | | | | | | ObjCObjectPointerType AST node by allocating the list of protocols after the type node itself. No functionality change. llvm-svn: 95597
* Reapply r95393, without the change to CGExpr. I was wrong in assuming that theDaniel Dunbar2010-02-083-19/+14
| | | | | | element type always matched the converted LLVM type for ExprType. llvm-svn: 95596
* Warn when cases are missing from a switch on a value of enumerationDouglas Gregor2010-02-081-1/+87
| | | | | | type (-Wswitch), from Michal! llvm-svn: 95592
* Keep track of whether a tag was defined in a declarator vs. beingDouglas Gregor2010-02-083-2/+7
| | | | | | defined by itself, from Enea Zaffanella! llvm-svn: 95586
* Emit global references with constant initializers as constants. Fixes PR5585.John McCall2010-02-081-1/+1
| | | | | | | The standard actually says that such references should have internal linkage, but gcc doesn't do that, so we probably can't get away with it. llvm-svn: 95577
* Merge block/function pointer types with objc's __weakFariborz Jahanian2010-02-081-3/+16
| | | | | | | | | attribute properly and avoid bogus warning. This is an objective-c fix only. objective-c++ follows different code pass and requires separate fix (which will come at a later time). Fixes radar 7214820. llvm-svn: 95571
* Implement basic importing and merging of variable declarations withinDouglas Gregor2010-02-081-1/+133
| | | | | | | the AST importer. This doesn't actually do anything (yet), because we don't have driver logic for merging ASTs. llvm-svn: 95570
OpenPOWER on IntegriCloud