================
@@ -1503,8 +1506,27 @@ void ResultBuilder::AddResult(Result R, DeclContext
*CurContext,
}
OverloadSet.Add(Method, Results.size());
}
-
- R.FunctionCanBeCall = canFunctionBeCalled(R.getDeclaration(), BaseExprType);
+ R.DeclaringEntity = IsInDeclarationContext;
+ R.IsAddressOfOperand = IsAddressOfOperand;
+ R.FunctionCanBeCall = canFunctionBeCalled(R.getDeclaration(), BaseExprType)
||
----------------
HighCommander4 wrote:
> The first is to add `&& !IsAddressOfOperand`, as a way of avoiding needing to
> store the `IsAddressOfOperand` flag separately.
>
> I do think that change deserves a comment such as this:
>
> ```
> // If the user wrote `&` before the function name, assume the
> // user is more likely to take the address of the function rather
> // than call it and take the address of the result.
> ```
This comment was missing; I went ahead and pushed a commit to add it.
Otherwise, the updates look great! I think this should be ready to merge.
https://github.com/llvm/llvm-project/pull/165916
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits