platform_system_core/base
George Burgess IV 582ec2b078 fix static-analyzer logging/CHECK macros
Two small changes in one:

- `foo || for (;;abort()) bar();` isn't valid C or C++, since for is a
  statement. We need an expression instead.
- we'll now treat everything after LOG(foo) as unreachable in the
  static analyzer, as long as we can prove at compile-time that
  foo == FATAL.

The impact of this, running across internal master, is that we see ~50
fewer medium/high-severity false positives from clang-tidy. We see 15
new complaints about unreachable code (at the "tidy" severity), but all
of them are harmless AFAICT (e.g.

switch (foo) {
  // ...
  default:
    LOG(FATAL) << "Unhandled case!"; // or CHECK(false);
    break; // clang-tidy: unreachable break.
})

(Some of the macros were forcibly formatted by the clang-format hook)

Bug: None
Test: Ran
`DEFAULT_GLOBAL_TIDY_CHECKS=clang-analyzer*,-clang-analyzer-alpha* m`;
stared at warn.py output.

Change-Id: Ie984eda0481afad4274b9def7c61ba777cfa289a
2017-05-03 17:16:01 -07:00
..
include/android-base fix static-analyzer logging/CHECK macros 2017-05-03 17:16:01 -07:00
.clang-format Remove extraneous .clang-format files 2017-03-14 14:06:31 -07:00
Android.bp Don't export libutils_headers from libbase 2017-04-20 10:36:32 -07:00
CPPLINT.cfg Don't show lint errors for rvalue references. 2015-04-02 18:38:01 -07:00
chrono_utils.cpp bootstat: Refactor init/utils/boot_clock into base/chrono_utils. 2017-03-30 14:24:12 -07:00
chrono_utils_test.cpp bootstat: Refactor init/utils/boot_clock into base/chrono_utils. 2017-03-30 14:24:12 -07:00
endian_test.cpp Add cross-platform <android-base/endian.h>. 2017-02-24 14:03:36 -08:00
errors_test.cpp base: add SystemErrorCodeToString() function. 2016-02-01 12:18:26 -08:00
errors_unix.cpp base: add SystemErrorCodeToString() function. 2016-02-01 12:18:26 -08:00
errors_windows.cpp base: add SystemErrorCodeToString() function. 2016-02-01 12:18:26 -08:00
file.cpp Convert opens to use unique_fd. 2017-04-05 12:30:12 -07:00
file_test.cpp Keep the ReadFileToString/ReadFdToString overhead down. 2017-03-21 13:43:08 -07:00
logging.cpp base: support logging before enter main function. 2017-01-25 15:50:47 -08:00
logging_test.cpp base: support logging before enter main function. 2017-01-25 15:50:47 -08:00
parsedouble_test.cpp libbase: add parsedouble.h. 2016-10-19 11:19:42 -07:00
parseint_test.cpp Move off std::sto* function which abort on failure. 2016-10-13 15:34:05 -07:00
parsenetaddress.cpp base: add network address parsing function from adb. 2016-01-21 20:03:33 -08:00
parsenetaddress_test.cpp base: add network address parsing function from adb. 2016-01-21 20:03:33 -08:00
properties.cpp Fix timeouts for android::base::WaitForProperty* 2017-03-27 18:05:58 -07:00
properties_test.cpp Fix timeouts for android::base::WaitForProperty* 2017-03-27 18:05:58 -07:00
quick_exit.cpp Remove mutex.h and its uses. 2016-09-16 15:58:00 -07:00
quick_exit_test.cpp base: add quick_exit emulation. 2016-09-13 17:54:50 -07:00
scopeguard_test.cpp Add android::base::ScopeGuard 2017-04-05 16:15:33 -07:00
stringprintf.cpp Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
stringprintf_test.cpp Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
strings.cpp Fix ubsan failure in android::base::Split. 2017-02-13 14:13:24 -08:00
strings_test.cpp Fix ubsan failure in android::base::Split. 2017-02-13 14:13:24 -08:00
test_main.cpp Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
test_utils.cpp libbase: fix the way to find temp dir. 2017-02-13 15:50:56 -08:00
utf8.cpp base: remove execute bit from utf8.cpp, utf8_test.cpp. 2017-04-27 19:10:07 -07:00
utf8_test.cpp base: remove execute bit from utf8.cpp, utf8_test.cpp. 2017-04-27 19:10:07 -07:00