[clang] 2458aa0 - Add missing override to clang tblgen AttrEmitter

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 3 07:52:54 PDT 2021


Thank you for this cleanup!

~Aaron

On Sat, Apr 3, 2021 at 12:00 AM David Blaikie via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
>
>
> Author: David Blaikie
> Date: 2021-04-02T20:47:49-07:00
> New Revision: 2458aa0b9136e7616f529b027d1d478cf699340f
>
> URL: https://github.com/llvm/llvm-project/commit/2458aa0b9136e7616f529b027d1d478cf699340f
> DIFF: https://github.com/llvm/llvm-project/commit/2458aa0b9136e7616f529b027d1d478cf699340f.diff
>
> LOG: Add missing override to clang tblgen AttrEmitter
>
> Added:
>
>
> Modified:
>     clang/utils/TableGen/ClangAttrEmitter.cpp
>
> Removed:
>
>
>
> ################################################################################
> diff  --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp
> index bddda1fe47f7..0d8439b697c8 100644
> --- a/clang/utils/TableGen/ClangAttrEmitter.cpp
> +++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
> @@ -3677,7 +3677,7 @@ static void GenerateMutualExclusionsChecks(const Record &Attr,
>    if (!DeclAttrs.empty()) {
>      // Generate the ParsedAttrInfo subclass logic for declarations.
>      OS << "  bool diagMutualExclusion(Sema &S, const ParsedAttr &AL, "
> -       << "const Decl *D) const {\n";
> +       << "const Decl *D) const override {\n";
>      for (const std::string &A : DeclAttrs) {
>        OS << "    if (const auto *A = D->getAttr<" << A << ">()) {\n";
>        OS << "      S.Diag(AL.getLoc(), diag::err_attributes_are_not_compatible)"
> @@ -3714,7 +3714,7 @@ static void GenerateMutualExclusionsChecks(const Record &Attr,
>    if (!StmtAttrs.empty()) {
>      // Generate the ParsedAttrInfo subclass logic for statements.
>      OS << "  bool diagMutualExclusion(Sema &S, const ParsedAttr &AL, "
> -       << "const Stmt *St) const {\n";
> +       << "const Stmt *St) const override {\n";
>      OS << "    if (const auto *AS = dyn_cast<AttributedStmt>(St)) {\n";
>      OS << "      const ArrayRef<const Attr *> &Attrs = AS->getAttrs();\n";
>      for (const std::string &A : StmtAttrs) {
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the cfe-commits mailing list