[PATCH] D124262: compile commands header to source heuristic lower-cases filenames before inferring file types
Ishaan Gandhi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 25 07:59:52 PDT 2022
ishaangandhi added inline comments.
Comment at: clang/unittests/Tooling/CompilationDatabaseTest.cpp:852
+ // Proxies for ".H" files are ".C" files, and not ".cpp files"
+ EXPECT_EQ(getProxy("foo/bar/baz/exact.H"), "foo/bar/baz/exact.C");
> Is this really what you intend to test?
> I think our goal here is to treat `.H` and `.C` as C++ rather than C, not to link them together in some way. If the current file is `foo.H`, then `foo.cpp` and `foo.C` should be equally compelling candidates, but both beat `foo.c`.
Bleh brain fart. You're right. "exact.C" should win over "exact.c", not necessarily "exact.cpp".
CHANGES SINCE LAST ACTION
More information about the cfe-commits