summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach ASTContext::getUnqualifiedArrayType() how to look throughDouglas Gregor2010-05-171-5/+14
| | | | | | | typedefs. As a drive-by, teach hit how to build VLA types, since those will eventually be supported in C++. llvm-svn: 103958
* mutable is a storage class that can follow a class/struct/union definition. ↵Douglas Gregor2010-05-171-0/+1
| | | | | | Fixes PR7153 llvm-svn: 103954
* Don't attempt to poke into an invalid field's class typeFariborz Jahanian2010-05-171-1/+2
| | | | | | | to mark its destructors as referenced which may cause a crash. Fixes radar 7896920 llvm-svn: 103953
* Diagnose a redefinition error when there are two instantiations of friendDouglas Gregor2010-05-171-1/+29
| | | | | | | functions defined inside a class template. Fixes PR6952, the last Boost.Units failure. llvm-svn: 103952
* Determine when the instantiation of a friend function defined inside aDouglas Gregor2010-05-173-8/+24
| | | | | | | class template conflicts with an existing (non-template) definition. This is another part of PR6952. llvm-svn: 103948
* IRgen: Remove dead function.Daniel Dunbar2010-05-171-17/+0
| | | | llvm-svn: 103945
* C++/Darwin/i386 ABI: Fix some problems with empty record handling.Daniel Dunbar2010-05-171-3/+20
| | | | | | | | - Check bases as part of isEmptyRecord(). - C++ record fields are never empty in the Itanium ABI. llvm-svn: 103944
* C++98/03 [temp.friend]p4 requires that inline function definitionsDouglas Gregor2010-05-171-0/+23
| | | | | | | | within class templates be instantiated along with each class template specialization, even if the functions are not used. Do so, as a baby step toward PR6952. llvm-svn: 103943
* Ensure that destructors are called for NRVO'd objects when theDouglas Gregor2010-05-173-3/+44
| | | | | | | function does not return. Thanks to Eli for pointing out this corner case. llvm-svn: 103941
* Pick the correct personality function based on the language. This prevents ↵David Chisnall2010-05-171-25/+26
| | | | | | | | link failures when C/ObjC code uses __attribute__((cleanup())) (previously this was inserting references to two libstc++ symbols; the personality function and the __terminate() function). This is still probably wrong for Objective-C++ and adds a couple of lines in CGException that should probably be in the CGObjCRuntime subclass. The personality function is now only looked up in one place in CGException though, so this should be easier to fix in the future. llvm-svn: 103938
* PR7117: Make sure we don't lose the calling convention for K&R-styleEli Friedman2010-05-171-1/+2
| | | | | | | definitions. llvm-svn: 103932
* when code completing inside a C-style block comment, don't emit errors aboutChris Lattner2010-05-161-2/+3
| | | | | | | | a missing */ since we truncated the file. This fixes rdar://7948776 llvm-svn: 103913
* Moved clang-builtin include dir position to immediately precede C includes.mike-m2010-05-161-21/+22
| | | | | | This aligns with how gcc compiler does things. llvm-svn: 103912
* Correctly diagnose array 'new' with initialization arguments when the new ↵Anders Carlsson2010-05-161-1/+1
| | | | | | type is a typedef to an array type. llvm-svn: 103909
* When the type-id or new-type-id of a C++ "new" expression is a typedefDouglas Gregor2010-05-161-3/+12
| | | | | | | of an array type, use the outermost array bound as the number of elements to allocate. Fixes PR7147. llvm-svn: 103908
* Don't emit any fallthrough / missing-noreturn warnings if we can'tJohn McCall2010-05-161-5/+11
| | | | | | compute a CFG for a function. llvm-svn: 103905
* When constant folding reference variables with an initializer to theChandler Carruth2010-05-161-0/+4
| | | | | | | | initializer, don't fold paramters. Their initializers are just default arguments which can be overridden. This fixes some spectacular regressions due to more things making it into the constant folding. llvm-svn: 103904
* fix rdar://7985267 - Don't emit an error about a non-pod argumentChris Lattner2010-05-164-10/+17
| | | | | | passed to va_start, it doesn't actually pass it. llvm-svn: 103899
* Emit a type record for TYPE_OBJC_OBJECT in the PCH file. I'm notJohn McCall2010-05-161-0/+1
| | | | | | entirely sure what this does, to be honest. llvm-svn: 103895
* Avoid doing two switches in TypeLoc's initialize() loop. The optimizerJohn McCall2010-05-161-3/+14
| | | | | | | can probably do this for us, but it's actually somewhat nicer to write it out here. llvm-svn: 103893
* When initializing thread-safe statics, put the call toDouglas Gregor2010-05-163-19/+76
| | | | | | | | | | | | | __cxa_guard_abort along the exceptional edge into (in effect) a nested "try" that rethrows after aborting. Fixes PR7144 and the remaining Boost.ProgramOptions failures, along with the regressions that r103880 caused. The crucial difference between this and r103880 is that we now follow LLVM's little dance with the llvm.eh.exception and llvm.eh.selector calls, then use _Unwind_Resume_or_Rethrow to rethrow. llvm-svn: 103892
* Revert r103880 (thread-safe static initialization w/ exceptions),Douglas Gregor2010-05-163-44/+20
| | | | | | because it's causing strange linker errors. Unfixes PR7144. llvm-svn: 103890
* Minor twik to my last patch. (for radar 7986354).Fariborz Jahanian2010-05-161-2/+2
| | | | llvm-svn: 103889
* Fix API gen for objc_msgSend property of aggregate typesFariborz Jahanian2010-05-151-6/+10
| | | | | | in Objective-c++ mode. Fixes radar 7986354. llvm-svn: 103887
* When initializing thread-safe statics, put the call toDouglas Gregor2010-05-153-20/+44
| | | | | | | | __cxa_guard_abort along the exceptional edge into (in effect) a nested "try" that rethrows after aborting. Fixes PR7144 and the remaining Boost.ProgramOptions failures. llvm-svn: 103880
* Modify this comment per Doug's suggestion: we don't need to mangle protocols.John McCall2010-05-151-2/+2
| | | | llvm-svn: 103875
* fix _mm_shuffle_pd too, thanks to Joel Falcou for pointing this out.Chris Lattner2010-05-151-2/+3
| | | | llvm-svn: 103873
* When applying the named return value optimization, we still need toDouglas Gregor2010-05-151-2/+5
| | | | | | | destroy the variable along the exceptional edge; it's only during normal execution that we avoid destroying this variable. llvm-svn: 103872
* Substantially alter the design of the Objective C type AST by introducingJohn McCall2010-05-1533-426/+415
| | | | | | | | | | | | | | | | | | | | | ObjCObjectType, which is basically just a pair of one of {primitive-id, primitive-Class, user-defined @class} with a list of protocols. An ObjCObjectPointerType is therefore just a pointer which always points to one of these types (possibly sugared). ObjCInterfaceType is now just a kind of ObjCObjectType which happens to not carry any protocols. Alter a rather large number of use sites to use ObjCObjectType instead of ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather than hashing them in a FoldingSet. Remove some number of methods that are no longer used, at least after this patch. By simplifying ObjCObjectPointerType, we are now able to easily remove and apply pointers to Objective-C types, which is crucial for a certain kind of ObjC++ metaprogramming common in WebKit. llvm-svn: 103870
* Implement a simple form of the C++ named return value optimization forDouglas Gregor2010-05-153-24/+44
| | | | | | | | | return statements. We perform NRVO only when all of the return statements in the function return the same variable. Fixes some link failures in Boost.Interprocess (which is relying on NRVO), and probably improves performance for some C++ applications. llvm-svn: 103867
* Implement semantic analysis and an AST representation for the namedDouglas Gregor2010-05-159-77/+153
| | | | | | | | | | | | return value optimization. Sema marks return statements with their NRVO candidates (which may or may not end up using the NRVO), then, at the end of a function body, computes and marks those variables that can be allocated into the return slot. I've checked this locally with some debugging statements (not committed), but there won't be any tests until CodeGen comes along. llvm-svn: 103865
* add type casts to _mm_shuffle_ps so the front-end appliesChris Lattner2010-05-151-1/+2
| | | | | | | implicit conversions where needed. This fixes an error reported on cfe-dev, not really worth a testcase though. llvm-svn: 103864
* Recognize when the named return value optimization applies in aDouglas Gregor2010-05-158-74/+117
| | | | | | | | | | "return" statement and mark the corresponding CXXConstructExpr as elidable. Teach CodeGen that eliding a temporary is different from eliding an object construction. This is just a baby step toward NRVO. llvm-svn: 103849
* C++/ABI/x86_64: Member pointers should be classified as INTEGER.Daniel Dunbar2010-05-151-0/+5
| | | | llvm-svn: 103843
* C++/ABI/i386: Member function pointers should be passed by value.Daniel Dunbar2010-05-151-2/+3
| | | | llvm-svn: 103842
* Driver: Make -fverbose-asm the default for platforms where the integratedDaniel Dunbar2010-05-141-1/+8
| | | | | | assembler defaults to on. llvm-svn: 103825
* Patch to fix a crash on incomplete class declaration.Fariborz Jahanian2010-05-141-3/+7
| | | | | | Radar 7923673. llvm-svn: 103812
* Emit an lvalue dynamic_cast even if the result is not used. AnotherDouglas Gregor2010-05-141-1/+15
| | | | | | part (or possibly all) of PR7132. llvm-svn: 103810
* When a failed dynamic_cast<T&> (which is an lvalue) results in aDouglas Gregor2010-05-141-3/+11
| | | | | | | | throw, it should use invoke when needed. The fixes the Boost.Statechrt failures that motivated PR7132, but there are a few side issues to tackle as well. llvm-svn: 103803
* Remove an unused function.Anders Carlsson2010-05-142-8/+0
| | | | llvm-svn: 103793
* Move ContainsPointerToDataMember to CodeGenTypes. No functionality change.Anders Carlsson2010-05-143-25/+29
| | | | llvm-svn: 103792
* Implement new default property synthesis rules. Essentially, no longerFariborz Jahanian2010-05-143-9/+77
| | | | | | | | | user directive is needed to force a property implementation. It is decided based on those propeties which are declared in the class (or in its protocols) but not those which must be default implemented by one of its super classes. Implements radar 7923851. llvm-svn: 103787
* Improve error recovery in C/ObjC when the first argument of a functionChris Lattner2010-05-141-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | declarator is incorrect. Not being a typename causes the parser to dive down into the K&R identifier list handling stuff, which is almost never the right thing to do. Before: r.c:3:17: error: expected ')' void bar(intptr y); ^ r.c:3:9: note: to match this '(' void bar(intptr y); ^ r.c:3:10: error: a parameter list without types is only allowed in a function definition void bar(intptr y); ^ After: r.c:3:10: error: unknown type name 'intptr'; did you mean 'intptr_t'? void bar(intptr y); ^~~~~~ intptr_t r.c:1:13: note: 'intptr_t' declared here typedef int intptr_t; ^ This fixes rdar://7980651 - poor recovery for bad type in the first arg of a C function llvm-svn: 103783
* Refactor ParseFunctionDeclaratorIdentifierList to have the firstChris Lattner2010-05-141-11/+18
| | | | | | | identifier in the identifier list consumed before it is called. No functionality change. llvm-svn: 103781
* Added Expr::EvaluateAsAnyLValue.Abramo Bagnara2010-05-141-5/+21
| | | | llvm-svn: 103780
* Fix thinko in yesterday's fix.Devang Patel2010-05-141-1/+1
| | | | | | Providing linkage name for function static variable confuses gdb, so don't do that. llvm-svn: 103779
* Revert r103770, "Added basic source locations to Elaborated and DependentNameDaniel Dunbar2010-05-145-106/+24
| | | | | | types.", it is breaking Clang bootstrap. llvm-svn: 103775
* Make sure that value-initialized pointers to data members are initialized ↵Anders Carlsson2010-05-141-1/+1
| | | | | | correctly. llvm-svn: 103771
* Added basic source locations to Elaborated and DependentName types.Abramo Bagnara2010-05-145-24/+106
| | | | llvm-svn: 103770
* Namespaces can only be defined at global or namespace scope. Fixes PR6596.Douglas Gregor2010-05-141-0/+8
| | | | llvm-svn: 103767
OpenPOWER on IntegriCloud