Eli Friedman
ae86d64644
Rename Decl::getLocStart() to Decl::getStartLoc(). Add Decl::getLoc(), which is essentially the location which should be used for diagnostics.
...
Swift SVN r2105
2012-05-31 23:56:30 +00:00
Eli Friedman
ba4a76038b
Make oneofs never implicitly generate an ExtensionDecl. This matters for local oneofs.
...
Swift SVN r2098
2012-05-31 21:20:56 +00:00
Eli Friedman
a454d62619
Implement some reasonable shadowing rules for declarations.
...
Swift SVN r2061
2012-05-29 23:48:40 +00:00
Eli Friedman
8d985dcc38
Change extension lookup so that decls in the current module don't always shadow imports, which should be enough to unblock demo work. <rdar://problem/11492474>.
...
Swift SVN r1950
2012-05-23 03:16:20 +00:00
Eli Friedman
03a0704ca0
Add a really ugly hack to get shadowing for types working. I'm working on the right solution, but I'm not sure how long that will take.
...
Swift SVN r1940
2012-05-22 21:16:11 +00:00
Eli Friedman
98933b8510
More work on ClassDecls; this is enough to get member access working.
...
Swift SVN r1863
2012-05-16 00:22:09 +00:00
Eli Friedman
6f045aad2f
Throw the switch to use "var" syntax to declare members of structs. This also means we no longer build an implicit extension for every struct decl. Everything seems to be working, but please yell if this breaks anything.
...
Swift SVN r1851
2012-05-15 03:27:13 +00:00
Eli Friedman
87dd43a4b8
Refactor member and constructor lookup to depend on centralized routines in Module rather than scattering assumptions about how lookup works across Sema. This should make it easier to make changes in the future which affect lookup.
...
I'm not entirely sure these are the right APIs to expose, but this at least seems like progress.
Swift SVN r1848
2012-05-15 02:04:53 +00:00
Eli Friedman
4ca443d0f5
Add OneOfDecl; use it as a DeclContext for OneOfElementDecls instead of OneOfType, and get rid of the implicit TypeAliasDecl. Add TypeDecl as a base class for OneOfDecl and TypeAliasDecl (and StructDecl, once we have it). Adjust a whole bunch of stuff to this new scheme.
...
Swift SVN r1774
2012-05-08 21:09:42 +00:00
Chris Lattner
774a557e5c
Merge NamedDecl into ValueDecl, rdar://11379147.
...
Swift SVN r1737
2012-05-04 04:50:53 +00:00
Eli Friedman
e6177f35a9
Get rid of the outdated notion of type lookup in Module. <rdar://problem/11026489>.
...
Swift SVN r1734
2012-05-04 00:41:54 +00:00
Doug Gregor
a04776044e
Teach the import mechanism that it's rude to parse the same library
...
multiple times, as well as teaching the name lookup mechanism that
it's similarly rude to report ambiguous results because it searched
the same import twice. Fixes <rdar://problem/11287213>.
Yes, this is a bit of an ugly hack.
Swift SVN r1610
2012-04-24 22:36:17 +00:00
Eli Friedman
be602fcd05
Get rid of the implicit BraceStmt for the TranslationUnit; instead, have the TranslationUnit directly store a list of decls.
...
Swift SVN r1521
2012-04-20 00:17:13 +00:00
Eli Friedman
d5e7784010
Get rid of isModuleScope bit, since we don't like scattering bits across the AST; as a replacement, introduce TopLevelCodeDecl, which provides a DeclContext for all expressions and statements at the top level. <rdar://problem/11259941>.
...
Swift SVN r1503
2012-04-19 21:22:12 +00:00
Chris Lattner
6ab877ad83
fix name lookup to search through all modules to build the candidate set, instead of stopping with the first module that matches. Without this, we don't get the unified overload set for all "+" operators, for example. We arguably should stop searching when we get a type (since they cannot be overloaded) but we can treat that as a follow on issue.
...
Swift SVN r1481
2012-04-19 00:43:16 +00:00
Eli Friedman
37de44a35d
Implement changes to parsing/sema/etc so that we can implement a REPL and the main module parses the same way as a REPL.
...
Next step: implement an actual REPL.
Swift SVN r1441
2012-04-16 23:52:01 +00:00
Eli Friedman
361481835c
Introduce a notion of module scope declarations; use it where appropriate instead of checking for a local declcontext.
...
Swift SVN r1380
2012-04-11 02:52:40 +00:00
Chris Lattner
cb1d2cacbe
implement a new CanType subclass of Type, for use when we known that we have a canonical type.
...
Unlike Type, it implements equality operators. It is returned by Type->getCanonicalType().
This adopts it in the minimal places required to get the build to work, it would also be nice
to switch IRGen to canonical types and use it there.
Swift SVN r1298
2012-03-29 20:33:20 +00:00
Eli Friedman
ddffb633eb
Fix build errors with clang-421.
...
Swift SVN r1167
2012-03-05 19:31:12 +00:00
Chris Lattner
d525ba5fda
simplify builtin type processing by eliminating BuiltinTypeKind.
...
Swift SVN r967
2011-12-22 07:38:17 +00:00
John McCall
a1f7eefba3
Extract out decl attributes into a separately-allocated structure.
...
Swift SVN r920
2011-12-10 00:39:10 +00:00
Chris Lattner
a1b7419a36
remove support for looking up global names with dot syntax. "x.y" != "y(x)" now.
...
Swift SVN r917
2011-12-07 00:59:09 +00:00
Chris Lattner
ff130c602e
implement dot lookup in extensions!
...
Swift SVN r913
2011-12-07 00:11:01 +00:00
Chris Lattner
a23f19af78
remove redundant qualification
...
Swift SVN r907
2011-12-06 02:11:08 +00:00
Chris Lattner
900d45f3c0
implement a Module::lookupExtensions method to find all the extensions for a
...
given type in a given module. This depends on llvm r145898.
Swift SVN r906
2011-12-06 02:07:13 +00:00
Chris Lattner
5da9f8ade2
add TinyPtrVector to LLVM.h
...
Swift SVN r905
2011-12-06 01:46:23 +00:00
John McCall
d716f82984
Getterize ValueDecl.
...
Swift SVN r885
2011-11-18 01:04:12 +00:00
John McCall
50fb0d63f6
More incremental getterization.
...
.w
Swift SVN r883
2011-11-18 00:29:15 +00:00
Chris Lattner
164ab0ffee
move lookupTypeName out to Module::lookupGlobalType and have it look in the current
...
module as well for consistency.
Swift SVN r811
2011-11-01 06:27:24 +00:00
Chris Lattner
e0a18996cd
move lookupGlobalValue into Module, making it accessable to all of sema.
...
Swift SVN r810
2011-11-01 06:22:44 +00:00
Chris Lattner
5d8d0fd2f6
Have the name binder publish the list of imported modules into the TranslationUnit,
...
making it a real part of the AST. Also, rework TUModuleCache to do its computation
when it is constructed, instead of trying in each query.
Swift SVN r809
2011-11-01 06:19:36 +00:00
Chris Lattner
1e1755ea27
don't forget to svn add new files.
...
Swift SVN r803
2011-11-01 05:24:12 +00:00