This patch adds new directive CHECK-INCLUDE - directive to include other file with checks to another.
Details
Diff Detail
Event Timeline
Looks super useful :). I have some initial comments -- please clang-format and upload a diff with more context and I'll take a closer look.
utils/FileCheck/FileCheck.cpp | ||
---|---|---|
38 | This seems a bit arbitrary. Why not use a DFS? E.g; containsIncludeCycle(MainFile, IncludeFile) { if (Includes[IncludeFile].contains(MainFile)) return true for (Include in Includes[IncludeFile]) if (containsIncludeCycle(Include, MainFile)) return true return false } | |
990 | const std::string &Directory to avoid a copy. | |
991 | Use llvm::sys::path::append. Also note that in this line, you're taking a reference to a stack temporary (the result of the std::string concatenation should be destroyed after this line). This looks like a use-after-free. | |
1003 | Is there some way to avoid moving the code into this else branch? If not that's OK. Otherwise, it would really help to keep unmodified code out of this diff (makes it easier to inspect the diff). |
This seems a bit arbitrary. Why not use a DFS? E.g;