[NFC] Replace not-null and not-isa check with a not-isa_and_nonnull
authorErich Keane <erich.keane@intel.com>
Tue, 10 May 2022 20:34:01 +0000 (13:34 -0700)
committerErich Keane <erich.keane@intel.com>
Tue, 10 May 2022 20:34:07 +0000 (13:34 -0700)
clang/lib/Sema/AnalysisBasedWarnings.cpp

index bf282bb..164fea6 100644 (file)
@@ -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;