We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e81792a commit 9e8950aCopy full SHA for 9e8950a
clang/lib/AST/Expr.cpp
@@ -1618,8 +1618,7 @@ QualType CallExpr::getCallReturnType(const ASTContext &Ctx) const {
1618
std::pair<const NamedDecl *, const Attr *>
1619
CallExpr::getUnusedResultAttr(const ASTContext &Ctx) const {
1620
// If the callee is marked nodiscard, return that attribute
1621
- const Decl *D = getCalleeDecl();
1622
- if (D != nullptr)
+ if (const Decl *D = getCalleeDecl())
1623
if (const auto *A = D->getAttr<WarnUnusedResultAttr>())
1624
return {nullptr, A};
1625
0 commit comments