In error recovery situations, the mappings from source locations
to scopes were failing in a way that tripped some asserts.
Specifically, FindPureProcedureContaining() wasn't coping well
when starting at the global scope. (And since the global scope
no longer has a source range, clean up the Semantics constructor
to avoid confusion.)
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM, thanks. Before merging, could you please fix the clang-tidy warning? No need to upload another version here.
flang/lib/Semantics/tools.cpp | ||
---|---|---|
85 | As pointed out by clang-tidy, you can skip else here without changing the semantics: https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return. |
flang/lib/Semantics/tools.cpp | ||
---|---|---|
85 | We don't always follow that LLVM rule in the more functional style used in f18. This whole function is essentially one big expression that would be a single return statement if C++ could handle it. |
As pointed out by clang-tidy, you can skip else here without changing the semantics: https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return.