ErezAmihud added a comment. In D152589#4410930 <https://reviews.llvm.org/D152589#4410930>, @PiotrZSL wrote:
> Even with that for me for example, I would consider `#include "xyz"` be fine, > but `#include "../xyz"` would be a red flag, so please consider adding > `StrictMode` option to check so if `StrictMode` is not set then includes from > same directory, or subdirectory would be allowed, but includes that contain > `..` would not. > With that settings, I could use that check, and probably many other users > could. I want to make sure I understand. The ideal situation would be to create `misc-no-relative-includes` check that checks for `..` in paths (meaning - relative paths), and have a `StrictMode` which does the check for angled-bracket includes. BTW The reason I initially checked for angled-bracket includes is that according to this <https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html> quote includes search in paths relative to the current file, and the angled-bracket includes check only in the defined include directories. In this case there is no risk that the include would get a file that is not relative to the include directory the user specified in the compile flags. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152589/new/ https://reviews.llvm.org/D152589 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits