You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This uncovers an issue in asdcplib, which ends up in compile errors like these:
In file included from asdcplib/src/TimedText_Parser.cpp:33:
In file included from asdcplib/src/AS_DCP_internal.h:38:
In file included from asdcplib/src/Metadata.h:35:
asdcplib/src/MXF.h:276:12: error: no member named 'Copy' in 'optional_container_property<PropertyType>'
276 | this->Copy(rhs.m_property);
| ~~~~ ^
asdcplib/src/MXF.h:284:48: error: no member named 'clear' in 'optional_container_property<PropertyType>'
284 | void reset(const PropertyType& rhs) { this->clear(); }
| ~~~~ ^
2 errors generated.
The this->Copy() and this->clear() method calls do look like a valid error as there are no such members defined here. This hasn't been an issue before as this class doesn't seem to be actually used anywhere.
I can make a PR to just outright remove this unused template class, to fix compilation that way, but would you have a preference to fix the code differently somehow? This code seems to stem from 0291582, and does seem to have the same references to nonexistent members even back then.
The text was updated successfully, but these errors were encountered:
mstorsjo
added a commit
to mstorsjo/asdcplib
that referenced
this issue
May 7, 2024
Since Clang changes
llvm/llvm-project#84050 and
llvm/llvm-project#90152 (upcoming in
Clang 19.x), Clang will diagnose member accesses before instantiating
C++ templates.
Within the optional_container_property template, this causes errors
for the calls to this->Copy() and this->clear(), as there are no
corresponding methods within that template class, errors like these:
asdcplib/src/MXF.h:276:12: error: no member named 'Copy' in 'optional_container_property<PropertyType>'
276 | this->Copy(rhs.m_property);
| ~~~~ ^
asdcplib/src/MXF.h:284:48: error: no member named 'clear' in 'optional_container_property<PropertyType>'
284 | void reset(const PropertyType& rhs) { this->clear(); }
| ~~~~ ^
This template is unused, and these faulty calls have been present
since the class was added in 0291582.
Simply remove the unused template class, to avoid these compiler
errors.
This fixescinecert#136.
The asdcplib code contains a C++ template which refers to member
variables that doesn't exist. Earlier, this hasn't been an issue,
as the C++ template never is instantiated, but current Clang
versions (the upcoming 19.x version) diagnoses such issues already
before the class is instantiated, leading to compilation errors
on the asdcplib code.
This applies cinecert/asdcplib#137 (which
hasn't yet received any attention), fixing
cinecert/asdcplib#136.
(cherry picked from commit c481befc9796ed57606d5fd7cba18449702d4cc2)
Since llvm/llvm-project#84050 and llvm/llvm-project#90152, Clang will issue diagnostics about invalid member accesses in a class template, even before the class is instantiated.
This uncovers an issue in asdcplib, which ends up in compile errors like these:
The relevant code at hand looks like this:
https://github.com/cinecert/asdcplib/blob/master/src/MXF.h#L266-L288
The
this->Copy()
andthis->clear()
method calls do look like a valid error as there are no such members defined here. This hasn't been an issue before as this class doesn't seem to be actually used anywhere.I can make a PR to just outright remove this unused template class, to fix compilation that way, but would you have a preference to fix the code differently somehow? This code seems to stem from 0291582, and does seem to have the same references to nonexistent members even back then.
The text was updated successfully, but these errors were encountered: