summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-13 08:58:20 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-13 08:58:20 +0000
commit242ea9a05af8d5635e5c47697dd533ed9da2bfeb (patch)
treebcb457d915918ce58c30cfbba7bf8c5e44773f7f /clang/lib/Sema/Sema.h
parent599313ef94fb801b55c67ece2b7ae657890af3b5 (diff)
downloadbcm5719-llvm-242ea9a05af8d5635e5c47697dd533ed9da2bfeb.tar.gz
bcm5719-llvm-242ea9a05af8d5635e5c47697dd533ed9da2bfeb.zip
Rework Sema code completion interface.
- Provide Sema in callbacks, instead of requiring it in constructor. This eliminates the need for a factory function. Clients now just pass the object to consume the results in directly. - CodeCompleteConsumer is cheap to construct, so building it whenever we are doing code completion is reasonable. Doug, please review. llvm-svn: 87099
Diffstat (limited to 'clang/lib/Sema/Sema.h')
-rw-r--r--clang/lib/Sema/Sema.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h
index 4a6d01b4e24..2324a516504 100644
--- a/clang/lib/Sema/Sema.h
+++ b/clang/lib/Sema/Sema.h
@@ -373,7 +373,8 @@ public:
bool isSelfExpr(Expr *RExpr);
public:
Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer,
- bool CompleteTranslationUnit = true);
+ bool CompleteTranslationUnit = true,
+ CodeCompleteConsumer *CompletionConsumer = 0);
~Sema() {
if (PackContext) FreePackedContext();
}
@@ -3853,7 +3854,6 @@ public:
/// \name Code completion
//@{
- void setCodeCompleteConsumer(CodeCompleteConsumer *CCC);
virtual void CodeCompleteOrdinaryName(Scope *S);
virtual void CodeCompleteMemberReferenceExpr(Scope *S, ExprTy *Base,
SourceLocation OpLoc,
OpenPOWER on IntegriCloud