[all-commits] [llvm/llvm-project] 1c68e0: [clang][ptrauth] reject incorrectly placed ptrauth...

Oliver Hunt via All-commits all-commits at lists.llvm.org
Sat May 3 01:18:42 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1c68e0e4814e7e0f006a238e1c656c78aa10516b
      https://github.com/llvm/llvm-project/commit/1c68e0e4814e7e0f006a238e1c656c78aa10516b
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2025-05-03 (Sat, 03 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 (#138376)

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