Small DCHECK styleguide wording change.
Change the guidance for existing DCHECK code to be clearer about what to do.
Change-Id: Ica986245de4b501ee1cf332b1684b6e762a3623a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4347973
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Auto-Submit: Vincent Scheib <scheib@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1118410}
diff --git a/styleguide/c++/c++.md b/styleguide/c++/c++.md
index 3f3fd4f0c..5ac1ebb6 100644
--- a/styleguide/c++/c++.md
+++ b/styleguide/c++/c++.md
@@ -315,8 +315,9 @@
production, you may fall back to `DCHECK()`. Do not do this unless
necessary.
* Historically, Chromium code used `DCHECK()` in most cases, so a great deal
- of existing code uses `DCHECK()` instead of `CHECK()`. You are welcome (and
- encouraged) to migrate to `CHECK()` where the above exception is not true.
+ of existing code uses `DCHECK()` instead of `CHECK()`. You are encouraged
+ to migrate to `CHECK()` or add a comment explaining why DCHECK is
+ appropriate given the current guidance.
Use `NOTREACHED_NORETURN()` to indicate a piece of code is unreachable. Control
flow does not leave this call, so there should be no executable statements after