Skip to content

Commit fcec8b5

Browse files
committed
Make sure we cache the synthesized declaration
1 parent da08b96 commit fcec8b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/AST/ASTContext.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,8 @@ DECL_CLASS *ASTContext::get##NAME##Decl() const { \
995995
} \
996996
} \
997997
} \
998-
return synthesizeBuiltinDecl<DECL_CLASS>(*this, #NAME); \
998+
getImpl().NAME##Decl = synthesizeBuiltinDecl<DECL_CLASS>(*this, #NAME); \
999+
return getImpl().NAME##Decl; \
9991000
} \
10001001
\
10011002
Type ASTContext::get##NAME##Type() const { \

0 commit comments

Comments
 (0)