summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-12-30 17:04:44 +0000
committerDouglas Gregor <dgregor@apple.com>2009-12-30 17:04:44 +0000
commit2d435306e52445d173e289e98dc343afe94c7fa8 (patch)
tree73b21e19207172c567b1cd248c388a0f0f82e416 /clang/lib/Sema/SemaCodeComplete.cpp
parentad183ac3c7b70f2d7ddbbaca5405a21e0a23d544 (diff)
downloadbcm5719-llvm-2d435306e52445d173e289e98dc343afe94c7fa8.tar.gz
bcm5719-llvm-2d435306e52445d173e289e98dc343afe94c7fa8.zip
Typo correction for type names when they appear in declarations, e.g., given
tring str2; we produce the following diagnostic + fix-it: typo.cpp:15:1: error: unknown type name 'tring'; did you mean 'string'? tring str2; ^~~~~ string To make this really useful, we'll need to introduce typo correction in many more places (wherever we do name lookup), and implement declaration-vs-expression heuristics that cope with typos better. However, for now this will handle the simple cases where we already get good "unknown type name" diagnostics. The LookupVisibleDecls functions are intended to be used by code completion as well as typo correction; that refactoring will happen later. llvm-svn: 92308
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index ef82a941b5a..a13851ff749 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -11,6 +11,7 @@
//
//===----------------------------------------------------------------------===//
#include "Sema.h"
+#include "Lookup.h"
#include "clang/Sema/CodeCompleteConsumer.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
OpenPOWER on IntegriCloud