summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaPseudoObject.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add info to ObjCPropertyRefExpr to indicate whether the dot syntax propertyArgyrios Kyrtzidis2012-03-301-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | reference is going to message the setter, the getter, or both. Having this info on the ObjCPropertyRefExpr node makes it easier for AST clients (like libclang) to reason about the meaning of the property reference. [AST/Sema] -Use 2 bits (with a PointerIntPair) in ObjCPropertyRefExpr to record the above info -Have ObjCPropertyOpBuilder set the info appropriately. [libclang] -When there is an implicit property reference (property syntax using methods) have clang_getCursorReferenced return a cursor for the method. If the property reference is going to result in messaging both the getter and the setter choose to return a cursor for the setter because it is less obvious from source inspection that the setter is getting called. The general idea has the seal of approval by John. rdar://11151621 llvm-svn: 153709
* objective-c: Improve diagnostics andFariborz Jahanian2012-03-281-4/+10
| | | | | | | provide 'fixit' hint when dictionary index is not of proper type. // rdar://11062080 llvm-svn: 153584
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-8/+8
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,Ted Kremenek2012-03-061-0/+505
| | | | | | | | | | | | | NSNumber, and boolean literals. This includes both Sema and Codegen support. Included is also support for new Objective-C container subscripting. My apologies for the large patch. It was very difficult to break apart. The patch introduces changes to the driver as well to cause clang to link in additional runtime support when needed to support the new language features. Docs are forthcoming to document the implementation and behavior of these features. llvm-svn: 152137
* Pull the OpaqueValueExpr's source expression into its constructor, soDouglas Gregor2012-02-231-2/+2
| | | | | | that we can correctly compute value-dependence of the OVE. llvm-svn: 151291
* Add IsImplicit field in ObjCMessageExpr that is true when the messageArgyrios Kyrtzidis2012-01-121-28/+14
| | | | | | | | | | was constructed, e.g. for a property access. This allows the selector identifier locations machinery for ObjCMessageExpr to function correctly, in that there are not real locations to handle/report for such a message. llvm-svn: 148013
* Fix the instantiation of pseudo-object expressions. This is aJohn McCall2011-11-301-0/+51
| | | | | | | | | really bad way to go about this, but I'm not sure there's a better choice without substantial changes to TreeTransform --- most notably, preserving implicit semantic nodes instead of discarding and rebuilding them. llvm-svn: 145480
* Resolve placeholder expressions before trying to deduceJohn McCall2011-11-151-6/+4
| | | | | | | 'auto'. Introduce a convenience method to make this a bit easier, and use it elsewhere. llvm-svn: 144605
* Revert r143972, which didn't actually compile under -Wnon-virtual-dtor.Matt Beaumont-Gay2011-11-081-3/+2
| | | | | | (TIL: -Wnon-virtual-dtor is not in -Wall.) llvm-svn: 144058
* There are some crazy cases that LookupMethodInReceiverTypeJohn McCall2011-11-071-1/+8
| | | | | | | | | doesn't duplicate, but they all surface as implicit properties. It's also a useful optimization to not duplicate the implicit getter lookup. So, trust the getter lookup that was already done in these cases. llvm-svn: 144031
* Better fix for -Wnon-virtual-dtorMatt Beaumont-Gay2011-11-071-2/+3
| | | | llvm-svn: 143972
* Appease -Wnon-virtual-dtorMatt Beaumont-Gay2011-11-071-0/+2
| | | | llvm-svn: 143965
* Unbreak gcc build.Benjamin Kramer2011-11-061-1/+1
| | | | | | For some reason clang and msvc accept this, but gcc doesn't. llvm-svn: 143872
* Change the AST representation of operations on Objective-CJohn McCall2011-11-061-225/+671
| | | | | | | | | | | | | | | | | | | | | | | | | | | | property references to use a new PseudoObjectExpr expression which pairs a syntactic form of the expression with a set of semantic expressions implementing it. This should significantly reduce the complexity required elsewhere in the compiler to deal with these kinds of expressions (e.g. IR generation's special l-value kind, the static analyzer's Message abstraction), at the lower cost of specifically dealing with the odd AST structure of these expressions. It should also greatly simplify efforts to implement similar language features in the future, most notably Managed C++'s properties and indexed properties. Most of the effort here is in dealing with the various clients of the AST. I've gone ahead and simplified the ObjC rewriter's use of properties; other clients, like IR-gen and the static analyzer, have all the old complexity *and* all the new complexity, at least temporarily. Many thanks to Ted for writing and advising on the necessary changes to the static analyzer. I've xfailed a small diagnostics regression in the static analyzer at Ted's request. llvm-svn: 143867
* Reflow code. No intended functionality change.Benjamin Kramer2011-10-281-17/+14
| | | | llvm-svn: 143192
* Restore r142914 and r142915, now with missing file and apparentJohn McCall2011-10-251-0/+342
GCC compiler workaround. llvm-svn: 142931
OpenPOWER on IntegriCloud