Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 36196 Build 36195: arc lint + arc unit
Event Timeline
llvm/lib/Support/FileCheck.cpp | ||
---|---|---|
21 | It's unsorted. Should probably be: #include "llvm/ADT/Optional.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringSet.h" (In LLD we always sort headers, I am not sure this rule applies to whole LLVM, but I think it is). But first of all I am unsure we want to include these headers after "llvm/Support/FileCheck.h" where |
llvm/lib/Support/FileCheck.cpp | ||
---|---|---|
21 | It's debatable. My thoughts were to include it if there's any use of a type that doesn't come from implementing an interface declared in FileCheck.h. So if interfaces change to no longer use StringRef for instance, headers inclusion only change in FileCheck.h and FileCheck.cpp still compiles (after changing the prototype of course) despite there still being some StringRef. But I did wonder for a while whether FileCheck.cpp needed some includes as well and am happy to not change the include there. |
llvm/lib/Support/FileCheck.cpp | ||
---|---|---|
22 | Have you read the relevant part of the coding standards? llvm/Support/FileCheck.h should be first as the file's own header. Additionally, clang-format sorts things appropriately, and the coding standards say you don't need to include headers if they're included by a referenced header. |
- Include FileCheck.h first
- Remove includes in FileCheck.cpp of headers already included in FileCheck.h
It's unsorted. Should probably be:
(In LLD we always sort headers, I am not sure this rule applies to whole LLVM, but I think it is).
But first of all I am unsure we want to include these headers after "llvm/Support/FileCheck.h" where
they are already included. Do we really want it? Why?