Re: [PATCH] D20821: Fix a few issues while skipping function bodies

2016-06-16 Thread NAKAMURA Takumi via cfe-commits
chapuni added a subscriber: chapuni. Comment at: cfe/trunk/unittests/Tooling/ToolingTest.cpp:315 @@ -262,1 +314,3 @@ + runToolOnCode(new SkipBodyAction, +"template int skipMeNot() { an_error_here }")); } It didn't pass for targeting

Re: [PATCH] D20821: Fix a few issues while skipping function bodies

2016-06-16 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272963: Fix a few issues while skipping function bodies (authored by ogoffart). Changed prior to commit: http://reviews.llvm.org/D20821?vs=60340=61035#toc Repository: rL LLVM

Re: [PATCH] D20821: Fix a few issues while skipping function bodies

2016-06-16 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D20821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D20821: Fix a few issues while skipping function bodies

2016-06-10 Thread Olivier Goffart via cfe-commits
ogoffart updated this revision to Diff 60340. ogoffart added a comment. Using Parser::ConsumeAndStoreFunctionPrologue this time http://reviews.llvm.org/D20821 Files: lib/Parse/ParseCXXInlineMethods.cpp lib/Parse/ParseObjc.cpp lib/Parse/ParseStmt.cpp lib/Parse/Parser.cpp

Re: [PATCH] D20821: Fix a few issues while skipping function bodies

2016-06-09 Thread Richard Smith via cfe-commits
rsmith added a comment. Please call `Parser::ConsumeAndStoreFunctionPrologue` rather than trying to reinvent it. You're still getting a number of cases wrong that it handles properly. You also need to handle the case where the code completion token appears within the constructor

Re: [PATCH] D20821: Fix a few issues while skipping function bodies

2016-06-09 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. The idea is that when we see a ") {" or "} {" in the ctor-initializers, (optionally with "..."), it is necessarily the start of the body. Unless there might be lambda expressions within a template aregument, as in: A::A() : Base<[](){return 42; }()>(){} But

Re: [PATCH] D20821: Fix a few issues while skipping function bodies

2016-06-01 Thread Olivier Goffart via cfe-commits
ogoffart updated this revision to Diff 59197. ogoffart added a comment. Right, i forgot about the C++11 initializer list syntax. I hope I got it right now. http://reviews.llvm.org/D20821 Files: lib/Parse/ParseCXXInlineMethods.cpp lib/Parse/ParseObjc.cpp lib/Parse/ParseStmt.cpp

Re: [PATCH] D20821: Fix a few issues while skipping function bodies

2016-05-31 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Parse/ParseStmt.cpp:1989 @@ +1988,3 @@ +if (Tok.is(tok::colon)) { + // skip constructor initializer list + SkipUntil(tok::l_brace, StopAtSemi | StopBeforeMatch); Comments should start with a capital

[PATCH] D20821: Fix a few issues while skipping function bodies

2016-05-31 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added reviewers: cfe-commits, rsmith, akyrtzi. Herald added a subscriber: klimek. Fix a few issues while skipping function bodies - In functions with try { } catch { }, only the try block would be skipped, not the catch blocks - The template