28 const auto *Pragma = Result.Nodes.getNodeAs<PragmaCommentDecl>(
"pragma");
30 std::string Msg{
"avoid 'pragma comment' directive"};
34 const PragmaMSCommentKind &Kind = Pragma->getCommentKind();
36 case PragmaMSCommentKind::PCK_Lib:
37 Msg.append(
"; use the build system to link libraries");
39 case PragmaMSCommentKind::PCK_Linker:
40 Msg.append(
"; use the build system to set linker options");
42 case PragmaMSCommentKind::PCK_Unknown:
43 llvm_unreachable(
"unexpected pragma comment kind");
47 diag(Pragma->getBeginLoc(), Msg);