alanzhao1 wrote:

If we pass `-v` to Clang, we get the following include directories:

without this patch:

```
clang -cc1 version 18.0.0git based upon LLVM 18.0.0git default target 
arm64-apple-darwin23.3.0
ignoring nonexistent directory 
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory 
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk//Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1
 /Users/ayzhao/src/llvm-project/build/lib/clang/18/include
 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk//System/Library/Frameworks
 (framework directory)
End of search list.
```

with this patch:

```
clang -cc1 version 18.0.0git based upon LLVM 18.0.0git default target 
arm64-apple-darwin23.3.0
ignoring nonexistent directory 
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1
 /Users/ayzhao/src/llvm-project/build/lib/clang/18/include
 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
End of search list.
```

So it looks like this patch causes Clang to think that the directory 
`/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk//Library/Frameworks`
 exists when it doesn't.

https://github.com/llvm/llvm-project/pull/75841
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to