adamcz added inline comments.
================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1922
+ Line.consume_front("include") || Line.consume_front("import") ||
+ Line.consume_front("import_next");
+ Line = Line.ltrim();
----------------
Did you mean include_next?
Also, this will never trigger, because you already consumed import before, so
you'd need "#importimport_next" ;-) Reverse the order.
You should also return false if the whole || thing is not true.
================
Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:2846
+ "#include \"foo.h\"^",
+ "#error <^",
+ };
----------------
Add test for "#<^" here, since it should be false, but I think it will be true
right now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79456/new/
https://reviews.llvm.org/D79456
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits