On Wed, Sep 26, 2012 at 2:49 PM, Eli Friedman <[email protected]> wrote: > On Tue, Sep 25, 2012 at 10:05 PM, Nico Weber <[email protected]> wrote: >> Hi, >> >> similar to the __debugbreak patch, this adds codegen support for __noop. > > You don't actually have to call llvm.donothing... like the name says, > it doesn't do anything. :) "return RValue::get(0);" should be > sufficient.
My patch has nicer -S -emit-llvm output :-) But sure, I'll change it. > > Do we actually perform semantic analysis correctly for __noop? Not completely. > In MSVC, are the arguments unevaluated in the semantic analysis sense? cl seems to do sema for __noop, __noop(3 + someclassinstanc) results in a syntax error. So does wrapping a statement in __noop. > Do we do the right thing for expressions with non-POD type? > Expressions with cleanups? It looks like cl runs cleanups, __noop(MyClass()) runs destructors with cl (but not with clang). Do you want me to fix this before landing this patch? > > -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
