[flang] Add FoldingContext to SemanticsContext
FoldingContext is now part of SemanticsContext. It is created at the beginning with a default-constructed CharBlock as the location in its ContextualMessages. Add PushLocation() to ContextualMessages to remember the previous source location and set a new one. The old one is restored when the returned object goes out of scope. SemanticsContext is now the only state passed in to class ExprAnalyzer, class Mutator, AnalyzeExpr(), AnalyzeExpressions(). Add Say() convenience functions for reporting errors to ExprAnalyzer. Original-commit: flang-compiler/f18@70c499ffc4a1f09a680d636f59938f42ec451ef3 Reviewed-on: https://github.com/flang-compiler/f18/pull/215 Tree-same-pre-rewrite: false
Loading
Please sign in to comment