sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/Headers.cpp:26
 const char IWYUPragmaKeep[] = "// IWYU pragma: keep";
+const char IWYUPragmaExport[] = "// IWYU pragma: export";
 
----------------
or just drop to IWYUPragma and hardcode "keep" and "export" at the sites? up to 
you


================
Comment at: clang-tools-extra/clangd/Headers.cpp:144
+      return false;
+    if (Text.startswith(IWYUPragmaKeep))
+      Text = Text.drop_front(std::strlen(IWYUPragmaKeep));
----------------
why not just `if (!Text.consume_front(IWYUPragmaKeep) && 
!Text.consume_front(IWYUPragmaExport))`?

strlen makes me wary and also seems more verbose


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124170

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

Reply via email to