Skip to content

Remove HEDLEY annotation from exception::what()#2673

Merged
nlohmann merged 1 commit into
nlohmann:developfrom
remyjette:remove-exception-annotation
Mar 23, 2021
Merged

Remove HEDLEY annotation from exception::what()#2673
nlohmann merged 1 commit into
nlohmann:developfrom
remyjette:remove-exception-annotation

Conversation

@remyjette
Copy link
Copy Markdown
Contributor

The latest MSVC compiler raises the following warning on
nlohmann::detail::exception::what() if /analyze is enabled:

vcruntime_exception.h(93) : warning C28204: 'what' has an override at
nlohmann\json\develop\single_include\nlohmann\json.hpp(2644)
and only the override is annotated for return: when an override is
annotated, the base (this function) should be similarly annotated.

See https://godbolt.org/z/r331h4


Pull request checklist

Read the Contribution Guidelines for detailed information.

  • Changes are described in the pull request, or an existing issue is referenced.
  • The test suite compiles and runs without error.
  • Code coverage is 100%. Test cases can be added by editing the test suite.
  • The source code is amalgamated; that is, after making changes to the sources in the include/nlohmann directory, run make amalgamate to create the single-header file single_include/nlohmann/json.hpp. The whole process is described here.

The latest MSVC compiler throws the following warning on
nlohmann::detail::exception::what() if /analyze is enabled:

```
vcruntime_exception.h(93) : warning C28204: 'what' has an override at
`nlohmann\json\develop\single_include\nlohmann\json.hpp(2644)`
and only the override is annotated for return: when an override is
annotated, the base (this function) should be similarly annotated.
```

See https://godbolt.org/z/r331h4
@remyjette remyjette requested a review from nlohmann as a code owner March 16, 2021 00:47
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 0a9ec38 on remyjette:remove-exception-annotation into 176d8e2 on nlohmann:develop.

Copy link
Copy Markdown
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann nlohmann self-assigned this Mar 23, 2021
@nlohmann nlohmann added this to the Release 3.9.2 milestone Mar 23, 2021
@nlohmann nlohmann merged commit 6b74772 into nlohmann:develop Mar 23, 2021
@nlohmann
Copy link
Copy Markdown
Owner

Thanks!

@nlohmann nlohmann linked an issue Mar 23, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compile errors .... chromium-style

3 participants