Declarations for the builtins were created when suspected of being corrections for a typo. That could trigger some absurd warnings about missing headers.
Diff Detail
- Build Status
Buildable 352 Build 352: arc lint + arc unit
Event Timeline
It sounds like this will hinder our ability to typo-correct to builtins. I think we only want to suppress implicitly declaring *library* builtins here (those that are expected to be provided by a header), not all builtins.
We shouldn't thread this kind of boolean all the way through name lookup. This is the kind of thing that callers should configure on the LookupResult object that they pass in.
Can you provide a more complete motivating example where our diagnostics were bad? I'm having a hard time figuring it out from the test
Sure, compiling the following program in C++ for i386 on Windows emits warnings about implicit declarations of __emul and __emulu:
int main() { __umul(1, 2); return 0; }
It's part of a bigger problem (Clang shows warnings about functions guessed by typo-fixing in other cases as well), but it's not that important and I can't see any straighforward solution that would do more good than harm, so I'm closing this revision for now.
Is this an unrelated change?