summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* patch to ir-gen conversion function call used inFariborz Jahanian2009-09-231-4/+9
| | | | | | initializing a reference class. llvm-svn: 82664
* Remove the FIXME as I said.Fariborz Jahanian2009-09-231-1/+0
| | | | llvm-svn: 82650
* This patch addresses a few issues related to 8.5.3 [dcl.init.ref]Fariborz Jahanian2009-09-231-3/+23
| | | | | | | | | It uses a recent API to find inherited conversion functions to do the initializer to reference lvalue conversion (and removes a FIXME). It issues the ambiguity diagnostics when multiple conversions are found. WIP. llvm-svn: 82649
* Change all the Type::getAsFoo() methods to specializations of Type::getAs().John McCall2009-09-211-13/+13
| | | | | | | | | | | Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. llvm-svn: 82501
* Merge uninstantiated default arguments more carefully, and try not toDouglas Gregor2009-09-171-2/+6
| | | | | | | complain about specializations of member functions that are not definitions. Fixes PR4995. llvm-svn: 82159
* Improved representation and support for friend class templates. Angst about ↵John McCall2009-09-161-33/+55
| | | | | | same. llvm-svn: 82088
* When implicitly declaring operators new, new[], delete, and delete[],Douglas Gregor2009-09-151-0/+15
| | | | | | | | | | | | give them the appropriate exception specifications. This, unfortunately, requires us to maintain and/or implicitly generate handles to namespace "std" and the class "std::bad_alloc". However, every other approach I've come up with was more hackish, and this standard requirement itself is quite the hack. Fixes PR4829. llvm-svn: 81939
* Add back the workaround since it lead to constructor conversion bugs :(Anders Carlsson2009-09-151-0/+6
| | | | llvm-svn: 81917
* When performing an user defined conversion sequence, perform the initial ↵Anders Carlsson2009-09-151-6/+0
| | | | | | standard conversion sequence. This lets us remove a workaround in SemaCompleteConstructorCall. llvm-svn: 81847
* Skeletal support for friend class templates.John McCall2009-09-141-1/+24
| | | | llvm-svn: 81801
* Removed Context argument from couple of methods which don'tFariborz Jahanian2009-09-121-2/+2
| | | | | | need them. llvm-svn: 81621
* Alter Action's friend interface to prepare for templated friend declarations andJohn McCall2009-09-111-23/+13
| | | | | | to stop making promises we can't currently keep. llvm-svn: 81571
* Cleanup and test C++ default arguments. Improvements include:Douglas Gregor2009-09-111-4/+55
| | | | | | | | | | | - Diagnose attempts to add default arguments to templates (or member functions of templates) after the initial declaration (DR217). - Improve diagnostics when a default argument is redefined. Now, the note will always point at the place where the default argument was previously defined, rather than pointing to the most recent declaration of the function. llvm-svn: 81548
* When re-entering a template scope, we may be entering a class templateDouglas Gregor2009-09-101-3/+11
| | | | | | | partial specialization rather than a subclass of TemplateDecl. Fixes a crash in libstdc++ 4.2's <map>. llvm-svn: 81407
* Improve handling of initialization by constructor, by ensuring thatDouglas Gregor2009-09-091-120/+171
| | | | | | | | such initializations properly convert constructor arguments and fill in default arguments where necessary. This also makes the ownership model more clear. llvm-svn: 81394
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-403/+400
| | | | llvm-svn: 81346
* Support templateids in friend declarations. Fixes bug 4859.John McCall2009-09-081-49/+47
| | | | llvm-svn: 81233
* Handle variadic constructors better. Share code between ↵Anders Carlsson2009-09-081-25/+59
| | | | | | BuildCXXConstructExpr and BuildCXXTemporaryObjectExpr. llvm-svn: 81181
* BuildCXXConstructExpr now takes a MultiExprArg.Anders Carlsson2009-09-071-9/+12
| | | | llvm-svn: 81160
* Reapply 81096, now with a fix. Spot the bug:Anders Carlsson2009-09-061-2/+2
| | | | | | | | | for (unsigned i = numargs; i < NumArgs; ++i) Args[0] = 0; ;) llvm-svn: 81123
* Revert "Initialize default CXXConstructExpr arguments to 0. Fixes a crash whenDaniel Dunbar2009-09-061-2/+2
| | | | | | | destroying the CXXConstructExpr.", this is causing test failures across the board. llvm-svn: 81100
* Initialize default CXXConstructExpr arguments to 0. Fixes a crash when ↵Anders Carlsson2009-09-051-2/+2
| | | | | | destroying the CXXConstructExpr. llvm-svn: 81096
* Pass the ConstructLoc to BuildCXXConstructExpr.Anders Carlsson2009-09-051-12/+10
| | | | llvm-svn: 81068
* Don't generate any code for an explicit call to a trivial destructor. Douglas Gregor2009-09-041-1/+1
| | | | | | | | | | | Now that parsing, semantic analysis, and (I think) code generation of pseudo-destructor expressions and explicit destructor calls works, update the example-dynarray.cpp test to destroy the objects it allocates and update the test to actually compile + link. The code seems correct, but the Clang-compiled version dies with a malloc error. Time to debug! llvm-svn: 81025
* Patch to instantiate destructors used to destructFariborz Jahanian2009-09-031-0/+75
| | | | | | base and data members when they are needed. llvm-svn: 80967
* Mark constructors used in initialization of base(s) and fieldsFariborz Jahanian2009-09-031-25/+37
| | | | | | | as referecned with location where they are used. Still need to look at destructor aspects of them. llvm-svn: 80950
* Issue diagnostics in variety of situations involvingFariborz Jahanian2009-09-031-3/+176
| | | | | | | | reference/const data members when user has declared the constructor. This necessitated some non-minor refactoring. llvm-svn: 80934
* Minor refactoring of my last patch.Fariborz Jahanian2009-09-021-5/+5
| | | | llvm-svn: 80847
* Referenced instatiated default constructors Fariborz Jahanian2009-09-021-1/+19
| | | | | | must be defined. Fixed pr4853. llvm-svn: 80846
* Allow null initialization of scalara data membersFariborz Jahanian2009-09-021-2/+8
| | | | | | in constructors's initializer list. pr4854 llvm-svn: 80802
* Don't assume that a base is always a RecordType, it can also be a ↵Anders Carlsson2009-09-011-5/+16
| | | | | | TemplateSpecializationType. Also, make sure to get the instantiated union member. llvm-svn: 80662
* Fix bug 4784 and allow friend declarations to properly extendJohn McCall2009-08-311-4/+16
| | | | | | existing declaration chains. llvm-svn: 80636
* Use DiagnoseMissingMember for UsingDecls.Anders Carlsson2009-08-301-1/+1
| | | | llvm-svn: 80470
* Improve diagnostics for missing members. This renames the ↵Anders Carlsson2009-08-301-1/+1
| | | | | | err_typecheck_no_member to err_typecheck_no_member_deprecated. The idea is that err_typecheck_no_member_deprecated should be phased out and any call sites that reference it should call DiagnoseMissingMember instead. llvm-svn: 80469
* Set the access specifier for using decls.Anders Carlsson2009-08-291-1/+4
| | | | llvm-svn: 80435
* For consistency, just make friend declarations AS_public.John McCall2009-08-291-0/+2
| | | | llvm-svn: 80420
* Store the SourceLocation of right parentheses in member initializers. Patch ↵Anders Carlsson2009-08-291-2/+2
| | | | | | by Anders Johnsen! llvm-svn: 80416
* Fix this for real.Anders Carlsson2009-08-281-1/+2
| | | | llvm-svn: 80377
* Pass InOverloadResolution all the way down to IsPointerConversion.Anders Carlsson2009-08-281-1/+2
| | | | llvm-svn: 80368
* Instantiate unresolved using declarations.Anders Carlsson2009-08-281-2/+3
| | | | llvm-svn: 80366
* Omnibus friend decl refactoring. Instead of cloning AST classes for friendJohn McCall2009-08-281-111/+119
| | | | | | | | | | | | | | declarations of same, introduce a single AST class and add appropriate bits (encoded in the namespace) for whether a decl is "real" or not. Much hackery about previously-declared / not-previously-declared, but it's essentially mandated by the standard that friends alter lookup, and this is at least fairly non-intrusive. Refactor the Sema methods specific to friends for cleaner flow and less nesting. Incidentally solve a few bugs, but I remain confident that we can put them back. llvm-svn: 80353
* Create UnresolvedUsingDecls.Anders Carlsson2009-08-281-10/+9
| | | | llvm-svn: 80346
* Factor declaration building out to Sema::BuildUsingDeclaration.Anders Carlsson2009-08-281-18/+28
| | | | llvm-svn: 80337
* More work on using declarations.Anders Carlsson2009-08-281-1/+9
| | | | llvm-svn: 80333
* Many improvements to using declarations.Anders Carlsson2009-08-281-19/+68
| | | | llvm-svn: 80332
* Remove more default arguments.Anders Carlsson2009-08-271-2/+2
| | | | llvm-svn: 80260
* Remove default arguments from TryImplicitConversion and fix a bug found in ↵Anders Carlsson2009-08-271-1/+4
| | | | | | the process. llvm-svn: 80258
* Revert the flags change for now, I have a better idea for this.Anders Carlsson2009-08-271-4/+1
| | | | llvm-svn: 80255
* Add a OverloadResolutionFlags and start converting some of the overload ↵Anders Carlsson2009-08-271-1/+4
| | | | | | methods over to using it instead of bools arguments. llvm-svn: 80248
* Don't check member and base initializers if the constructor is dependent.Anders Carlsson2009-08-271-27/+33
| | | | llvm-svn: 80211
OpenPOWER on IntegriCloud