[clang] eadeabb - [NFC] Replace not-null and not-isa check with a not-isa_and_nonnull
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue May 10 13:34:11 PDT 2022
Author: Erich Keane
Date: 2022-05-10T13:34:07-07:00
New Revision: eadeabbe10f5096b12e488e7bd8e2292429b5e08
URL: https://github.com/llvm/llvm-project/commit/eadeabbe10f5096b12e488e7bd8e2292429b5e08
DIFF: https://github.com/llvm/llvm-project/commit/eadeabbe10f5096b12e488e7bd8e2292429b5e08.diff
LOG: [NFC] Replace not-null and not-isa check with a not-isa_and_nonnull
Added:
Modified:
clang/lib/Sema/AnalysisBasedWarnings.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/AnalysisBasedWarnings.cpp b/clang/lib/Sema/AnalysisBasedWarnings.cpp
index bf282bbb400dc..164fea6a449b5 100644
--- a/clang/lib/Sema/AnalysisBasedWarnings.cpp
+++ b/clang/lib/Sema/AnalysisBasedWarnings.cpp
@@ -1272,7 +1272,7 @@ static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC,
for (const CFGBlock *B : llvm::reverse(*Cfg)) {
const Stmt *Label = B->getLabel();
- if (!Label || !isa<SwitchCase>(Label))
+ if (!isa_and_nonnull<SwitchCase>(Label))
continue;
int AnnotatedCnt;
More information about the cfe-commits
mailing list