Ada: Avoid spurious resolution errors in inlined static functions
Fixes spurious resolution errors by unsetting Comes_From_Source in inlined static Ada functions.
This commit addresses a problem in the Ada compiler where inlined static functions were incorrectly inheriting the Comes_From_Source flag. This led to spurious resolution errors during compilation. The fix involves unsetting this flag in the inlined expression, ensuring correct resolution and removing false error reports.
In Details
The Ada compiler uses the Comes_From_Source flag to track the origin of code elements. In this case, inlined static functions were inheriting this flag incorrectly, leading to errors in the resolution process, specifically within inline.adb. This change ensures that the flag is properly unset during inlining, preventing these errors.
For Context
In Ada, the compiler performs various checks to ensure that code is correctly resolved and that all references are valid. One mechanism involves tracking the source of code elements. This commit fixes a bug where inlined functions were misidentified as originating from the source code, leading to incorrect error messages. The fix ensures that the compiler correctly handles inlined functions during the resolution process.