From 2edde06c07cc3cd58ab156d9598d75e1cff1e7de Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 7 Jun 2018 12:48:53 +0200 Subject: [PATCH] Fix clang-format include order issues Signed-off-by: Clifford Wolf --- .clang-format | 8 +++----- common/pybindings.cc | 4 +++- dummy/pybindings.cc | 2 ++ ice40/pybindings.cc | 2 ++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.clang-format b/.clang-format index d825df6f..8b3158bb 100644 --- a/.clang-format +++ b/.clang-format @@ -47,12 +47,10 @@ DisableFormat: false ExperimentalAutoDetectBinPacking: false ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] IncludeCategories: - - Regex: '^"(llvm|llvm-c|clang|clang-c)/' - Priority: 2 - - Regex: '^(<|"(gtest|isl|json)/)' - Priority: 3 - - Regex: '.*' + - Regex: '<.*>' Priority: 1 + - Regex: '.*' + Priority: 2 IndentCaseLabels: false IndentWidth: 4 IndentWrappedFunctionNames: false diff --git a/common/pybindings.cc b/common/pybindings.cc index 7a542dc1..10c8fd44 100644 --- a/common/pybindings.cc +++ b/common/pybindings.cc @@ -21,9 +21,11 @@ #include "design.h" #include "chip.h" -#include "pybindings.h" #include "emb.h" +// include after design.h/chip.h +#include "pybindings.h" + // Required to determine concatenated module name (which differs for different archs) #define PASTER(x, y) x ## _ ## y #define EVALUATOR(x, y) PASTER(x,y) diff --git a/dummy/pybindings.cc b/dummy/pybindings.cc index a19479a0..3a586234 100644 --- a/dummy/pybindings.cc +++ b/dummy/pybindings.cc @@ -20,6 +20,8 @@ #include "design.h" #include "chip.h" + +// include after design.h/chip.h #include "pybindings.h" void arch_wrap_python() { diff --git a/ice40/pybindings.cc b/ice40/pybindings.cc index dc13f849..3760e319 100644 --- a/ice40/pybindings.cc +++ b/ice40/pybindings.cc @@ -20,6 +20,8 @@ #include "design.h" #include "chip.h" + +// include after design.h/chip.h #include "pybindings.h" void arch_wrap_python() {