ilya-biryukov added a comment.

In https://reviews.llvm.org/D39571#1007393, @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.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D39571



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to