================
@@ -2625,9 +2625,11 @@
AddOrdinaryNameResults(SemaCodeCompletion::ParserCompletionContext CCC,
// "return expression ;" or "return ;", depending on the return type.
QualType ReturnType;
- if (const auto *Function = dyn_cast<FunctionDecl>(SemaRef.CurContext))
- ReturnType = Function->getReturnType();
- else if (const auto *Method = dyn_cast<ObjCMethodDecl>(SemaRef.CurContext))
+ if (const auto *Function = dyn_cast<FunctionDecl>(SemaRef.CurContext)) {
+ if (!Function->getType().isNull())
----------------
AaronBallman wrote:
Thank you for checking!
https://github.com/llvm/llvm-project/pull/206373
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits