Update Clang static analysis Markdown doc.
Update Clang static analysis Markdown doc.
This CL adds additional information pertaining to the proper use
and maintenance of the Clang static analyzer in Chrome.
[email protected]
Bug:
Change-Id: Ie421d79440051d9285d6ead0f42eb2c4d0a69326
Reviewed-on: https://chromium-review.googlesource.com/535305
Commit-Queue: Kevin Marshall <[email protected]>
Reviewed-by: Wez <[email protected]>
Reviewed-by: Nico Weber <[email protected]>
Cr-Commit-Position: refs/heads/master@{#486241}
diff --git a/base/logging.h b/base/logging.h
index 0660e7c..582fb89 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -324,11 +324,13 @@
#define ANALYZER_ASSUME_TRUE(arg) logging::AnalyzerAssumeTrue(!!(arg))
#define ANALYZER_SKIP_THIS_PATH() \
static_cast<void>(::logging::AnalyzerNoReturn())
+#define ANALYZER_ALLOW_UNUSED(var) static_cast<void>(var);
#else // !defined(__clang_analyzer__)
#define ANALYZER_ASSUME_TRUE(arg) (arg)
#define ANALYZER_SKIP_THIS_PATH()
+#define ANALYZER_ALLOW_UNUSED(var) static_cast<void>(var);
#endif // defined(__clang_analyzer__)