File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ static std::string translate(llvm::StringRef Value) {
7171BoolBitwiseOperationCheck::BoolBitwiseOperationCheck (StringRef Name,
7272 ClangTidyContext *Context)
7373 : ClangTidyCheck(Name, Context),
74- StrictMode (Options.get(" StrictMode" , true )),
74+ StrictMode (Options.get(" StrictMode" , false )),
7575 IgnoreMacros(Options.get(" IgnoreMacros" , false )) {}
7676
7777void BoolBitwiseOperationCheck::storeOptions (
@@ -114,8 +114,8 @@ void BoolBitwiseOperationCheck::check(const MatchFinder::MatchResult &Result) {
114114 if (HasVolatileOperand)
115115 return ;
116116
117- const bool HasSideEffects =
118- MatchedExpr-> getRHS ()-> HasSideEffects ( *Result.Context , StrictMode);
117+ const bool HasSideEffects = MatchedExpr-> getRHS ()-> HasSideEffects (
118+ *Result.Context , /* IncludePossibleEffects= */ ! StrictMode);
119119 if (HasSideEffects)
120120 return ;
121121
Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ Options
3838
3939.. option :: StrictMode
4040
41- Disabling this option promotes more fix-it hints even when they might
42- change evaluation order or skip side effects. Default value is `true `.
41+ Enabling this option promotes more fix-it hints even when they might
42+ change evaluation order or skip side effects. Default value is `false `.
4343
4444.. option :: IgnoreMacros
4545
Original file line number Diff line number Diff line change 11// RUN: %check_clang_tidy %s misc-bool-bitwise-operation %t \
22// RUN: -config="{CheckOptions: { \
3- // RUN: misc-bool-bitwise-operation.StrictMode: false }}"
3+ // RUN: misc-bool-bitwise-operation.StrictMode: true }}"
44
55bool function_with_possible_side_effects ();
66
You can’t perform that action at this time.
0 commit comments