Skip to content

Commit 739b574

Browse files
committed
Added comments based on review feedback.
(cherry picked from commit 1d602f2)
1 parent 8e661a0 commit 739b574

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/Sema/PCMacro.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ class Instrumenter : InstrumenterBase {
287287

288288
DeferStmt *transformDeferStmt(DeferStmt *DS) {
289289
if (auto *FD = DS->getTempDecl()) {
290+
// Temporarily unmark the DeferStmt's FuncDecl as implicit so it is
291+
// transformed (as typically implicit Decls are skipped by the
292+
// transformer).
290293
auto Implicit = FD->isImplicit();
291294
FD->setImplicit(false);
292295
auto *D = transformDecl(FD);

lib/Sema/PlaygroundTransform.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ class Instrumenter : InstrumenterBase {
157157

158158
DeferStmt *transformDeferStmt(DeferStmt *DS) {
159159
if (auto *FD = DS->getTempDecl()) {
160+
// Temporarily unmark the DeferStmt's FuncDecl as implicit so it is
161+
// transformed (as typically implicit Decls are skipped by the
162+
// transformer).
160163
auto Implicit = FD->isImplicit();
161164
FD->setImplicit(false);
162165
auto *D = transformDecl(FD);

0 commit comments

Comments
 (0)