ychen added inline comments.
================ Comment at: clang/test/Misc/inline-asm-clobber-warning.c:26 +// CHECK-NEXT: nop +// CHECK-NEXT: ^ ---------------- DavidSpickett wrote: > I think this `^` is wrong because we don't/can't account for the asm printer > tabbing in the instruction. > > I still wanted to check that there are `^` just because it's one aspect of > the location information. This probably is due to `Loc` is not right. ================ Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp:545 "lead to undefined behaviour."; - SrcMgr.PrintMessage(Loc, SourceMgr::DK_Warning, Msg); - SrcMgr.PrintMessage(Loc, SourceMgr::DK_Note, Note); + MMI->getContext().reportWarning(Loc, Msg); + MMI->getContext().reportNote(Loc, Note); ---------------- For this diagnose, it is better to use LLVMContext since the location inside inlineasm does not matter. There is an example above. ``` Msg << "invalid operand in inline asm: '" << AsmStr << "'"; MMI->getModule()->getContext().emitError(LocCookie, Msg.str()); ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102244/new/ https://reviews.llvm.org/D102244 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits