Commit 88602533 authored by Zequan Wu's avatar Zequan Wu Committed by Chromium LUCI CQ

Add [[clang::nomerge]] attribute to ~CheckError().

To disable merging multiple ~CheckError() destructor for accurate crash logs.

Bug: 1153188
Change-Id: If6d153661667a63f13b645f6d284eb3d5ea3a300
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611331
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Zequan Wu <zequanwu@google.com>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844989}
parent 2de58a02
......@@ -85,7 +85,7 @@ class BASE_EXPORT CheckError {
// Stream for adding optional details to the error message.
std::ostream& stream();
~CheckError();
NOMERGE ~CheckError();
CheckError(const CheckError& other) = delete;
CheckError& operator=(const CheckError& other) = delete;
......
......@@ -332,4 +332,11 @@ inline constexpr bool AnalyzerAssumeTrue(bool arg) {
#endif // defined(__clang_analyzer__)
// Use nomerge attribute to disable optimization of merging multiple same calls.
#if defined(__clang__) && __has_attribute(nomerge) && !defined(OS_CHROMEOS)
#define NOMERGE [[clang::nomerge]]
#else
#define NOMERGE
#endif
#endif // BASE_COMPILER_SPECIFIC_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment