http://llvm.org/bugs/show_bug.cgi?id=17897
Bug ID: 17897
Summary: clang says a used variable is unused
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Clang says flow is not used, but commenting it changes the value of foobarzed.
namespace {
struct foo {};
}
template <typename T, T> struct SameType;
template <class T> struct has_FlowTraits2 {
struct Fallback {
bool flow;
};
struct Derived : T, Fallback {};
template <typename C>
static char (&f(SameType<bool Fallback::*, &C::flow> *))[1];
template <typename C> static char (&f(...))[2];
static bool const value = sizeof(f<Derived>(0)) == 2;
};
template <typename T> struct SequenceTraits2 {};
template <> struct SequenceTraits2<foo> {
static const bool flow = true; // HERE
};
bool foobarzed = has_FlowTraits2<SequenceTraits2<foo> >::value;
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs