Skip to content

Commit

Permalink
Address -bugprone-unchecked-optional-access
Browse files Browse the repository at this point in the history
  • Loading branch information
Baltoli committed Dec 18, 2023
1 parent fcc171b commit 7428ab4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Checks:
-bugprone-unused-return-value
-bugprone-assignment-in-if-condition
-bugprone-branch-clone
-bugprone-unchecked-optional-access
-bugprone-sizeof-expression
-bugprone-implicit-widening-of-multiplication-result
modernize-*
Expand Down
2 changes: 1 addition & 1 deletion tools/k-rule-apply/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int main(int argc, char **argv) {
auto InitialConfiguration = parser.pattern();

auto match_function_name = getMatchFunctionName();
if (match_function_name == std::nullopt) {
if (!match_function_name.has_value()) {
std::cerr << "Rule with label " << RuleLabel << " does not exist.\n";
return EXIT_FAILURE;
}
Expand Down

0 comments on commit 7428ab4

Please sign in to comment.