tbaeder added inline comments.
================ Comment at: clang/lib/AST/Interp/ByteCodeEmitter.cpp:24-31 + bool HasBody = true; + + // Function is not defined at all or not yet. We will + // create a Function instance but not compile the body. That + // will (maybe) happen later. if (!FuncDecl->isDefined(FuncDecl) || (!FuncDecl->hasBody() && FuncDecl->willHaveBody())) ---------------- aaron.ballman wrote: > .... negating the Boolean calculation and applying deMorgan's law did not > make that code more clear, did it (assuming I did everything right)? If you > agree, then I'm fine with the more complicated form and letting the optimizer > make it faster. I can see that going either way. I think your version is a more confusing though because the two body conditions are coupled with the `isDefined` condition. E.g. `HasBody` is `true` if `isDefined() && !willHaveBody()`, which doesn't make sense to me I think. I think I just read this code too many times now. How does being defined even relate to the function having a body? Should that code just be `HasBody = hasBody() || willHaveBody()`? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136936/new/ https://reviews.llvm.org/D136936 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits