ericLemanissier added a comment.
I have an segfault on all the source files of my project when I enable this
check (it works ok when I disable this check). Sorry I don't have time to post
a minimal source file producing the segfault. I will maybe tomorrow, or in two
weeks.
Repository:
rL LL
ericLemanissier created this revision.
ericLemanissier added reviewers: alexfh, sbenza, bkramer, aaron.ballman.
ericLemanissier added subscribers: ericLemanissier, cfe-commits.
Herald added a subscriber: nemanjai.
Ignore array to pointer decay for predefined macros. It is ok because there is
no s
ericLemanissier abandoned this revision.
ericLemanissier added a comment.
Well, C++ Core Guidelines advises in this case to correct function receiving
__PRETTY_FUNCTION__: the parameter type should not be const char* (
https://github.com/isocpp/CppCoreGuidelines/issues/640 )
I'm not sure if it s
ericLemanissier added a comment.
After searching deeper into the C++ Core Guidelines, they are Ok with passing C
strings to function without passing there size, but the types gsl::zstring and
gsl::czstring have to be used :
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelin
ericLemanissier added a comment.
having studied cpp core guidelines in more depth, I completely understand that
the problem in the case I described is that the function receiving
PRETTY_FUNCTION takes a const char* parameter, whereas it should take a
czstring or szstring_span. As a consequence