diff options
author | Pavel Samolysov <samolisov@gmail.com> | 2024-06-11 05:30:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 05:30:50 +0300 |
commit | 69e9e779b783bb34a3c1f73c93ca63ee6b89ab09 (patch) | |
tree | e7786893fa62faab929d98e0c4dfd853257abba5 /clang/lib/CodeGen/CGClass.cpp | |
parent | cb63abca27e1813ae58ded466cd81ba3952ab888 (diff) | |
download | llvm-69e9e779b783bb34a3c1f73c93ca63ee6b89ab09.zip llvm-69e9e779b783bb34a3c1f73c93ca63ee6b89ab09.tar.gz llvm-69e9e779b783bb34a3c1f73c93ca63ee6b89ab09.tar.bz2 |
[clang] Replace X && isa<Y>(X) with isa_and_nonnull<Y>(X). NFC (#94987)
This addresses a clang-tidy suggestion.
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index b8cb782..5a032bd 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -859,7 +859,7 @@ void CodeGenFunction::EmitConstructorBody(FunctionArgList &Args) { // Enter the function-try-block before the constructor prologue if // applicable. - bool IsTryBody = (Body && isa<CXXTryStmt>(Body)); + bool IsTryBody = isa_and_nonnull<CXXTryStmt>(Body); if (IsTryBody) EnterCXXTryStmt(*cast<CXXTryStmt>(Body), true); @@ -1475,7 +1475,7 @@ void CodeGenFunction::EmitDestructorBody(FunctionArgList &Args) { // If the body is a function-try-block, enter the try before // anything else. - bool isTryBody = (Body && isa<CXXTryStmt>(Body)); + bool isTryBody = isa_and_nonnull<CXXTryStmt>(Body); if (isTryBody) EnterCXXTryStmt(*cast<CXXTryStmt>(Body), true); EmitAsanPrologueOrEpilogue(false); |