Skip to content

Commit d12ee9b

Browse files
committed
Stop binding a constant reference to a temporary that goes away.
Thank you, ASan.
1 parent 2f99a4e commit d12ee9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/ASTScopeCreation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ ASTSourceFileScope::ASTSourceFileScope(SourceFile *SF,
269269
case MacroRole::Peer: {
270270
ASTContext &ctx = SF->getASTContext();
271271
SourceManager &sourceMgr = ctx.SourceMgr;
272-
const auto &generatedSourceInfo =
272+
auto generatedSourceInfo =
273273
*sourceMgr.getGeneratedSourceInfo(*SF->getBufferID());
274274

275275
ASTNode node = ASTNode::getFromOpaqueValue(generatedSourceInfo.astNode);

0 commit comments

Comments
 (0)