Changeset b262cb3 for src/AST


Ignore:
Timestamp:
Jan 11, 2024, 8:46:37 AM (11 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
8655363
Parents:
cfbc56ec
Message:

Unified and fixed handling of parameter attributes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Attribute.cpp

    rcfbc56ec rb262cb3  
    3838
    3939bool Attribute::isValidOnFuncParam() const {
    40         // attributes such as aligned, cleanup, etc. produce GCC errors when they appear
    41         // on function parameters. Maintain here a whitelist of attribute names that are
    42         // allowed to appear on parameters.
     40        // Attributes produce GCC errors when they appear on function
     41        // parameters. This is an allow-list, switching to a forbid-list would
     42        // have to at least mention:
     43        // aligned
    4344        std::string norm = normalizedName();
    44         return norm == "unused" || norm == "noreturn";
     45        return norm == "unused" || norm == "noreturn" || norm == "vector_size";
    4546}
    4647
Note: See TracChangeset for help on using the changeset viewer.