Commit Graph

13 Commits

Author SHA1 Message Date
Doug Gregor
3d4df3427a Pretty-print DeclNames with no keyword arguments by dropping the parenthsized bit.
Instead of printing "f(_:_:)", just print "f". 


Swift SVN r17078
2014-04-30 06:28:36 +00:00
Doug Gregor
1d4731e7d9 Reinstate the '_' for "no keyword argument" in the name of a function/method/initializer.
Swift SVN r17076
2014-04-30 06:09:42 +00:00
Doug Gregor
7bef9c45c4 Simplify the declaration naming scheme to use a blank rather than _ for unnamed arguments.
Arguments without API names are going to get more common soon, so
simplify names like "tableView(_:rowViewForRow:)" to
"tableView(:rowViewForRow:)".

Swift SVN r16982
2014-04-28 16:00:02 +00:00
Argyrios Kyrtzidis
9638623493 [AST] Make dump functions const, NFC.
Swift SVN r16917
2014-04-27 05:33:38 +00:00
Doug Gregor
fa8a10e36e Unbreak ObjCSelector and the new ObjCAttr.
Swift SVN r16329
2014-04-14 20:22:10 +00:00
Doug Gregor
cd4ca76b6a Introduce the ObjCSelector class to store an Objective-C selector.
We have to work with selectors quite often, so provide an efficient
representation for them. Switch ObjCAttr over to this representation,
which has the nice property that it efficiently represents implicit
@objc attributes with names and allows us to overwrite the Objective-C
name without losing all source information. Addresses
<rdar://problem/16478678>, and sets us up for dealing with selectors
better.

Swift SVN r16327
2014-04-14 20:05:35 +00:00
Doug Gregor
e418e93511 Start cleaning up method name importing.
Import a selector into a Swift method name, performing splitting at
that point. Use the resulting method name to determine the argument
names of the parameters, rather than trying to chop up the selector
again. There's more refactoring to do here.

This fixes a longstanding bug where the first argument of an
Objective-C method got the internal parameter name when it should
have gotten no name at all.

Swift SVN r15850
2014-04-03 00:34:40 +00:00
Doug Gregor
9189145cc5 Change DeclName over to basename(arg1:arg2:...argN:).
Swift will use the basename + argument names formulation for
names. Update the DeclName interfaces, printing, and __FUNCTION__ to
use the method syntax.

We'll still need to rework the "x.foo:bar:wibble:" syntax; that will
come (significantly) later.

Swift SVN r15763
2014-04-02 00:00:03 +00:00
Joe Groff
96c09d7179 Renovate name lookup to prepare for compound name lookup.
Make the name lookup interfaces all take DeclNames instead of identifiers, and update the lookup caches of the various file units to index their members by both compound name and simple name. Serialized modules are keyed by identifiers, so as a transitional hack, do simple name lookup then filter the results by compound name.

Swift SVN r14768
2014-03-07 03:21:29 +00:00
Chris Lattner
96947b2606 Change silgen to lower string literal lengths to an explicit value, instead of using
the result of the string_literal instruction.

This fixes:
<rdar://problem/15883849> Diagnostic CCP should be able to fold operations on string_literal lengths

I will follow up with cleanups this enables.




Swift SVN r13361
2014-02-03 18:26:46 +00:00
Chris Lattner
3af81cccbe raw_ostream and NullablePtr. While there are more types that
could be handled in similar ways, this gets the most of them.


Swift SVN r424
2011-07-19 06:09:31 +00:00
Chris Lattner
cbecebb18d -ast-dump shouldn't crash on empty identifiers
Swift SVN r153
2010-08-05 22:40:48 +00:00
Chris Lattner
ed1be4f17a add printing support for Identifier, switch VarDecl to have an
identifier instead of a stringref.


Swift SVN r63
2010-07-23 03:50:09 +00:00