]> granicus.if.org Git - clang/commit
Don't explicitly represent OverloadedFunctionDecls within
authorDouglas Gregor <dgregor@apple.com>
Tue, 23 Dec 2008 00:26:44 +0000 (00:26 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 23 Dec 2008 00:26:44 +0000 (00:26 +0000)
commit3fc749d899dfc194162128c1a88933148a39b68d
tree2b9fd9eaf91829aeb60dbfbca21c9a523d03bcad
parent5b8c7d9fb620ba3a71e996d61e7b9bdf763b5c09
Don't explicitly represent OverloadedFunctionDecls within
DeclContext. Instead, just keep the list of currently-active
declarations and only build the OverloadedFunctionDecl when we
absolutely need it.

This is a half-step toward eliminating the need to explicitly build
OverloadedFunctionDecls that store sets of overloaded
functions. This was suggested by Argiris a while back, and it's a good
thing for several reasons: first, it eliminates the messy logic that
currently tries to keep the OverloadedFunctionDecl in sync with the
declarations that are being added. Second, it will (eventually)
eliminate the need to allocate memory for overload sets, which could
help performance. Finally, it helps set us up for when name lookup can
return multiple (possibly ambiguous) results, as can happen with
lookup of class members in C++.

Next steps: make the IdentifierResolver store overloads as separate
entries in its list rather than replacing them with an
OverloadedFunctionDecl now, then see how far we can go toward
eliminating OverloadedFunctionDecl entirely.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61357 91177308-0d34-0410-b5e6-96231b3b80d8
Driver/PrintParserCallbacks.cpp
include/clang/AST/DeclBase.h
include/clang/Parse/Action.h
lib/AST/DeclBase.cpp
lib/Parse/ParseExpr.cpp
lib/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaOverload.cpp