Page MenuHomePhabricator

[Clang] Reset FP options before function instantiations
Needs ReviewPublic

Authored by sepavloff on Feb 2 2023, 10:23 PM.

Details

Summary

Previously function template instantiations occurred with FP options
that were in effect at the end of translation unit. It was an problem
for late template parsing as these options were used as attributes of
AST nodes and may result in crash. With this change the FP options are
reset to the set defined by command line options before every
function instatntiation.

Diff Detail

Event Timeline

sepavloff created this revision.Feb 2 2023, 10:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2023, 10:23 PM
sepavloff requested review of this revision.Feb 2 2023, 10:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2023, 10:23 PM

Using the FPOptions from the beginning of the file doesn't seem much better than the FPOptions at the end of the file. Don't we want to use the FPOptions from the point of definition of the template?