- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.2k
 
Open
Labels
bugReproducible Homebrew/homebrew-core bugReproducible Homebrew/homebrew-core bughelp wantedTask(s) needing PRs from the community or maintainersTask(s) needing PRs from the community or maintainers
Description
brew gist-logs <formula> link OR brew config AND brew doctor output
https://gist.github.com/lukeshingles/b1477f4b5eaf327af99940ec848213b4Verification
-  My 
brew doctoroutput saysYour system is ready to brew.and am still able to reproduce my issue. -  I ran 
brew updateand am still able to reproduce my issue. -  I have resolved all warnings from 
brew doctorand that did not fix my problem. - I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.
 
What were you trying to do (and why)?
clang-tidy is no longer finding system headers since the llvm 19.1.3 update (#196094)
What happened (include all command output)?
$ clang-tidy helloworld.cpp
4 warnings and 1 error generated.
Error while processing /Users/luke/test/helloworld.cpp.
warning: -lunwind: 'linker' input unused [clang-diagnostic-unused-command-line-argument]
warning: argument unused during compilation: '-L/opt/homebrew/opt/llvm/lib' [clang-diagnostic-unused-command-line-argument]
warning: argument unused during compilation: '-L/opt/homebrew/opt/llvm/lib/c++' [clang-diagnostic-unused-command-line-argument]
warning: argument unused during compilation: '-L/opt/homebrew/opt/llvm/lib/unwind' [clang-diagnostic-unused-command-line-argument]
helloworld.cpp:1:10: error: 'iostream' file not found [clang-diagnostic-error]
    1 | #include <iostream>
      |          ^~~~~~~~~~
Found compiler error(s).What did you expect to happen?
Using llvm 19.1.2 formula, the output is:
$ clang-tidy helloworld.cpp
4 warnings generated.
warning: -lunwind: 'linker' input unused [clang-diagnostic-unused-command-line-argument]
warning: argument unused during compilation: '-L/opt/homebrew/opt/llvm/lib' [clang-diagnostic-unused-command-line-argument]
warning: argument unused during compilation: '-L/opt/homebrew/opt/llvm/lib/c++' [clang-diagnostic-unused-command-line-argument]
warning: argument unused during compilation: '-L/opt/homebrew/opt/llvm/lib/unwind' [clang-diagnostic-unused-command-line-argument](Some warnings but no error finding <iostream>).
Step-by-step reproduction instructions (by running brew commands)
// helloworld.cpp
#include <iostream>
int main() {
  std::cout << "Hello World!";
  return 0;
}pip install compiledb
compiledb make helloworld
clang-tidy helloworld.cppCongyuwang and afnanenayet
Metadata
Metadata
Assignees
Labels
bugReproducible Homebrew/homebrew-core bugReproducible Homebrew/homebrew-core bughelp wantedTask(s) needing PRs from the community or maintainersTask(s) needing PRs from the community or maintainers