LLVM style puts both gtest and gmock to the end of the include list.
But llvm-include-order-check was only moving gtest headers to the end, resulting
in a false tidy-warning.
Differential Revision: https://reviews.llvm.org/D91602
return 2;
// System headers are sorted to the end.
- if (IsAngled || Filename.startswith("gtest/"))
+ if (IsAngled || Filename.startswith("gtest/") ||
+ Filename.startswith("gmock/"))
return 3;
// Other headers are inserted between the main module header and LLVM headers.
// CHECK-MESSAGES: [[@LINE+2]]:1: warning: #includes are not sorted properly
#include "j.h"
#include "gtest/foo.h"
+#include "gmock/foo.h"
#include "i.h"
#include <s.h>
#include "llvm/a.h"
// CHECK-FIXES-NEXT: #include "clang/b.h"
// CHECK-FIXES-NEXT: #include "llvm-c/d.h" // -c
// CHECK-FIXES-NEXT: #include "llvm/a.h"
+// CHECK-FIXES-NEXT: #include "gmock/foo.h"
// CHECK-FIXES-NEXT: #include "gtest/foo.h"
// CHECK-FIXES-NEXT: #include <s.h>