Skip to content

Commit

Permalink
[StaticAnalyzer] Fix warnings about missing override
Browse files Browse the repository at this point in the history
This patch fixes:

  clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:609:23:
  error: 'describe' overrides a member function but is not marked
  'override' [-Werror,-Winconsistent-missing-override]

  clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:627:23:
  error: 'describe' overrides a member function but is not marked
  'override' [-Werror,-Winconsistent-missing-override]
  • Loading branch information
kazutakahirata committed Nov 16, 2023
1 parent 34e4e5e commit f8e8530
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ class StdLibraryFunctionsChecker
return errno_modeling::setErrnoForStdSuccess(State, C);
}

const std::string describe(CheckerContext &C) const {
const std::string describe(CheckerContext &C) const override {
return "'errno' becomes undefined after the call";
}
};
Expand All @@ -624,7 +624,7 @@ class StdLibraryFunctionsChecker
Call.getOriginExpr());
}

const std::string describe(CheckerContext &C) const {
const std::string describe(CheckerContext &C) const override {
return "reading 'errno' is required to find out if the call has failed";
}
};
Expand Down

0 comments on commit f8e8530

Please sign in to comment.