dgoldman added inline comments.

================
Comment at: clang/unittests/Tooling/HeaderIncludesTest.cpp:65
 
+TEST_F(HeaderIncludesTest, InsertImportWithSameInclude) {
+  std::string Code = "#include \"a.h\"\n";
----------------
kadircet wrote:
> can you also add a removal test?
> 
> i know we didn't change the implementation, but today there's nothing 
> checking the behaviour. so explicitly encoding the expectation here, 
> especially for the case where we have both #include and #import with same 
> spelling is useful. btw is it likely that `#include "foo.h"` and `#import 
> "foo.h"` can refer to different physical headers (e.g. due to framework 
> handling and whatnot)?
> 
> we're not changing the behaviour today, but if there's a difference, this is 
> likely a bug (that already exists), so we should leave a fixme (or address it 
> here if you got time, by introducing a IncludeDirective parameter into 
> remove. updating users is likely harder in this case, as everyone needs to 
> propagate/store the directive during their analysis).
No, I don't think #import and #include can refer to different headers.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128677/new/

https://reviews.llvm.org/D128677

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

Reply via email to