Hello Nikos Nikoleris, Curtis Dunham,

I'd like you to do a code review. Please visit

    https://gem5-review.googlesource.com/3120

to review the following change.


Change subject: style: Treat PyBind headers as Python headers
......................................................................

style: Treat PyBind headers as Python headers

Some PyBind11 headers need to include Python.h. This means that we need
to include PyBind11 headers before any standard library headers. Enforce
this by applying the Python.hh rules for anything in pybind11/.

Change-Id: Id175a4f613960a17f84f98b81bfd02806e905d5a
Signed-off-by: Andreas Sandberg <[email protected]>
Reviewed-by: Nikos Nikoleris <[email protected]>
Reviewed-by: Curtis Dunham <[email protected]>
---
M util/style/sort_includes.py
1 file changed, 3 insertions(+), 0 deletions(-)



diff --git a/util/style/sort_includes.py b/util/style/sort_includes.py
index d1a25ee..cb88fec 100644
--- a/util/style/sort_includes.py
+++ b/util/style/sort_includes.py
@@ -158,6 +158,8 @@
     includes_re = (
         ('main', '""', _include_matcher_main()),
         ('python', '<>', _include_matcher_fname("^Python\.h$")),
+        ('pybind', '""', _include_matcher_fname("^pybind11/.*\.h$",
+                                                delim='""')),
         ('c', '<>', _include_matcher_fname("^.*\.h$")),
         ('stl', '<>', _include_matcher_fname("^\w+$")),
         ('cc', '<>', _include_matcher_fname("^.*\.(hh|hxx|hpp|H)$")),
@@ -170,6 +172,7 @@

     block_order = (
         ('python', ),
+        ('pybind', ),
         ('main', ),
         ('c', ),
         ('stl', ),

--
To view, visit https://gem5-review.googlesource.com/3120
To unsubscribe, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id175a4f613960a17f84f98b81bfd02806e905d5a
Gerrit-Change-Number: 3120
Gerrit-PatchSet: 1
Gerrit-Owner: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Curtis Dunham <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to