Skip to content

Commit

Permalink
[lint] Disable modernize-use-nodiscard (pytorch#68354)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#68354

Lint rule: https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nodiscard.html

This check adds a ton of noise to our diffs. `[[nodiscard]]` is typically only useful when ignoring the return value of a function is a critical error, e.g. for `operator new`.

Test Plan: Verified that the lint does not get triggered

Reviewed By: hlu1

Differential Revision: D32429731

fbshipit-source-id: ca3d90686ec8d419d3f96167140dc406df6f4a53
  • Loading branch information
Mike Iovine authored and facebook-github-bot committed Nov 15, 2021
1 parent c697eeb commit ccd9675
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ modernize-*,
-modernize-use-default-member-init,
-modernize-use-using,
-modernize-use-trailing-return-type,
-modernize-use-nodiscard,
performance-*,
-performance-noexcept-move-constructor,
-performance-unnecessary-value-param,
Expand Down

0 comments on commit ccd9675

Please sign in to comment.