[PATCH] D10023: Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Frontend

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 28 07:23:14 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL256497: Refactor: Simplify boolean conditional return statements in… (authored by alexfh).

Changed prior to commit:
  http://reviews.llvm.org/D10023?vs=38312&id=43689#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D10023

Files:
  cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp

Index: cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
===================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
@@ -83,10 +83,7 @@
 
   // 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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10023.43689.patch
Type: text/x-patch
Size: 650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151228/1453e629/attachment.bin>


More information about the cfe-commits mailing list