This leads to ".C" files being rewritten as ".c" files and being inferred to be "c" files as opposed to "c++" files.
See https://github.com/clangd/clangd/issues/1108 for the original bug report.
Differential D124262
compile commands header to source heuristic lower-cases filenames before inferring file types ishaangandhi on Apr 22 2022, 7:36 AM. Authored by
Details This leads to ".C" files being rewritten as ".c" files and being inferred to be "c" files as opposed to "c++" files. See https://github.com/clangd/clangd/issues/1108 for the original bug report.
Diff Detail
Event TimelineComment Actions Change looks good, thank you! Can you add a test demonstrating it, and update the diff here? (If you can, please create diffs with context using -U99999 - this lets us see more context around the changed lines in phabricator)
Comment Actions Test case added, re-diffed with -U9999, and removed redundant constructor. Thanks for the quick feedback, @sammccall! (I didn't wait for the tests to run locally, I am hoping to use your CI systems to do that. It seems like a simple enough of a test that I hope I can get it right on the first try.) Comment Actions Unfortunately it looks like you've created a patch that phabricator can render, but the precommit CI can't apply (it's using git apply).
Comment Actions Made test case reflect that proxies for ".H" files are ".C" files, and not ".c files". Comment Actions Thanks! |
nit: StringRef() isn't needed here, conversion will happen implicitly.
(The one on 329 is needed because the overload set of StringSaver::save is ambiguous)