Skip to content

Comments

Fixed a dangling pointer compilation warning [-Wdangling-gsl]#31

Open
JolaJensen wants to merge 2 commits intoPacktPublishing:masterfrom
JolaJensen:Chapter-07-Metadata
Open

Fixed a dangling pointer compilation warning [-Wdangling-gsl]#31
JolaJensen wants to merge 2 commits intoPacktPublishing:masterfrom
JolaJensen:Chapter-07-Metadata

Conversation

@JolaJensen
Copy link

@JolaJensen JolaJensen commented May 24, 2024

This commit prevents accessing invalid memory.
Full warning message (cmake version 3.28.1):
Chapter07/tinylang/lib/CodeGen/CGTBAA.cpp:68:22: warning: object backing the pointer will be destroyed at the end of the full-expression [-Wdangling-gsl]
StringRef Name = CGM.mangleName(Record);
^~~~~~~~~~~~~~~~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant