summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprMember.cpp
Commit message (Collapse)AuthorAgeFilesLines
* More lambda work: semantic analysis of capturing 'this'. It's a bit ↵Eli Friedman2012-01-071-0/+3
| | | | | | complicated, but we have to be careful about when exactly captures are marked given PotentiallyPotentiallyEvaluated contexts. (Actually, it's not 100% correct yet, but it's close enough for the moment.) llvm-svn: 147723
* Diagnose cases where the definition of a particular type is required,Douglas Gregor2012-01-021-0/+5
| | | | | | | is known (to Clang), but is not visible because the module has not yet been imported. llvm-svn: 147436
* Unlike in C++03, a constant-expression is not an unevaluated operand in C++11.Richard Smith2011-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | Split out a new ExpressionEvaluationContext flag for this case, and don't treat it as unevaluated in C++11. This fixes some crash-on-invalids where we would allow references to class members in potentially-evaluated constant expressions in static member functions, and also fixes half of PR10177. The fix to PR10177 exposed a case where template instantiation failed to provide a source location for a diagnostic, so TreeTransform has been tweaked to supply source locations when transforming a type. The source location is still not very good, but MarkDeclarationsReferencedInType would need to operate on a TypeLoc to improve it further. Also fix MarkDeclarationReferenced in C++98 mode to trigger instantiation for static data members of class templates which are used in constant expressions. This fixes a link-time problem, but we still incorrectly treat the member as non-constant. The rest of the fix for that issue is blocked on PCH support for early-instantiated static data members, which will be added in a subsequent patch. llvm-svn: 146955
* Replace all comparisons between ObjCInterfaceDecl pointers with callsDouglas Gregor2011-12-151-2/+2
| | | | | | | | to declaresSameEntity(), as a baby step toward tracking forward declarations of Objective-C classes precisely. Part of <rdar://problem/10583531>. llvm-svn: 146618
* Fix some cases where a CK_IntegralCast was being used to convert an lvalue to anRichard Smith2011-10-271-0/+1
| | | | | | | | | rvalue. An assertion to catch this is in ImpCastExprToType will follow, but vector operations currently trip over this (due to omitting the usual arithmetic conversions). Also add an assert to catch missing lvalue-to-rvalue conversions on the LHS of ->. llvm-svn: 143155
* Pull out conversion on LHS of -> and . into its own function. This happensRichard Smith2011-10-261-7/+12
| | | | | | | implicitly in LookupMemberExpr and explicitly in cases where template instantiation doesn't redo the lookup. llvm-svn: 143046
* Restore r142914 and r142915, now with missing file and apparentJohn McCall2011-10-251-40/+8
| | | | | | GCC compiler workaround. llvm-svn: 142931
* Revert r142914 and r142915, due to possibly missing file.NAKAMURA Takumi2011-10-251-8/+40
| | | | | | r142914: "Introduce a placeholder type for "pseudo object"" r142915: "Pull the pseudo-object stuff into its own file." llvm-svn: 142921
* Introduce a placeholder type for "pseudo object"John McCall2011-10-251-40/+8
| | | | | | | | | | | | | | | expressions: expressions which refer to a logical rather than a physical l-value, where the logical object is actually accessed via custom getter/setter code. A subsequent patch will generalize the AST for these so that arbitrary "implementing" sub-expressions can be provided. Right now the only client is ObjC properties, but this should be generalizable to similar language features, e.g. Managed C++'s __property methods. llvm-svn: 142914
* Make it possible to compute the type of 'this' without capturingDouglas Gregor2011-10-181-2/+2
| | | | | | it. Refactoring to be used in a moment. llvm-svn: 142360
* obj-c++: Fix a IRGen crash when getter is a reference type.Fariborz Jahanian2011-10-171-9/+9
| | | | | | Fix is in Sema. // rdar://10153365 llvm-svn: 142249
* Catch placeholder types in DefaultLvalueConversionJohn McCall2011-10-111-43/+19
| | | | | | | | | | | and DefaultFunctionArrayLvalueConversion. To prevent significant regression for should-this-be-a-call fixits, and to repair some such regression from the introduction of bound member placeholders, make those placeholder checks try to build calls appropriately. Harden the build-a-call logic while we're at it. llvm-svn: 141738
* Don't complain about qualified property or ivar access when theDouglas Gregor2011-10-101-2/+2
| | | | | | qualifier itself is invalid. Crasher noticed by Fariborz. llvm-svn: 141544
* Diagnose attempts to qualify the name of an instance variable orDouglas Gregor2011-10-091-0/+14
| | | | | | property in an Objective-C++ member access expression. Fixes PR9759. llvm-svn: 141522
* Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.Argyrios Kyrtzidis2011-09-191-1/+1
| | | | | | It already works (and is useful with) macro locs as well. llvm-svn: 140057
* Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear ↵Francois Pichet2011-09-171-1/+1
| | | | | | | | that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag. Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag. llvm-svn: 139987
* Encapsulate the Objective-C id/Class/SEL "redefinition" types inDouglas Gregor2011-08-111-4/+5
| | | | | | | | | ASTContext with accessors/mutators. The only functional change is that the AST writer won't bother writing the id/Class/SEL redefinition type if it hasn't been explicitly set; previously, it ended up being written as a synonym for the built-in id/Class/SEL. llvm-svn: 137349
* Switch Sema::ExtVectorDecls over to LazyVector.Douglas Gregor2011-07-281-3/+7
| | | | llvm-svn: 136314
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-1/+1
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Add support for C++ namespace-aware typo correction, e.g., correctingDouglas Gregor2011-06-281-17/+21
| | | | | | | | | | | | | | | vector<int> to std::vector<int> Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes PR5776/<rdar://problem/8652971>. Thanks Kaelyn! llvm-svn: 134007
* Provide fix-it for '.' <-> '->' for Objective-C ivar/property access.Fariborz Jahanian2011-06-281-1/+9
| | | | | | // rdar://7811841 llvm-svn: 133970
* Move all of Sema's member-access-related checking out of SemaExpr.cppDouglas Gregor2011-06-231-0/+1582
and into a new file, SemaExprMember.cpp, bringing SemaExpr.cpp just under 10,000 lines of code (ugh). No functionality change, although I intend to do some refactoring of this code to address PR8368 at some point in the "near" future. llvm-svn: 133674
OpenPOWER on IntegriCloud