[all-commits] [llvm/llvm-project] b9cf7f: [C23] Fix handling of alignas (#81637)

Aaron Ballman via All-commits all-commits at lists.llvm.org
Thu Feb 15 04:58:12 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9cf7f1066cc7ec11c6074d10b0f2ec9a3ae72d9
      https://github.com/llvm/llvm-project/commit/b9cf7f1066cc7ec11c6074d10b0f2ec9a3ae72d9
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2024-02-15 (Thu, 15 Feb 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/lib/Parse/ParseTentative.cpp
    M clang/test/C/C2x/n2934.c
    M clang/test/Parser/c2x-alignas.c

  Log Message:
  -----------
  [C23] Fix handling of alignas (#81637)

In C++, alignas is an attribute specifier, while in C23, it's an alias
of _Alignas, which is a type specifier/qualifier. This means that they
parse differently in some circumstances.

Fixes https://github.com/llvm/llvm-project/issues/81472




More information about the All-commits mailing list