[LLVMbugs] [Bug 13086] New: -Wunused-private-field warns on member variables that are used by uninstantiated template member functions
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 11 14:57:25 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13086
Bug #: 13086
Summary: -Wunused-private-field warns on member variables that
are used by uninstantiated template member functions
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nicolasweber at gmx.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
-Wunused-private-field warns on this:
template <typename LayerType, typename LayerList, typename RenderSurfaceType,
typename IteratorActionType>
class CCLayerIterator {
};
struct CCLayerIteratorActions {
class BackToFront {
public:
template <typename LayerType, typename LayerList, typename
RenderSurfaceType, typename ActionType>
void begin(CCLayerIterator<LayerType, LayerList, RenderSurfaceType,
ActionType>&);
template <typename LayerType, typename LayerList, typename
RenderSurfaceType, typename ActionType>
void end(CCLayerIterator<LayerType, LayerList, RenderSurfaceType,
ActionType>&);
template <typename LayerType, typename LayerList, typename
RenderSurfaceType, typename ActionType>
void next(CCLayerIterator<LayerType, LayerList, RenderSurfaceType,
ActionType>&);
private:
int m_highestTargetRenderSurfaceLayer;
};
};
hummer:Release thakis$ ~/src/llvm-svn/Release+Asserts/bin/clang -Wall foo.ii -c
-arch i386 -Wno-c++11-extensions
foo.ii:20:13: warning: private field 'm_highestTargetRenderSurfaceLayer' is not
used [-Wunused-private-field]
int m_highestTargetRenderSurfaceLayer;
^
1 warning generated.
This is from WebKit. The template member functions are defined in a (different)
.cpp file. That's not right, but maybe the diagnostic for that could be less
unrelated?
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list