[PATCH] D96744: clang-format IncludeBlocks: Regroup determination of "main" for framework-style includes fix
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 16 01:00:16 PST 2021
MyDeveloperDay added a comment.
I think I'd be concern about the `<string.h>` case (lets ignore the fact that I should be including <string>
so imagine I'm writing a string class and I have
string.cpp including "string.h"
but as part of my string class because I'm somehow extending std::string
#include "string.h"
#include <string.h>
class mystring : public std::string
{
}
Which file wins?
I think lots of people will always consider `<>` to mean system paths, I think if there is any chance that `<>` could change the order then I think it needs to be an option that is off by default.
I don't think this is a bug, I think you are asking for an enhancement.
================
Comment at: clang/lib/Tooling/Inclusions/HeaderIncludes.cpp:237
- if (!IncludeName.startswith("\""))
- return false;
-
----------------
Does this need to be an option?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96744/new/
https://reviews.llvm.org/D96744
More information about the cfe-commits
mailing list