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 *-msv
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&id=61035#toc
Repository:
rL LLVM
http://reviews.llvm.
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
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
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
lib/Sema/SemaD
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 *mem-initializ
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 t
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
lib/Par
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 lette
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