summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaInherit.cpp
Commit message (Collapse)AuthorAgeFilesLines
* When performing name lookup within a class template or class templateDouglas Gregor2009-09-111-3/+6
| | | | | | | partial specialization, make sure we look into non-dependent base classes (but not dependent base classes). Fixes PR4951. llvm-svn: 81584
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-20/+20
| | | | llvm-svn: 81346
* Canonicalize else.Mike Stump2009-08-041-7/+7
| | | | llvm-svn: 78102
* Change uses of:Ted Kremenek2009-07-291-3/+3
| | | | | | | | | | | | | | | | | | | | Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. llvm-svn: 77510
* Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek2009-07-171-3/+3
| | | | | | | | | until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. llvm-svn: 76193
* Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), ↵Ted Kremenek2009-07-171-3/+3
| | | | | | Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. llvm-svn: 76139
* De-ASTContext-ify DeclContext.Argyrios Kyrtzidis2009-06-301-2/+2
| | | | | | | Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
* Fix PR4365.Anders Carlsson2009-06-121-0/+6
| | | | llvm-svn: 73240
* Replace a cast with a dyn_cast as suggested by Doug.Anders Carlsson2009-05-301-7/+8
| | | | llvm-svn: 72624
* Add a member lookup criteria constructor for searching for overridden ↵Anders Carlsson2009-05-301-0/+16
| | | | | | virtual member functions. Use this instead of regular name lookup when checking for overriding functions so we will see declarations that would otherwise be hidden. Fixes 6902298. llvm-svn: 72601
* Make the LookupBase boolean an enum instead.Anders Carlsson2009-05-291-2/+5
| | | | llvm-svn: 72594
* Use an iterator type for found_decls_begin/found_decls_end.Anders Carlsson2009-05-131-2/+2
| | | | llvm-svn: 71721
* Add a new, more advanced CheckDerivedToBaseConversion that takes custom ↵Anders Carlsson2009-05-131-5/+19
| | | | | | diagnostic IDs. llvm-svn: 71720
* Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor2009-04-091-1/+1
| | | | | | No functionality change (really). llvm-svn: 68726
* Make parsing a semantic analysis a little more robust following SemaDouglas Gregor2009-04-011-0/+28
| | | | | | | | | | | | | | | | failures that involve malformed types, e.g., "typename X::foo" where "foo" isn't a type, or "std::vector<void>" that doens't instantiate properly. Similarly, be a bit smarter in our handling of ambiguities that occur in Sema::getTypeName, to eliminate duplicate error messages about ambiguous name lookup. This eliminates two XFAILs in test/SemaCXX, one of which was crying out to us, trying to tell us that we were producing repeated error messages. llvm-svn: 68251
* Add a Class field to the base path element structure. This holds the record ↵Anders Carlsson2009-03-271-0/+1
| | | | | | decl of the class taht the base is a base of. llvm-svn: 67859
* Add a stubbed out CheckBaseClassAccess method.Anders Carlsson2009-03-271-4/+6
| | | | llvm-svn: 67821
* Add SemaAccess.cppAnders Carlsson2009-03-271-2/+1
| | | | llvm-svn: 67819
* Eliminate CXXRecordTypeDouglas Gregor2009-02-281-2/+2
| | | | llvm-svn: 65671
* Move CheckPointerToMemberOperands to SemaExprCXX.cppSebastian Redl2009-02-071-1/+1
| | | | llvm-svn: 64029
* Eliminated LookupCriteria, whose creation was causing a bottleneck forDouglas Gregor2009-01-301-1/+2
| | | | | | | | | | | | | | | | | | LookupName et al. Instead, use an enum and a bool to describe its contents. Optimized the C/Objective-C path through LookupName, eliminating any unnecessarily C++isms. Simplify IdentifierResolver::iterator, removing some code and arguments that are no longer used. Eliminated LookupDeclInScope/LookupDeclInContext, moving all callers over to LookupName, LookupQualifiedName, or LookupParsedName, as appropriate. All together, I'm seeing a 0.2% speedup on Cocoa.h with PTH and -disable-free. Plus, we're down to three name-lookup routines. llvm-svn: 63354
* move library-specific diagnostic headers into library private dirs. ReduceChris Lattner2009-01-291-1/+0
| | | | | | redundant #includes. Patch by Anders Johnsen! llvm-svn: 63271
* Implement pointer to member handling in static_cast.Sebastian Redl2009-01-281-5/+4
| | | | | | | Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same. Make a few style corrections as suggested by Chris. llvm-svn: 63215
* Split the single monolithic DiagnosticKinds.def file into oneChris Lattner2009-01-271-1/+1
| | | | | | | | | .def file for each library. This means that adding a diagnostic to sema doesn't require all the other libraries to be rebuilt. Patch by Anders Johnsen! llvm-svn: 63111
* Improve diagnostics for ambiguous name lookup resultsDouglas Gregor2009-01-161-5/+25
| | | | llvm-svn: 62287
* Initial implementation of member name lookupDouglas Gregor2009-01-151-61/+111
| | | | llvm-svn: 62247
* Change a whole lot of diagnostics to take QualType's directly Chris Lattner2008-11-241-1/+1
| | | | | | | | instead of converting them to strings first. This also fixes a bunch of minor inconsistencies in the diagnostics emitted by clang and adds a bunch of FIXME's to DiagnosticKinds.def. llvm-svn: 59948
* start converting Sema over to using its canonical Diag method.Chris Lattner2008-11-181-2/+2
| | | | llvm-svn: 59561
* Implement semantic checking of static_cast and dynamic_cast.Sebastian Redl2008-10-311-4/+19
| | | | llvm-svn: 58509
* Implement initialization of a reference (C++ [dcl.init.ref]) as partDouglas Gregor2008-10-291-14/+13
| | | | | | | | | | | | | | | | | | | of copy initialization. Other pieces of the puzzle: - Try/Perform-ImplicitConversion now handles implicit conversions that don't involve references. - Try/Perform-CopyInitialization uses CheckSingleAssignmentConstraints for C. PerformCopyInitialization is now used for all argument passing and returning values from a function. - Diagnose errors with declaring references and const values without an initializer. (Uses a new Action callback, ActOnUninitializedDecl). We do not yet have implicit conversion sequences for reference binding, which means that we don't have any overloading support for reference parameters yet. llvm-svn: 58353
* Some cleanups for the ambiguous derived-to-base conversion checksDouglas Gregor2008-10-241-42/+40
| | | | llvm-svn: 58096
* First non-embarrassing cut at checking for ambiguous derived-to-base Douglas Gregor2008-10-241-6/+151
| | | | | | | | | | conversions. Added PerformImplicitConversion, which follows an implicit conversion sequence computed by TryCopyInitialization and actually performs the implicit conversions, including the extra check for ambiguity mentioned above. llvm-svn: 58071
* Clean up and document the representation of C++ base classesDouglas Gregor2008-10-231-2/+2
| | | | llvm-svn: 58040
* Add support for conversions from a pointer-to-derived to aDouglas Gregor2008-10-231-0/+54
pointer-to-base. Also, add overload ranking for pointer conversions (for both pointer-to-void and derived-to-base pointer conversions). Note that we do not yet diagnose derived-to-base pointer conversion errors that stem from ambiguous or inacessible base classes. These aren't handled during overload resolution; rather, when the conversion is actually used we go ahead and diagnose the error. llvm-svn: 58017
OpenPOWER on IntegriCloud