This revision was automatically updated to reflect the committed changes. Manna marked an inline comment as done. Closed by commit rGbe37e3e25982: [NFC][CLANG] Fix dereference issue before null check found by Coverity static… (authored by Manna).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150895/new/ https://reviews.llvm.org/D150895 Files: clang/lib/Parse/ParsePragma.cpp Index: clang/lib/Parse/ParsePragma.cpp =================================================================== --- clang/lib/Parse/ParsePragma.cpp +++ clang/lib/Parse/ParsePragma.cpp @@ -4041,7 +4041,6 @@ PP.Lex(Tok); II = Tok.getIdentifierInfo(); - StringRef IntrinsicClass = II->getName(); if (!II || !(II->isStr("vector") || II->isStr("sifive_vector"))) { PP.Diag(Tok.getLocation(), diag::warn_pragma_invalid_argument) << PP.getSpelling(Tok) << "riscv" << /*Expected=*/true @@ -4056,8 +4055,8 @@ return; } - if (IntrinsicClass == "vector") + if (II->isStr("vector")) Actions.DeclareRISCVVBuiltins = true; - else if (IntrinsicClass == "sifive_vector") + else if (II->isStr("sifive_vector")) Actions.DeclareRISCVVectorBuiltins = true; }
Index: clang/lib/Parse/ParsePragma.cpp =================================================================== --- clang/lib/Parse/ParsePragma.cpp +++ clang/lib/Parse/ParsePragma.cpp @@ -4041,7 +4041,6 @@ PP.Lex(Tok); II = Tok.getIdentifierInfo(); - StringRef IntrinsicClass = II->getName(); if (!II || !(II->isStr("vector") || II->isStr("sifive_vector"))) { PP.Diag(Tok.getLocation(), diag::warn_pragma_invalid_argument) << PP.getSpelling(Tok) << "riscv" << /*Expected=*/true @@ -4056,8 +4055,8 @@ return; } - if (IntrinsicClass == "vector") + if (II->isStr("vector")) Actions.DeclareRISCVVBuiltins = true; - else if (IntrinsicClass == "sifive_vector") + else if (II->isStr("sifive_vector")) Actions.DeclareRISCVVectorBuiltins = true; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits