[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-12-13 Thread Eric Liu via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL320563: [Sema] Ignore decls in namespaces when global decls are not wanted. (authored by ioeric, committed by ). Changed

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-12-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 126694. ioeric added a comment. - Merged with origin/master Repository: rC Clang https://reviews.llvm.org/D40562 Files: include/clang/Driver/CC1Options.td include/clang/Sema/CodeCompleteConsumer.h include/clang/Sema/CodeCompleteOptions.h lib/Front

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. I'll LGTM this to unblock @ioeric . We'll also get a test using the flag in clangd soon. @arphaman, let us know if you feel there's something wrong with the patch. Repository: rC Clang https://reviews.llvm.org/D40562 __

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-12-12 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D40562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Ping. (fyi, you could find use of the new option in https://reviews.llvm.org/D40548) Repository: rC Clang https://reviews.llvm.org/D40562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-12-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D40562#942521, @arphaman wrote: > In https://reviews.llvm.org/D40562#941753, @ilya-biryukov wrote: > > > In https://reviews.llvm.org/D40562#941570, @arphaman wrote: > > > > > I'm not actually 100% sure, but I would imagine that this one of the

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-12-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 125777. ioeric added a comment. - Add a new code-completion option IncludeNamespaceLevelDecls. For now, I only restrict this option work for qualified id completion to reduce the impact. Repository: rC Clang https://reviews.llvm.org/D40562 Files: inclu

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-12-01 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D40562#941753, @ilya-biryukov wrote: > In https://reviews.llvm.org/D40562#941570, @arphaman wrote: > > > I'm not actually 100% sure, but I would imagine that this one of the > > reasons, yes. It would be nice to improve the cache to have thin

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-12-01 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D40562#941570, @arphaman wrote: > I'm not actually 100% sure, but I would imagine that this one of the reasons, > yes. It would be nice to improve the cache to have things like > namespace-level `Decl`, although how will lookup work in

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-12-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D40562#941570, @arphaman wrote: > In https://reviews.llvm.org/D40562#940201, @ilya-biryukov wrote: > > > In https://reviews.llvm.org/D40562#939950, @arphaman wrote: > > > > > This change breaks cached completions for declarations in namespaces i

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-11-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D40562#940201, @ilya-biryukov wrote: > In https://reviews.llvm.org/D40562#939950, @arphaman wrote: > > > This change breaks cached completions for declarations in namespaces in > > libclang. What exactly are you trying to achieve here? We cou

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D40562#939950, @arphaman wrote: > This change breaks cached completions for declarations in namespaces in > libclang. What exactly are you trying to achieve here? We could introduce > another flag maybe. Am I right to assume this cach

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Here's a simple test that breaks: $ cat test.cpp namespace ns { void func(); } ns:: // complete $ c-index-test -code-completion-at=test.cpp:5:1 test.cpp FunctionDecl:{ResultType void}{TypedText func}{LeftParen (}{RightParen )} (50) Completion contexts

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. This change breaks cached completions for declarations in namespaces in libclang. What exactly are you trying to achieve here? We could introduce another flag maybe. https://reviews.llvm.org/D40562 ___ cfe-commits mailing

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 124740. ioeric added a comment. - Clarify comment for includeGlobals() https://reviews.llvm.org/D40562 Files: include/clang/Sema/CodeCompleteConsumer.h lib/Sema/SemaCodeComplete.cpp lib/Sema/SemaLookup.cpp test/CodeCompletion/ignore-global-decls.cpp

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-11-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This is how I always perceived this option in the first place, so LGTM. But maybe its intention is different, so we should wait for @arphaman's comments. Could you also update comments of `CodeCompleteConsumer::includeGlobals` and `CodeCompleteOptions::IncludeGlob

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-11-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ... in qualified code completion and decl lookup. https://reviews.llvm.org/D40562 Files: lib/Sema/SemaCodeComplete.cpp lib/Sema/SemaLookup.cpp test/CodeCompletion/ignore-global-decls.cpp Index: test/CodeCompletion/ignore-global-decls.cpp ===