[PATCH] D122029: Change __auto_type behavior with qualifiers to match GCC behavior

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 18 12:58:28 PDT 2022


aaron.ballman created this revision.
aaron.ballman added reviewers: rsmith, comex, erichkeane, jyknight, rjmccall.
Herald added a project: All.
aaron.ballman requested review of this revision.
Herald added a project: clang.

Currently, Clang handles some qualifiers correctly for `__auto_type`, but it does not handle the `restrict` or `_Atomic` qualifiers in the same way that GCC does. This patch handles those qualifiers so that they attach to the deduced type the same as `const` and `volatile` already do.

This fixes https://github.com/llvm/llvm-project/issues/53652


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122029

Files:
  clang/docs/ReleaseNotes.rst
  clang/lib/AST/ASTContext.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Sema/SemaType.cpp
  clang/test/Sema/auto-type.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122029.416583.patch
Type: text/x-patch
Size: 5825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220318/755b28a3/attachment.bin>


More information about the cfe-commits mailing list