[all-commits] [llvm/llvm-project] 625031: [clang] Fix compile-time regression from attribute...

Mike Rice via All-commits all-commits at lists.llvm.org
Tue Aug 6 08:29:17 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6250313291c9541abe74142be86a9bb7c0d30974
      https://github.com/llvm/llvm-project/commit/6250313291c9541abe74142be86a9bb7c0d30974
  Author: Mike Rice <michael.p.rice at intel.com>
  Date:   2024-08-06 (Tue, 06 Aug 2024)

  Changed paths:
    M clang/include/clang/Basic/AttributeCommonInfo.h
    M clang/lib/Basic/Attributes.cpp
    M clang/lib/Parse/ParseDecl.cpp
    M clang/test/TableGen/attrs-parser-string-switches.td
    M clang/utils/TableGen/ClangAttrEmitter.cpp

  Log Message:
  -----------
  [clang] Fix compile-time regression from attribute arg checking change (#101768)

In 2acf77f987331c05520c5bfd849326909ffce983 code was added to use the
'full' name including syntax and scope.

Instead of building up a large string for each name, add syntax and
scope checks to the value expression in tablegen.

There is already code to generate expressions for target specific
attributes. This change refactors and adds to that code to include
syntax and scope checks.

The tablegen avoids generating the complicated expression unless there
are two attributes using the same name, otherwise the case values will
be as simple as before.

Removes the currently unused attributeHasStrictIdentifierArgAtIndex
function and the related tablegen.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list