Skip to content

Commit

Permalink
ReflowComments: false
Browse files Browse the repository at this point in the history
This has an interesting side-effect on comments for pragmas. Manually tweaked to something that looks ok and is not modified by clang-format anymore.
  • Loading branch information
Ralf W. Grosse-Kunstleve committed Feb 5, 2022
1 parent 60b7eb4 commit 59572e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ IndentCaseLabels: true
IndentPPDirectives: AfterHash
IndentWidth: 4
Language: Cpp
ReflowComments: false
SpaceAfterCStyleCast: true
Standard: Cpp11
TabWidth: 4
Expand Down
6 changes: 3 additions & 3 deletions include/pybind11/detail/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -956,9 +956,9 @@ PYBIND11_NAMESPACE_END(detail)

#if defined(_MSC_VER)
# pragma warning(push)
# pragma warning( \
disable : 4275) // warning C4275: An exported class was derived from a class that wasn't
// exported. Can be ignored when derived from a STL class.
# pragma warning(disable : 4275)
// warning C4275: An exported class was derived from a class that wasn't exported.
// Can be ignored when derived from a STL class.
#endif
/// C++ bindings of builtin Python exceptions
class PYBIND11_EXPORT_EXCEPTION builtin_exception : public std::runtime_error {
Expand Down
6 changes: 3 additions & 3 deletions include/pybind11/pytypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ PYBIND11_NAMESPACE_END(detail)

#if defined(_MSC_VER)
# pragma warning(push)
# pragma warning( \
disable : 4275 4251) // warning C4275: An exported class was derived from a class that
// wasn't exported. Can be ignored when derived from a STL class.
# pragma warning(disable : 4275 4251)
// warning C4275: An exported class was derived from a class that wasn't exported.
// Can be ignored when derived from a STL class.
#endif
/// Fetch and hold an error which was already set in Python. An instance of this is typically
/// thrown to propagate python-side errors back through C++ which can either be caught manually or
Expand Down

0 comments on commit 59572e6

Please sign in to comment.