llvm-project/clang/lib/Sema
Ilya Biryukov 0ee4a08c00 [Sema] Pop function scope when instantiating a func with skipped body
Summary:
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 test-case,
though, since I couldn't come up with a small example in reasonable
time.

The bug was introduced in r321174.

Reviewers: bkramer, sammccall, sepavloff, aaron.ballman

Reviewed By: sammccall, aaron.ballman

Subscribers: aaron.ballman, cfe-commits

Differential Revision: https://reviews.llvm.org/D44439

llvm-svn: 327504
2018-03-14 13:18:30 +00:00
..
AnalysisBasedWarnings.cpp Re-land "[Sema] Make getCurFunction() return null outside function parsing" 2018-03-12 21:43:02 +00:00
AttributeList.cpp [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-02-20 02:16:28 +00:00
CMakeLists.txt Enabling the /bigobj flag for SemaDeclAttr.cpp. 2017-05-12 14:30:49 +00:00
CodeCompleteConsumer.cpp [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-02-20 02:16:28 +00:00
CoroutineStmtBuilder.h [coroutines] Pass coro func args to promise ctor 2018-01-24 22:15:42 +00:00
DeclSpec.cpp Again reverting an attempt to convert the DeclSpec enums into scoped enums. 2018-01-01 18:23:28 +00:00
DelayedDiagnostic.cpp [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-02-21 01:45:26 +00:00
IdentifierResolver.cpp [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-02-21 01:45:26 +00:00
JumpDiagnostics.cpp [ObjC] Allow declaring __strong pointer fields in structs in Objective-C 2018-02-28 07:15:55 +00:00
MultiplexExternalSemaSource.cpp [modules] Correctly overload getModule in the MultiplexExternalSemaSource 2018-01-22 15:27:25 +00:00
Scope.cpp Fix Scope::dump() 2018-01-18 04:28:56 +00:00
ScopeInfo.cpp [coroutines] Pass coro func args to promise ctor 2018-01-24 22:15:42 +00:00
Sema.cpp Re-land "[Sema] Make getCurFunction() return null outside function parsing" 2018-03-12 21:43:02 +00:00
SemaAccess.cpp Revert r325321 "[Sema] Take into account the current context when checking the" 2018-02-16 12:06:32 +00:00
SemaAttr.cpp -Wpragma-pack: add an additional note and fixit when warning 2017-07-31 13:37:50 +00:00
SemaCUDA.cpp Function with unparsed body is a definition 2017-06-21 12:46:57 +00:00
SemaCXXScopeSpec.cpp Add support for editor placeholders to Clang 2017-04-19 08:58:56 +00:00
SemaCast.cpp Allow the target field of a CK_ToUnion to be more easily recovered. 2017-08-15 21:42:47 +00:00
SemaChecking.cpp Reland "[Attr] Fix parameter indexing for several attributes" 2018-03-13 14:51:22 +00:00
SemaCodeComplete.cpp Remove redundant casts. NFC 2018-03-01 05:43:23 +00:00
SemaConsumer.cpp
SemaCoroutine.cpp Avoid including ScopeInfo.h from Sema.h 2018-03-07 22:48:35 +00:00
SemaDecl.cpp Check that a field is not annotated with attribute "unavailable" before 2018-03-13 23:37:51 +00:00
SemaDeclAttr.cpp Reland "[Attr] Fix parameter indexing for several attributes" 2018-03-13 14:51:22 +00:00
SemaDeclCXX.cpp Propagate DLLAttr to friend re-declarations of member functions 2018-03-08 07:34:40 +00:00
SemaDeclObjC.cpp Remove redundant casts. NFC 2018-03-01 05:43:23 +00:00
SemaExceptionSpec.cpp Remove redundant casts. NFC 2018-03-01 05:43:23 +00:00
SemaExpr.cpp Re-land "[Sema] Make getCurFunction() return null outside function parsing" 2018-03-12 21:43:02 +00:00
SemaExprCXX.cpp Re-land "[Sema] Make getCurFunction() return null outside function parsing" 2018-03-12 21:43:02 +00:00
SemaExprMember.cpp Avoid including ScopeInfo.h from Sema.h 2018-03-07 22:48:35 +00:00
SemaExprObjC.cpp Add an option to disable tail-call optimization for escaping blocks. 2018-03-02 01:53:15 +00:00
SemaFixItUtils.cpp Wire a SourceLocation into IsDerivedFrom and move the RequireCompleteType call 2015-12-18 21:45:41 +00:00
SemaInit.cpp PR36055: fix computation of *-dependence in nested initializer lists. 2018-02-07 22:25:16 +00:00
SemaLambda.cpp Avoid including ScopeInfo.h from Sema.h 2018-03-07 22:48:35 +00:00
SemaLookup.cpp Re-land "[Sema] Make getCurFunction() return null outside function parsing" 2018-03-12 21:43:02 +00:00
SemaObjCProperty.cpp Remove redundant casts. NFC 2018-03-01 05:43:23 +00:00
SemaOpenMP.cpp Re-land "[Sema] Make getCurFunction() return null outside function parsing" 2018-03-12 21:43:02 +00:00
SemaOverload.cpp [SemaOverload] Fixed crash on code completion 2018-03-09 14:43:29 +00:00
SemaPseudoObject.cpp Avoid including ScopeInfo.h from Sema.h 2018-03-07 22:48:35 +00:00
SemaStmt.cpp Re-land "[Sema] Make getCurFunction() return null outside function parsing" 2018-03-12 21:43:02 +00:00
SemaStmtAsm.cpp Re-land "[Sema] Make getCurFunction() return null outside function parsing" 2018-03-12 21:43:02 +00:00
SemaStmtAttr.cpp Now that C++17 is official (https://www.iso.org/standard/68564.html), start changing the C++1z terminology over to C++17. NFC intended, these are all mechanical changes. 2017-12-04 20:27:34 +00:00
SemaTemplate.cpp When substituting previously-checked template arguments into a template 2018-03-08 01:07:33 +00:00
SemaTemplateDeduction.cpp [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-02-22 22:35:17 +00:00
SemaTemplateInstantiate.cpp Remove redundant casts. NFC 2018-03-01 05:43:23 +00:00
SemaTemplateInstantiateDecl.cpp [Sema] Pop function scope when instantiating a func with skipped body 2018-03-14 13:18:30 +00:00
SemaTemplateVariadic.cpp Fix crash when trying to pack-expand a GNU statement expression. 2018-02-03 00:44:57 +00:00
SemaType.cpp Remove redundant casts. NFC 2018-03-01 05:43:23 +00:00
TreeTransform.h Fix a couple of places where we assumed that non-type template parameters are always rvalues. 2018-02-14 02:07:53 +00:00
TypeLocBuilder.cpp [Sema] Fix bug in TypeLocBuilder::pushImpl 2016-02-18 21:05:09 +00:00
TypeLocBuilder.h Retire llvm::alignOf in favor of C++11 alignof. 2016-10-20 14:27:22 +00:00