Skip to content

Commit 1c883ff

Browse files
committed
address comments
1 parent 139531b commit 1c883ff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/include/clang/AST/ASTLambda.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ inline bool isLambdaCallOperator(const DeclContext *DC) {
3737
}
3838

3939
inline bool isLambdaMethod(const DeclContext *DC) {
40-
if (auto *MD = dyn_cast_or_null<CXXMethodDecl>(DC); MD)
40+
if (const auto *MD = dyn_cast_if_present<CXXMethodDecl>(DC))
4141
return MD->getParent()->isLambda();
4242
return false;
4343
}

clang/include/clang/Sema/Sema.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13109,8 +13109,8 @@ class Sema final : public SemaBase {
1310913109
? ExpressionEvaluationContext::ImmediateFunctionContext
1311013110
: ExpressionEvaluationContext::PotentiallyEvaluated);
1311113111
if (FD) {
13112-
auto &Current = S.currentEvaluationContext(),
13113-
Parent = S.parentEvaluationContext();
13112+
auto &Current = S.currentEvaluationContext();
13113+
const auto &Parent = S.parentEvaluationContext();
1311413114

1311513115
FD->setWillHaveBody(true);
1311613116
Current.InImmediateFunctionContext =

0 commit comments

Comments
 (0)