PaulkaToast added inline comments.

================
Comment at: 
clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.cpp:66-67
+    const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) 
{
+  SmallString<128> CompilerIncudeDir =
+      StringRef(PP->getHeaderSearchInfo().getHeaderSearchOpts().ResourceDir);
+  llvm::sys::path::append(CompilerIncudeDir, "include");
----------------
aaron.ballman wrote:
> The user can control this path -- is that an issue? You're using it to 
> determine what a compiler-provided header file is, and this seems like an 
> escape hatch for users to get around that. If that's reasonable to you, then 
> I'm okay with it, but you had mentioned you want to remove human error as a 
> factor and this seems like it could be a subtle human error situation.
Ah, thanks for pointing this out! I didn't consider this. I feel like scenario 
is a more unlikely then situations I mentioned. Probably not something to be 
too concerned about unless you know of a way to get the default resource path?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75332



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

Reply via email to