From 2c40911d5db1aae4fc7c709e7b8673c53431994e Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Mon, 28 Dec 2015 15:19:39 +0000 Subject: [PATCH] Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Frontend Summary: Use clang-tidy to simplify boolean conditional return statements Reviewers: dcoughlin, alexfh Subscribers: alexfh, cfe-commits Patch by Richard Thomson! Differential Revision: http://reviews.llvm.org/D10023 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256497 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp b/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp index d8269dbdad..75fa4c651a 100644 --- a/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp +++ b/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp @@ -83,10 +83,7 @@ bool ClangCheckerRegistry::isCompatibleAPIVersion(const char *versionString) { // For now, none of the static analyzer API is considered stable. // Versions must match exactly. - if (strcmp(versionString, CLANG_ANALYZER_API_VERSION_STRING) == 0) - return true; - - return false; + return strcmp(versionString, CLANG_ANALYZER_API_VERSION_STRING) == 0; } void ClangCheckerRegistry::warnIncompatible(DiagnosticsEngine *diags, -- 2.40.0