File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2151,13 +2151,14 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(
21512151 isFriend = (FunctionTemplate->getFriendObjectKind () != Decl::FOK_None);
21522152 else
21532153 isFriend = (D->getFriendObjectKind () != Decl::FOK_None);
2154+
21542155 // Friend function defined withing class template may stop being function
21552156 // definition during AST merges from different modules, in this case decl
21562157 // with function body should be used for instantiation.
21572158 if (isFriend) {
2158- const FunctionDecl* Defn = nullptr ;
2159+ const FunctionDecl * Defn = nullptr ;
21592160 if (D->hasBody (Defn)) {
2160- D = const_cast <FunctionDecl*>(Defn);
2161+ D = const_cast <FunctionDecl *>(Defn);
21612162 FunctionTemplate = Defn->getDescribedFunctionTemplate ();
21622163 }
21632164 }
You can’t perform that action at this time.
0 commit comments