[cfe-commits] r62971 - in /cfe/trunk: include/clang/Basic/DiagnosticKinds.def lib/Sema/Sema.h lib/Sema/SemaExprCXX.cpp lib/Sema/SemaOverload.cpp lib/Sema/SemaType.cpp test/SemaCXX/member-pointer.cpp test/SemaCXX/qualification-conversion.cpp
Mike Stump
mrs at apple.com
Wed Jan 28 10:28:35 PST 2009
On Jan 28, 2009, at 9:50 AM, Chris Lattner wrote:
> I wish that assert(X) expanded into "(void)(X)" when in NDEBUG mode.
> That way we'd get side effects and issues like this would go away :-/
That's easy enough:
int main() {
int i;
(void)(0 && i);
return 0;
}
produces no warning about I being unused. In theory any half way
decent dead code stripper can rip out all the code as well, but, it
does have to be valid code. We'd just need a clang assert that does
the right thing.
More information about the cfe-commits
mailing list