[PATCH] D44439: [Sema] Pop function scope when instantiating a func with skipped body

2018-03-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC327504: [Sema] Pop function scope when instantiating a func with skipped body (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D44439?vs=138333=138338#toc

[PATCH] D44439: [Sema] Pop function scope when instantiating a func with skipped body

2018-03-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D44439#1036868, @ilya-biryukov wrote: > @aaron.ballman , here's a test-case I came up with. I'll fix the other issue > (invalid error, that forces the test to fail) and submit it for review along > with the fix for the error. Does that

[PATCH] D44439: [Sema] Pop function scope when instantiating a func with skipped body

2018-03-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @aaron.ballman , here's a test-case I came up with. I'll fix the other issue (invalid error, that forces the test to fail) and submit it for review along with the fix for the error. Does that SG? template auto make_func() { struct impl { impl*

[PATCH] D44439: [Sema] Pop function scope when instantiating a func with skipped body

2018-03-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for the explanation about the tests. Repository: rC Clang https://reviews.llvm.org/D44439 ___ cfe-commits

[PATCH] D44439: [Sema] Pop function scope when instantiating a func with skipped body

2018-03-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 138333. ilya-biryukov marked 4 inline comments as done. ilya-biryukov added a comment. - Addressed review comments Repository: rC Clang https://reviews.llvm.org/D44439 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp Index:

[PATCH] D44439: [Sema] Pop function scope when instantiating a func with skipped body

2018-03-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I also came up with a test case, but it breaks because of invalid errors when function bodies are skipped. I'll make sure to include it along with a fix for the errors in a follow-up patch. Comment at:

[PATCH] D44439: [Sema] Pop function scope when instantiating a func with skipped body

2018-03-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. Test case for this change? Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3944 + // context seems wrong. Investigate more. +

[PATCH] D44439: [Sema] Pop function scope when instantiating a func with skipped body

2018-03-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3942 ActOnSkippedFunctionBody(Function); + // FIXME: finishing the function body while in an

[PATCH] D44439: [Sema] Pop function scope when instantiating a func with skipped body

2018-03-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: bkramer, sammccall, sepavloff. By calling ActOnFinishFunctionBody(). Previously we were only calling ActOnSkippedFunctionBody, which didn't pop the function scope. This causes a crash when running on our internal code. No