summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* Fix a slight oversight in computing whether a copy constructor is elidable.Eli Friedman2009-12-061-2/+4
| | | | | | Fixes PR5695. llvm-svn: 90702
* Pass the desired vtable linkage to GenerateVtable directly. Only call ↵Anders Carlsson2009-12-061-1/+3
| | | | | | MaybeMarkVirtualImplicitMembersReferenced for non-inline functions. llvm-svn: 90686
* Fix for PR5693: shift some code into SetClassDeclAttributesFromBase so thatEli Friedman2009-12-051-5/+15
| | | | | | it gets called during template instantiation. llvm-svn: 90682
* Avoid trashing two temporary strings.Benjamin Kramer2009-12-051-2/+2
| | | | llvm-svn: 90663
* strcasecmp is unportable.Benjamin Kramer2009-12-051-1/+1
| | | | llvm-svn: 90662
* Improve the performance of code completion by 2.2x when completing for ↵Douglas Gregor2009-12-051-6/+46
| | | | | | ordinary names with Cocoa.h included, by drastically improving the performance of our results sorting. llvm-svn: 90661
* fix rdar://7446395, a crash on invalid, by fixing a broken assertion.Chris Lattner2009-12-051-4/+3
| | | | llvm-svn: 90647
* Fix "using typename" and the instantiation of non-dependent using declarations.John McCall2009-12-046-38/+187
| | | | llvm-svn: 90614
* Diagnose declarations of implicit member functions.Anders Carlsson2009-12-041-25/+55
| | | | llvm-svn: 90605
* Fix for PR5650 - Revised vector_size attribute handling to be done earlier ↵John Thompson2009-12-042-86/+51
| | | | | | before declaration is finalized. llvm-svn: 90600
* Make sure to call PerformObjectMemberConversion where necessary.Eli Friedman2009-12-041-1/+4
| | | | llvm-svn: 90555
* Make the type of the Decl referred to by a MemberExpr a bit more precise.Eli Friedman2009-12-042-4/+4
| | | | llvm-svn: 90549
* Make sure that overridden method decls are always canonical.Anders Carlsson2009-12-041-1/+1
| | | | llvm-svn: 90542
* Fix for PR5679: make __builtin_prefetch a bit more flexible in what it acceptsEli Friedman2009-12-041-9/+9
| | | | | | | as a constant integer. Also, some minor cleanup and improvements to the diagnostics. llvm-svn: 90504
* When recovering from an invalid forward reference to an enum type in C++,John McCall2009-12-041-2/+6
| | | | | | create the enum type in the same scope as you would a record type. llvm-svn: 90500
* A new helper function to set various bits in the class whenFariborz Jahanian2009-12-032-15/+3
| | | | | | | a new virtual function is declared/instantiated. it is used in couple of places. llvm-svn: 90470
* Unify the end-of-class code paths used by the parser and templateDouglas Gregor2009-12-034-24/+39
| | | | | | | | | | | | | | instantiation, to ensure that we mark class template specilizations as abstract when we need to and perform checking of abstract classes. Also, move the checking that determines whether we are creating a variable of abstract class type *after* we check whether the type is complete. Otherwise, we won't see when we have an abstract class template specialization that is implicitly instantiated by this declaration. This is the "something else" that Sebastian had noted earlier. llvm-svn: 90467
* When instantiating a class, if a base specifier is not dependent we still ↵Anders Carlsson2009-12-033-11/+33
| | | | | | need to copy its attributes down to the instantiated class. llvm-svn: 90463
* When we're building a CXXExprWithTemporaries, only include thoseDouglas Gregor2009-12-033-4/+16
| | | | | | | | | | | temporaries that are within our current evaluation context. That way, nested evaluation contexts (e.g., within a sizeof() expression) won't see temporaries from outer contexts. Also, make sure to push a new evaluation context when instantiating the initializer of a variable; this may be an unevaluated context or a potentially-evaluated context, depending on whether it's an in-class initializer or not. Fixes PR5672. llvm-svn: 90460
* Honor using declarations in overload resolution. Most of the code forJohn McCall2009-12-033-67/+108
| | | | | | | | | | | overloaded-operator resolution is wildly untested, but the parallel code for methods seems to satisfy some trivial tests. Also change some overload-resolution APIs to take a type instead of an expression, which lets us avoid creating a spurious CXXThisExpr when resolving implicit member accesses. llvm-svn: 90410
* Stop stripping UnresolvedUsingDecls out of LookupResults that have otherJohn McCall2009-12-031-6/+3
| | | | | | | | | results in them (which we were doing intentionally as a stopgap). Fix an DeclContext lookup-table ordering problem which was causing UsingDecls to show up incorrectly when looking for ordinary results. And oh hey Clang-Code-Syntax passes now. llvm-svn: 90367
* Improve source location information for C++ member initializers in aDouglas Gregor2009-12-024-43/+81
| | | | | | | constructor, by keeping the DeclaratorInfo* rather than just the type and a single location. llvm-svn: 90355
* Use a more rigorous definition of 'class member'. I don't have any evidenceJohn McCall2009-12-021-7/+19
| | | | | | that this was causing a problem, but it could have. llvm-svn: 90343
* Recognize that EnumConstantDecls can be found by lookup and are not instanceJohn McCall2009-12-021-0/+3
| | | | | | members. Fixes PR5667. llvm-svn: 90341
* In Sema, whenever we think that a function is going to cause a vtable to be ↵Anders Carlsson2009-12-024-14/+47
| | | | | | generated, we mark any virtual implicit member functions as referenced. llvm-svn: 90327
* r90313, in which OverloadedFunctionDecl is removed and never spoken of again.John McCall2009-12-022-25/+25
| | | | llvm-svn: 90313
* Rip out the last remaining implicit use of OverloadedFunctionDecl in Sema:John McCall2009-12-029-76/+19
| | | | | | | LookupResult::getAsSingleDecl() is no more. Shift Sema::LookupSingleName to return null on overloaded results. llvm-svn: 90309
* Push overloaded function templates through the parser using a totally differentJohn McCall2009-12-023-37/+32
| | | | | | | leaked data structure than before. This kills off the last remaining explicit uses of OverloadedFunctionDecl in Sema. llvm-svn: 90306
* Fix another "operator delete missing" crash: make sure we don't checkEli Friedman2009-12-021-2/+6
| | | | | | | isVirtual() before we've actually calculated whether the destructor is virtual. llvm-svn: 90303
* Make sure to call AddOverriddenMethods for implicit copy assignment operators;Eli Friedman2009-12-021-0/+1
| | | | | | it's rare, but possible, for the difference to be significant. llvm-svn: 90301
* Stop trying to analyze class-hierarchies for dependently-scoped id-expressions;John McCall2009-12-023-125/+34
| | | | | | | | | | | | | there's nothing interesting we can say now that we're correctly not requiring the qualifier to name a known base class in dependent contexts. Require scope specifiers on member access expressions to name complete types if they're not dependent; delay lookup when they are dependent. Use more appropriate diagnostics when qualified implicit member access expressions find declarations from unrelated classes. llvm-svn: 90289
* Fix a code gen. crash synthesizing a destructor.Fariborz Jahanian2009-12-013-5/+10
| | | | | | Fixes pr5660. llvm-svn: 90283
* Fix IsProvablyNotDerivedFrom to always use record definitions when available.John McCall2009-12-011-5/+5
| | | | | | Gets clang-on-clang passing again. llvm-svn: 90270
* Rework how we support C++ implicit member accesses. If we can resolve anJohn McCall2009-12-015-242/+501
| | | | | | | | | | | | | | | implicit member access to a specific declaration, go ahead and create it as a DeclRefExpr or a MemberExpr (with implicit CXXThisExpr base) as appropriate. Otherwise, create an UnresolvedMemberExpr or DependentScopeMemberExpr with a null base expression. By representing implicit accesses directly in the AST, we get the ability to correctly delay the decision about whether it's actually an instance member access or not until resolution is complete. This permits us to correctly avoid diagnosing the 'problem' of 'MyType::foo()' where the relationship to the type isn't really known until instantiation. llvm-svn: 90266
* Add {ExternalSemaSource,SemaConsumer}::ForgetSema callback, and update PCHReaderDaniel Dunbar2009-12-011-1/+8
| | | | | | to use it so it at least won't try to access Sema once it is gone. llvm-svn: 90261
* Funtion templates and function template specializations do notDouglas Gregor2009-12-012-4/+5
| | | | | | | override virtual functions. Also, eliminate a (now redundant) call to AddOverriddenMethods. llvm-svn: 90242
* Move the checking of overridden virtual functions into the code pathDouglas Gregor2009-12-014-20/+33
| | | | | | | | | | | | | | | common to both parsing and template instantiation, so that we'll find overridden virtuals for member functions of class templates when they are instantiated. Additionally, factor out the checking for pure virtual functions, so that it will be executed both at parsing time and at template instantiation time. These changes fix PR5656 (for real), although one more tweak w.r.t. member function templates will be coming along shortly. llvm-svn: 90241
* Don't automatically assume that an id-expression refers to aDouglas Gregor2009-12-012-6/+22
| | | | | | | | | | ValueDecl, because that isn't always the case in ill-formed code. Diagnose a common mistake (forgetting to provide a template argument list for a class template, PR5655) and dyn_cast so that we handle the general problem of referring to a non-value declaration gracefully. llvm-svn: 90239
* An inherited virtual (where "virtual" wasn't written explicitly) canDouglas Gregor2009-12-011-1/+1
| | | | | | be defined as pure. Fixes PR5656. llvm-svn: 90237
* Switch the clang-to-CIndex interface for code-completion to a binary format, ↵Douglas Gregor2009-12-012-337/+191
| | | | | | for a massive speedup llvm-svn: 90209
* Eliminate warning in Release-Asserts mode. No functionality changeDouglas Gregor2009-12-011-0/+1
| | | | llvm-svn: 90204
* Fix and test for a problem caught by the clang-on-clang buildbot: qualifiedJohn McCall2009-11-301-17/+24
| | | | | | IDs in dependent contexts are not dependent if the context names a namespace. llvm-svn: 90171
* Remove all of Sema's explicit uses of OverloadedFunctionDecl except forJohn McCall2009-11-305-102/+0
| | | | | | those associated with TemplateNames. llvm-svn: 90162
* Eliminate the use of OverloadedFunctionDecl in member expressions.John McCall2009-11-307-538/+772
| | | | | | | | Create a new UnresolvedMemberExpr for these lookups. Assorted hackery around qualified member expressions; this will all go away when we implement the correct (i.e. extremely delayed) implicit-member semantics. llvm-svn: 90161
* When we're trying to define an implicit virtual destructor, make sure that ↵Anders Carlsson2009-11-302-8/+23
| | | | | | we have a valid delete operator. llvm-svn: 90156
* Use StringRef in Attr constructors.Benjamin Kramer2009-11-302-14/+6
| | | | llvm-svn: 90140
* Remove useless c_str() calls in SemaCodeComplete.Benjamin Kramer2009-11-291-17/+17
| | | | llvm-svn: 90088
* Don't call Decl::CollectingStats(false) and Stmt::CollectingStats(false). ↵Kovarththanan Rajaratnam2009-11-291-3/+0
| | | | | | When called with false these functions return whether statistics are enabled. They don't change any state. Since we're not using the return value avoid calling them in the first place. llvm-svn: 90077
* Add DeclarationName support for C++0x operator literals. They should now work asAlexis Hunt2009-11-294-3/+6
| | | | | | | function names outside of templates - they'll probably cause some damage there as they're largely untested. llvm-svn: 90064
* Fix 80-cols violationsAlexis Hunt2009-11-291-3/+3
| | | | llvm-svn: 90057
OpenPOWER on IntegriCloud