summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Properly pass the address of a lazily-generated function declaration withJohn McCall2010-04-282-5/+28
| | | | | | incomplete type. Fixes PR6911. llvm-svn: 102473
* It's okay to refer to non-type template parameters anywhere they areDouglas Gregor2010-04-272-1/+13
| | | | | | visible. Fixes the remaining two failures in Boost.ScopeExit. llvm-svn: 102466
* Removed spaces at end of line. (Test commit.)Abramo Bagnara2010-04-271-1/+1
| | | | llvm-svn: 102465
* Fix for PR6953: per gcc, regparm and noreturn affect the compatibility ofEli Friedman2010-04-272-18/+17
| | | | | | | | | function types. This could potentially have unexpected side-effects, so look here if there are new regressions. llvm-svn: 102464
* When explicitly building a temporary object (CXXTemporaryObjectExpr),Douglas Gregor2010-04-274-4/+33
| | | | | | | | | | | keep track of whether we need to zero-initialize storage prior to calling its constructor. Previously, we were only tracking this when implicitly constructing the object (a CXXConstructExpr). Fixes Boost's value-initialization tests, which means that the Boost.Config library now passes all of its tests. llvm-svn: 102461
* Fixed message send to void (broken by my last commit - GNU runtime).David Chisnall2010-04-271-1/+2
| | | | llvm-svn: 102459
* Diagnose the use of abstract types as array element types. Previously,Douglas Gregor2010-04-273-15/+24
| | | | | | | | | | we were relying on checking for abstract class types when an array type was actually used to declare a variable, parameter, etc. However, we need to check when the construct the array for, e.g., SFINAE purposes (see DR337). Fixes problems with Boost's is_abstract type trait. llvm-svn: 102452
* During template instantiation, set the naming class ofDouglas Gregor2010-04-275-35/+57
| | | | | | | | | | | | | | | | | | | UnresolvedLookupExpr and UnresolvedMemberExpr by substituting the naming class we computed when building the expression in the template... ... which we didn't always do correctly. Teach UnresolvedMemberExpr::getNamingClass() all about the new representation of injected-class-names in templates, so that it can return a naming class that is the current instantiation. Also, when decomposing a template-id into its template name and its arguments, be sure to set the naming class on the LookupResult structure. Fixes PR6947 the right way. llvm-svn: 102448
* More simplifications.Benjamin Kramer2010-04-271-17/+7
| | | | llvm-svn: 102447
* Move CollectIvarsToConstructOrDestruct to SemaFariborz Jahanian2010-04-274-52/+58
| | | | | | | from AST, consider ivar array of objects (per Doug's comment). llvm-svn: 102446
* Simplify some code. No change in functionality.Benjamin Kramer2010-04-271-18/+9
| | | | llvm-svn: 102445
* When checking the redeclaration context of a typedef that refers to aDouglas Gregor2010-04-272-1/+13
| | | | | | | tag of the same name, compare the lookup contexts rather than the actual contexts. Fixes PR6923. llvm-svn: 102437
* Don't look into incomplete types when trying to warn about unusedDouglas Gregor2010-04-272-0/+13
| | | | | | variables. Fixes PR6948. llvm-svn: 102436
* CMake: Fix DESTDIR-related installation problem on Windows, from theDouglas Gregor2010-04-271-1/+2
| | | | | | mysterious Elrood on IRC. llvm-svn: 102435
* When instantiating UnresolvedLookupExpr and UnresolvedMemberExprDouglas Gregor2010-04-272-0/+65
| | | | | | | expressions, be sure to set the naming class of the LookupResult structure. Fixes PR6947. llvm-svn: 102434
* Simplify.Daniel Dunbar2010-04-271-4/+2
| | | | llvm-svn: 102432
* Add Driver support for -fno-constant-cfstrings.Daniel Dunbar2010-04-272-1/+9
| | | | llvm-svn: 102431
* Ensure return from a message to nil is always 0 (GNU runtime).David Chisnall2010-04-271-1/+67
| | | | | | | | | This works around stack corruption / crashes resulting from PR6944, and also works around people who expect 'what works on my machine' to work everywhere (GCC crashes in a number of cases on SPARC that should now work correctly with clang). llvm-svn: 102430
* Fix comments.Daniel Dunbar2010-04-271-3/+3
| | | | llvm-svn: 102429
* Wrap a couple of long lines. (Test commit.)Enea Zaffanella2010-04-271-2/+4
| | | | llvm-svn: 102420
* Improve the diagnostic you get when making a qualified member accessJohn McCall2010-04-275-13/+10
| | | | | | with a qualifier referencing a different type. llvm-svn: 102409
* Make the InjectedClassNameType the canonical type of the current instantiationJohn McCall2010-04-2720-142/+206
| | | | | | | | | | | | | | | | of a class template or class template partial specialization. That is to say, in template <class T> class A { ... }; or template <class T> class B<const T*> { ... }; make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType when written inside the appropriate context. This allows us to track the current instantiation appropriately even inside AST routines. It also allows us to compute a DeclContext for a type much more efficiently, at some extra cost every time we write a template specialization (which can be optimized, but I've left it simple in this patch). llvm-svn: 102407
* New method to construct/destruct ivars that have non-trivial default Fariborz Jahanian2010-04-262-0/+52
| | | | | | constructors or destructors, not used yet. llvm-svn: 102403
* Enable debug info for local variables at -O1+. Devang Patel2010-04-261-12/+1
| | | | llvm-svn: 102398
* Improve source-location information in a C++ typeid (type) expressionDouglas Gregor2010-04-267-115/+159
| | | | | | | | | | | | | | | | | by using TypeSourceInfo, cleaning up the representation somewhat. Teach getTypeOperand() to strip references and cv-qualifiers, providing the semantic view of the type without requiring any extra storage (the unmodified type remains within the TypeSourceInfo). This fixes a bug found by Boost's call_traits test. Finally, clean up semantic analysis, by splitting the ActOnCXXTypeid routine into ActOnCXXTypeId (the parser action) and two BuildCXXTypeId functions, which perform the semantic analysis for typeid(type) and typeid(expression), respectively. We now perform less work at template instantiation time (we don't look for std::type_info again) and can give better diagnostics. llvm-svn: 102393
* fix PR6936: don't generate line marker directives when preprocessingChris Lattner2010-04-261-3/+9
| | | | | | | | .S files. "# 123" is passed through as-is, not treated as a line marker in this mode. No testcase, because it would be nasty and isn't worth it. llvm-svn: 102391
* Diagnose declaration of reference typed ivars.Fariborz Jahanian2010-04-263-2/+12
| | | | llvm-svn: 102390
* wordsmith an objc warning, rdar://7900756Chris Lattner2010-04-262-2/+2
| | | | llvm-svn: 102388
* Introduce Type::isStructureOrClassType(), which does the obviousDouglas Gregor2010-04-2612-17/+35
| | | | | | | | thing. Audit all uses of Type::isStructure(), changing those calls to isStructureOrClassType() as needed (which is alsmost everywhere). Fixes the remaining failure in Boost.Utility/Swap. llvm-svn: 102386
* Cleanup error recovery for a missing '-'|'+'Fariborz Jahanian2010-04-262-35/+25
| | | | | | on a method declaration (radar 7822196). llvm-svn: 102383
* Implement template instantiation for implicit property references inDouglas Gregor2010-04-263-4/+68
| | | | | | | Objective-C++. This is the last bit of (non-blocks-related) template instantiation logic for Objective-C++. Yay! llvm-svn: 102382
* Implement template instantiation for ObjCPropertyRefExpr.Douglas Gregor2010-04-263-17/+64
| | | | llvm-svn: 102379
* emit dtors with the right calling convention in -fno-use-cxa-atexitChris Lattner2010-04-262-3/+28
| | | | | | mode. llvm-svn: 102377
* Implement template instantiation for value-dependent Objective-C ivarDouglas Gregor2010-04-263-11/+136
| | | | | | | | references and isa expressions. Also, test template instantiation of unresolved member references to Objective-C ivar references and isa expressions. llvm-svn: 102374
* remove alignment specifier on this. CAn't this test be removed yet? :)Chris Lattner2010-04-261-1/+1
| | | | llvm-svn: 102369
* Test case for NeXt's -fno-constant-cfstrings option.Fariborz Jahanian2010-04-261-0/+33
| | | | llvm-svn: 102357
* Implement template instantiation for Objective-C @catchDouglas Gregor2010-04-264-6/+76
| | | | | | statements. This is the last of the Objective-C statements. llvm-svn: 102356
* Refactor Objective-C @catch parameter checking by detangling it fromDouglas Gregor2010-04-266-24/+114
| | | | | | | | function-parameter checking and splitting it into the normal ActOn*/Build* pair in Sema. We now use VarDecl to represent the @catch parameter rather than the ill-fitting ParmVarDecl. llvm-svn: 102347
* Make the static type of the exception variable in an Objective-CDouglas Gregor2010-04-267-16/+16
| | | | | | | @catch a VarDecl. The dynamic type is still a ParmVarDecl, but that will change soon. No effective functionality change. llvm-svn: 102341
* Ensure that we have completed a type before attempting initializationDouglas Gregor2010-04-262-39/+66
| | | | | | on that type. Fixes several problems in Boost.Interprocess. llvm-svn: 102339
* tests: Force a triple.Daniel Dunbar2010-04-261-1/+1
| | | | llvm-svn: 102332
* When name lookup finds a single declaration that was imported via aDouglas Gregor2010-04-253-3/+22
| | | | | | | | using declaration, look at its underlying declaration to determine the lookup result kind (e.g., overloaded, unresolved). Fixes at least one issue in Boost.Bimap. llvm-svn: 102317
* Improve the diagnostic when we find something we did not expect in aDouglas Gregor2010-04-254-18/+18
| | | | | | | member expression (p-> or x.), by showing the type we looked into and what we did actually find. llvm-svn: 102315
* IRgen/NeXT: Fix several alignment issues with Objective-C metadata symbols:Daniel Dunbar2010-04-252-14/+27
| | | | | | | | | - Fix some places that had the alignment hard coded. - Use ABI type alignment, not preferred type alignment -- neither of this is exactly right, as we really want the C type alignment as required by the runtime, but the ABI alignment is a more correct choice. This should be equivalent for x86_64, but fixes the alignment for ARM. llvm-svn: 102314
* tests: Convert test to FileCheck.Daniel Dunbar2010-04-251-20/+23
| | | | llvm-svn: 102313
* IRgen/NeXT: Reuse EmitImageInfo for both fragile and non-fragile ABI. This ↵Daniel Dunbar2010-04-252-34/+17
| | | | | | fixes Clang to correctly emit the "CorrectedSynthesize" bit when using the non-fragile ABI. llvm-svn: 102312
* When performing name lookup for an operator name, be sure to lookDouglas Gregor2010-04-252-4/+26
| | | | | | through using declarations. Fixes ~18 tests in Boost.Fusion. llvm-svn: 102311
* exclude cmake build directories from being installedChris Lattner2010-04-251-0/+1
| | | | | | with "make install". Patch by Michael Forney! llvm-svn: 102299
* Land another cleanup patch.Anders Carlsson2010-04-251-14/+8
| | | | llvm-svn: 102293
* Land this test.Anders Carlsson2010-04-251-1/+16
| | | | llvm-svn: 102292
OpenPOWER on IntegriCloud