aboutsummaryrefslogtreecommitdiff
path: root/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-11-29 23:05:17 +0000
committerTed Kremenek <kremenek@apple.com>2007-11-29 23:05:17 +0000
commit2ff3e691ecc63a5d82d4023b46b5b47ce14ace53 (patch)
treed9420070dd39ef047f0b1d04c651d1b20d91d440 /Sema/SemaDecl.cpp
parent48b1239860f0cc372f0e54588aa5e200abe6fcf2 (diff)
Added method "HandleTopLevelDeclaration" to ASTConsumer. This will eventually
be the new hook that ASTStreamer calls to feed top-level Decls to ASTConsumers. The difference between "HandleTopLevelDeclaration" and "HandleTopLevelDecl" is that "HandleTopLevelDecl" is currently called by ASTStreamer for every top-level declaration, including those that appear within a Decl chain. Using the new interface, ASTStreamer would only call HandleTopLevelDeclaration for Decls that appear that the beginning of a Decl chain (i.e., a group of related decls). To preserve the behavior that all subclasses of ASTConsumer currently expect, the default implementation of HandleTopLevelDeclaration simply calls HandleTopLevelDecl, and for decl chains it calls HandleTopLevelDecl for each Decl* in a chain of Decls. The advantage of this interface is that some subclasses of ASTConsumer only really want the Decl chain, and not each individual Decl passed to them. This extra level of indirection allows subclasses to override the default behavior if they so desire. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Sema/SemaDecl.cpp')
0 files changed, 0 insertions, 0 deletions