================
@@ -236,8 +236,13 @@ getFunctionSourceCode(const FunctionDecl *FD, const
DeclContext *TargetContext,
if (Ref.Qualifier || Ref.Targets.empty() || Ref.NameLoc.isMacroID())
return;
// Only qualify return type and function name.
- if (Ref.NameLoc != FD->getReturnTypeSourceRange().getBegin() &&
- Ref.NameLoc != FD->getLocation())
+ auto ReturnTypeRange = FD->getReturnTypeSourceRange();
----------------
vbvictor wrote:
this could be made inside `if` to reduce scope.
```cpp
if (auto ReturnTypeRange = FD->getReturnTypeSourceRange(); Ref.NameLoc !=
FD->getLocation() ...)
```
https://github.com/llvm/llvm-project/pull/173606
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits