summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/complete-preamble.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-08-17 05:26:33 +0000
committerDouglas Gregor <dgregor@apple.com>2012-08-17 05:26:33 +0000
commitcda209a9447c22c29eecc82109876b91863e4038 (patch)
tree88f0d102029512e8b90a043131ee1990e1fb7c99 /clang/test/Index/complete-preamble.cpp
parentebc3aa250be93f64641aaa8dccf64aa209f8a554 (diff)
downloadbcm5719-llvm-cda209a9447c22c29eecc82109876b91863e4038.tar.gz
bcm5719-llvm-cda209a9447c22c29eecc82109876b91863e4038.zip
When we need the complete set of visible declarations from a
declaration context, check whether the primary context---not the current context---has any external visible declarations. Fixes PR13616. llvm-svn: 162083
Diffstat (limited to 'clang/test/Index/complete-preamble.cpp')
-rw-r--r--clang/test/Index/complete-preamble.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Index/complete-preamble.cpp b/clang/test/Index/complete-preamble.cpp
new file mode 100644
index 00000000000..8f481052252
--- /dev/null
+++ b/clang/test/Index/complete-preamble.cpp
@@ -0,0 +1,8 @@
+#include "complete-preamble.h"
+void f() {
+ std::
+}
+
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:3:8 %s -o - | FileCheck -check-prefix=CC1 %s
+// CHECK-CC1: {ResultType void}{TypedText wibble}{LeftParen (}{RightParen )} (50) (parent: Namespace 'std')
+
OpenPOWER on IntegriCloud