ilya-biryukov added a comment.

In, @simark wrote:

> If I do it in this order, I get one diagnostic both times, when I don't 
> expect one the second time the file is parsed.  But if I do it the other way 
> (first parse with no errors, second parse with an error), it works fine.

That looks like another preamble-handling bug. It's much easier to fix and it's 
clangd-specific, so I'll make sure to fix that soon.
Thanks for bringing this up, we haven't been testing compile command changes 
thoroughly. I'll come up with a fix shortly.

Before this is fixed, you could try writing a similar test with other, 
non-preprocessor, flags. See `ClangdVFSTest.ForceReparseCompileCommand` that 
tests a similar thing by changing `-xc` to `-xc++`.
I'll make sure to test the `-D` case when fixing the bug.

  rCTE Clang Tools Extra

cfe-commits mailing list

Reply via email to