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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 14 04:49:42 PDT 2018


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.
+      ActOnFinishFunctionBody(Function, nullptr, /*IsInstantiation=*/true);
     } else {
----------------
Rather than having two paths that call the same function, why not hoist the call out to the common path?


================
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3967
       // context seems wrong. Investigate more.
-      ActOnFinishFunctionBody(Function, Body.get(),
-                              /*IsInstantiation=*/true);
+      ActOnFinishFunctionBody(Function, Body.get(), /*IsInstantiation=*/true);
     }
----------------
This change looks unrelated to the patch.


Repository:
  rC Clang

https://reviews.llvm.org/D44439





More information about the cfe-commits mailing list