| Summary: | Bogus warning in template partial specialization | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Nathan Ridge <zeratul976> |
| Component: | cdt-codan | Assignee: | Marc-André Laperle <malaperle> |
| Status: | RESOLVED FIXED | QA Contact: | Elena Laskavaia <elaskavaia.cdt> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, malaperle, yevshif |
| Version: | 8.1.0 | ||
| Target Milestone: | 8.1.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
I'll look at the code on the codan side and change the component back to cdt-indexer if necessary. It was a problem in the checker. Fixed in 8.1.0. Thanks for the report and sample code! *** cdt git genie on behalf of Marc-Andre Laperle ***
Bug 368611 - Bogus warning in template partial specialization
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=af1c5c31d1dd6ec111ed9262ca8fdbcb22e2e37f
|
I'm filing this under indexer rather than codan because the warning only appears when some of the code is in a header file, suggesting an indexer issue. test.hpp: template <typename, int> struct B; test.cpp: #include "test.hpp" template <typename> struct A { }; template <typename valueT> struct B<A<valueT>, 0> { B(const A<valueT>& o) : obj(o) {} // BOGUS WARNING HERE const A<valueT>& obj; }; The warning at the indicated line is: "Member 'obj' was not initialized in this constructor"