================
@@ -6048,13 +6048,23 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
&CallInfo,
if (getDebugInfo() && TargetDecl && TargetDecl->hasAttr<MSAllocatorAttr>())
getDebugInfo()->addHeapAllocSiteMetadata(CI, RetTy->getPointeeType(), Loc);
- // Add metadata if calling an __attribute__((error(""))) or warning fn.
- if (TargetDecl && TargetDecl->hasAttr<ErrorAttr>()) {
- llvm::ConstantInt *Line =
- llvm::ConstantInt::get(Int64Ty, Loc.getRawEncoding());
- llvm::ConstantAsMetadata *MD = llvm::ConstantAsMetadata::get(Line);
- llvm::MDTuple *MDT = llvm::MDNode::get(getLLVMContext(), {MD});
- CI->setMetadata("srcloc", MDT);
+ // Add srcloc metadata for [[gnu::error/warning]] diagnostics.
+ // When ShowInliningChain is enabled, also track inline/static calls for the
+ // heuristic fallback when debug info is not available.
----------------
JustinStitt wrote:
Do you like the note as written in 38e8f6dade4a72c05106a46fbe7df6ed3b311fe6?
https://github.com/llvm/llvm-project/pull/174892
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits