mirror of
https://github.com/intel/llvm.git
synced 2026-01-23 07:58:23 +08:00
18f3a2beef2ed24fc7fe1c1f226ab49af62dc098
Change expression analysis to do assignment statements as it currently does call statements. Check there for defined assignment and set `typedAssignment` in the `AssignmentStmt` node to contain the analyzed assignment, either intrinsic or user-defined. When `var = expr` is implemented by subroutine `sub`, the analyzed assignment contains a procedure reference to `sub(var, (expr))`. Add `IsDefinedAssignment` to decide based on types and ranks of lhs and rhs whether is can be a defined assignment. The result is tri-state because when they are both the same derived type it can be either intrinsic or defined. Use this where a similar decision is made in `check-declarations.cc`. Change "Procedure referenced in PURE subprogram" error message to contain the name of the procedure. If the reference is from a defined assignment that name won't appear on the highlighted source line. Original-commit: flang-compiler/f18@5c87071210 Reviewed-on: https://github.com/flang-compiler/f18/pull/841
Languages
LLVM
41.5%
C++
31.7%
C
13%
Assembly
9.1%
MLIR
1.5%
Other
2.8%