summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* Patch to allow restrict applied to id/Class types.Fariborz Jahanian2009-12-071-4/+8
| | | | | | (fixes radar 7442244). llvm-svn: 90773
* When in an Objective-C instance method, super is a valid code-completion resultDouglas Gregor2009-12-071-0/+14
| | | | llvm-svn: 90758
* Code completion for Objective-C @ keywords that are statements or expressionsDouglas Gregor2009-12-072-1/+92
| | | | llvm-svn: 90757
* Code completion for Objective-C @ directivesDouglas Gregor2009-12-072-0/+90
| | | | llvm-svn: 90756
* Rework how virtual member functions are marked. If a class has no key ↵Anders Carlsson2009-12-075-33/+96
| | | | | | function, we now wait until the end of the translation unit to mark its virtual member functions as references. This lays the groundwork for fixing PR5557. llvm-svn: 90752
* Move key functions to a separate map.Anders Carlsson2009-12-071-2/+6
| | | | llvm-svn: 90745
* DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated ↵John McCall2009-12-0713-198/+198
| | | | | | | | | | | | | | | | | | | | | variables, but the results are imperfect. For posterity, I did: cat <<EOF > $cmdfile s/DeclaratorInfo/TypeSourceInfo/g s/DInfo/TInfo/g s/TypeTypeSourceInfo/TypeSourceInfo/g s/SourceTypeSourceInfo/TypeSourceInfo/g EOF find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \; find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \; find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \; llvm-svn: 90743
* reapply my patch for PR4451, which improves diagnostics for :: vs : confusion.Chris Lattner2009-12-073-6/+48
| | | | | | This time with a fix to bail out when in a dependent context. llvm-svn: 90730
* Move RequireCompleteType requirement for fields early into ActOnField so thatEli Friedman2009-12-072-10/+17
| | | | | | subsequent code which depends on a complete type does the right thing. llvm-svn: 90727
* PointerUnion == PointerUnion does not do what I thought it did. Also, fix a ↵Douglas Gregor2009-12-061-4/+4
| | | | | | thinko in a PointerUnion::get call. llvm-svn: 90719
* revert my previous patch, it is breaking something and I don't have timeChris Lattner2009-12-063-41/+6
| | | | | | to fix it ATM. llvm-svn: 90717
* Switch the std::multimap shadow map used in code completion to anDouglas Gregor2009-12-061-16/+179
| | | | | | | llvm::DenseMap, for a 20% performance improvement in the Cocoa-big-list performance benchmark. llvm-svn: 90715
* implement PR4451, improving error recovery for a mistaken : where a :: wasChris Lattner2009-12-063-6/+41
| | | | | | | | | | | | | | | | | | | | | | | | intended. On the first testcase in the bug, we now produce: cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier y:a a2; ^ :: instead of: t.cc:8:1: error: C++ requires a type specifier for all declarations x:a a2; ^ t.cc:8:2: error: invalid token after top level declarator x:a a2; ^ ; t.cc:9:11: error: use of undeclared identifier 'a2' x::a a3 = a2; ^ llvm-svn: 90713
* remove some extraneous syntax: sourceloc implicitly converts to sourcerange.Chris Lattner2009-12-063-7/+6
| | | | llvm-svn: 90710
* 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
OpenPOWER on IntegriCloud