[PATCH] D60672: [libclang] visit c++14 lambda capture init expressions
Milian Wolff via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 17 02:51:06 PDT 2019
milianw added a comment.
@nik odd, it works for me, I just switched to master (previously I used the 8x release branch) and applied this patch and build it all. Then I run:
$ make && ./bin/llvm-lit ~/projects/src/llvm-project/clang/test/Index/cxx14-lambdas.cpp
makeobj[0]: Entering directory `/home/milian/projects/build/llvm-project'
ninja: no work to do.
makeobj[0]: Leaving directory `/home/milian/projects/build/llvm-project'
llvm-lit: /home/milian/projects/src/llvm-project/llvm/utils/lit/lit/llvm/config.py:340: note: using clang: /home/milian/projects/build/llvm-project/bin/clang
-- Testing: 1 tests, single process --
PASS: Clang :: Index/cxx14-lambdas.cpp (1 of 1)
Testing Time: 0.09s
Expected Passes : 1
Are you sure you have compiled this patch? If I comment out the visit of the InitExpr in CIndex.cpp again, then I get the same failure as you:
$ make && ./bin/llvm-lit -a ~/projects/src/llvm-project/clang/test/Index/cxx14-lambdas.cpp
makeobj[0]: Entering directory `/home/milian/projects/build/llvm-project'
ninja: no work to do.
makeobj[0]: Leaving directory `/home/milian/projects/build/llvm-project'
llvm-lit: /home/milian/projects/src/llvm-project/llvm/utils/lit/lit/llvm/config.py:340: note: using clang: /home/milian/projects/build/llvm-project/bin/clang
-- Testing: 1 tests, single process --
FAIL: Clang :: Index/cxx14-lambdas.cpp (1 of 1)
******************** TEST 'Clang :: Index/cxx14-lambdas.cpp' FAILED ********************
Script:
--
: 'RUN: at line 13'; /home/milian/projects/build/llvm-project/bin/c-index-test -test-load-source all -std=c++14 /home/milian/projects/src/llvm-project/clang/test/Index/cxx14-lambdas.cpp | /home/milian/projects/build/llvm-project/bin/FileCheck -check-prefix=CHECK-LOAD /home/milian/projects/src/llvm-project/clang/test/Index/cxx14-lambdas.cpp
: 'RUN: at line 30'; env CINDEXTEST_INDEXLOCALSYMBOLS=1 /home/milian/projects/build/llvm-project/bin/c-index-test -index-file -std=c++14 /home/milian/projects/src/llvm-project/clang/test/Index/cxx14-lambdas.cpp | /home/milian/projects/build/llvm-project/bin/FileCheck -check-prefix=CHECK-INDEX /home/milian/projects/src/llvm-project/clang/test/Index/cxx14-lambdas.cpp
--
Exit Code: 1
Command Output (stderr):
--
/home/milian/projects/src/llvm-project/clang/test/Index/cxx14-lambdas.cpp:22:16: error: CHECK-LOAD: expected string not found in input
// CHECK-LOAD: cxx14-lambdas.cpp:7:27: DeclRefExpr=localA:6:9 Extent=[7:27 - 7:33]
^
<stdin>:390:1: note: scanning from here
// CHECK: cxx14-lambdas.cpp:7:59: ParmDecl=x:7:59 (Definition) Extent=[7:51 - 7:60]
^
<stdin>:402:11: note: possible intended match here
// CHECK: cxx14-lambdas.cpp:8:21: DeclRefExpr=copy:7:35 Extent=[8:21 - 8:25]
^
--
********************
Testing Time: 0.07s
********************
Failing Tests (1):
Clang :: Index/cxx14-lambdas.cpp
Unexpected Failures: 1
Re-enabling the code and building again, it works fine again:
$ make && ./bin/llvm-lit -a ~/projects/src/llvm-project/clang/test/Index/cxx14-lambdas.cpp
makeobj[0]: Entering directory `/home/milian/projects/build/llvm-project'
[5/5] Linking CXX executable bin/c-index-test
makeobj[0]: Leaving directory `/home/milian/projects/build/llvm-project'
llvm-lit: /home/milian/projects/src/llvm-project/llvm/utils/lit/lit/llvm/config.py:340: note: using clang: /home/milian/projects/build/llvm-project/bin/clang
-- Testing: 1 tests, single process --
PASS: Clang :: Index/cxx14-lambdas.cpp (1 of 1)
Script:
--
: 'RUN: at line 13'; /home/milian/projects/build/llvm-project/bin/c-index-test -test-load-source all -std=c++14 /home/milian/projects/src/llvm-project/clang/test/Index/cxx14-lambdas.cpp | /home/milian/projects/build/llvm-project/bin/FileCheck -check-prefix=CHECK-LOAD /home/milian/projects/src/llvm-project/clang/test/Index/cxx14-lambdas.cpp
: 'RUN: at line 30'; env CINDEXTEST_INDEXLOCALSYMBOLS=1 /home/milian/projects/build/llvm-project/bin/c-index-test -index-file -std=c++14 /home/milian/projects/src/llvm-project/clang/test/Index/cxx14-lambdas.cpp | /home/milian/projects/build/llvm-project/bin/FileCheck -check-prefix=CHECK-INDEX /home/milian/projects/src/llvm-project/clang/test/Index/cxx14-lambdas.cpp
--
Exit Code: 0
********************
Testing Time: 0.14s
Expected Passes : 1
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60672/new/
https://reviews.llvm.org/D60672
More information about the cfe-commits
mailing list