[Chapel Merge] Fix two warnings from GCC 11

Branch: refs/heads/main
Revision: 10a7e9d
Author: mppf
Log Message:

Merge pull request #18178 from mppf/fix-empty-clear

Fix two warnings from GCC 11

This PR resolves two compilation warnings from GCC 11

  • one is from accidentally calling empty instead of clear
  • another is a warning about this being null in an inlined call which
    is addressed with an additional check
  • [x] full local testing

Reviewed by @ronawho - thanks!

Modified Files:
M compiler/next/lib/resolution/resolution-types.cpp

M compiler/resolution/tuples.cpp

Compare: https://github.com/chapel-lang/chapel/compare/06c4e3bab27d...10a7e9d60dbd