[all-commits] [llvm/llvm-project] 8fefeb: [clang][ptrauth] reject incorrectly placed ptrauth...

Oliver Hunt via All-commits all-commits at lists.llvm.org
Fri May 2 21:08:19 PDT 2025


  Branch: refs/heads/users/ojhunt/ptrauth-struct-function-ptr-field
  Home:   https://github.com/llvm/llvm-project
  Commit: 8fefeb81c38ad2f196a117103e40290171db51b6
      https://github.com/llvm/llvm-project/commit/8fefeb81c38ad2f196a117103e40290171db51b6
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2025-05-02 (Fri, 02 May 2025)

  Changed paths:
    M clang/include/clang/Parse/Parser.h
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Parse/ParseDeclCXX.cpp
    A clang/test/Sema/ptrauth-struct-function-ptr-field.c

  Log Message:
  -----------
  [clang][ptrauth] reject incorrectly placed ptrauth qualifier

When parsing a function pointer typed field we use
Parser::ParseTypeQualifierListOpt, but then drops subsequent
type attributes and qualifiers unless explicitly handled.

There is an existing solution for the _Atomic qualifier, and
this PR simply extends that to __ptrauth for now. In future
we may want to investigate a more robust mechanism to ensure
type qualifiers are not silently dropped so that future type
qualifiers do not suffer the same problem.



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