[PATCH] D39310: [CGBlocks] Improve line info in backtraces containing *_helper_block

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 25 18:21:36 PDT 2017

vsk added inline comments.

Comment at: lib/CodeGen/CGBlocks.cpp:1651
   StartFunction(FD, C.VoidTy, Fn, FI, args);
-  // Create a scope with an artificial location for the body of this function.
-  auto AL = ApplyDebugLocation::CreateArtificial(*this);
+  ApplyDebugLocation NL{*this, blockInfo.getBlockExpr()->getLocStart()};
   llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo();
JDevlieghere wrote:
> You probably have a good reason for doing so, but why do we need {}-initialization? 
It's just a personal idiosyncrasy. I like braced-init because it doesn't have a vexing parse issue, it works with list/aggregate init, and it makes it clear that operator= isn't being called.


More information about the cfe-commits mailing list