[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

Shaurya Gupta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 19 05:25:59 PDT 2019

SureYeaah added inline comments.

Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:427
            R"cpp(void f(int a) {
                     auto dummy = 1; label: [ [gsl::suppress("type")] ] for (;;) a = dummy;
kadircet wrote:
> I think `auto dummy = 1;` should be within the label. otherwise we might break codes like(which is basically anything with labels):
> ```
> void foo() {
> goto label;
> label:
>  a = 1;
> }
> ```
> I don't think it is that important though, and have no idea about the effort necessary feel free to just add a FIXME if it turns out hard.
I've disabled extraction from label statements and added a fixme because the fix for all kinds of loops as well as if statement needs another patch.

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list