From 3bddb62daa3a2caefb04cf48b39b3bcec73b0588 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 3 May 2012 17:56:49 +0000 Subject: [PATCH] Fix a couple of cases of (innocuous) unmarked fallthrough. At least one of these was unintentional. Found by -Wimplicit-fallthrough, patch by Alexander Kornienko! llvm-svn: 156082 --- clang/include/clang/AST/RecursiveASTVisitor.h | 1 + clang/include/clang/Analysis/Analyses/FormatString.h | 1 + 2 files changed, 2 insertions(+) diff --git a/clang/include/clang/AST/RecursiveASTVisitor.h b/clang/include/clang/AST/RecursiveASTVisitor.h index 8a6e85f226ab..a9a98d77ba27 100644 --- a/clang/include/clang/AST/RecursiveASTVisitor.h +++ b/clang/include/clang/AST/RecursiveASTVisitor.h @@ -1400,6 +1400,7 @@ bool RecursiveASTVisitor::TraverseClassInstantiations( case TSK_Undeclared: case TSK_ImplicitInstantiation: TRY_TO(TraverseDecl(SD)); + break; // We don't need to do anything on an explicit instantiation // or explicit specialization because there will be an explicit diff --git a/clang/include/clang/Analysis/Analyses/FormatString.h b/clang/include/clang/Analysis/Analyses/FormatString.h index 9ec27ce91dba..f99b97a1898a 100644 --- a/clang/include/clang/Analysis/Analyses/FormatString.h +++ b/clang/include/clang/Analysis/Analyses/FormatString.h @@ -175,6 +175,7 @@ public: switch (kind) { case PrintErrno: assert(IsPrintf); + return false; case PercentArg: return false; default: -- GitLab