[all-commits] [llvm/llvm-project] 877859: [clang] Handle __declspec() attributes in using

Tobias Hieta via All-commits all-commits at lists.llvm.org
Mon Feb 13 06:43:24 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 877859a09bda29fe9a7f1a9016b06cf80661a032
      https://github.com/llvm/llvm-project/commit/877859a09bda29fe9a7f1a9016b06cf80661a032
  Author: Tobias Hieta <tobias at hieta.se>
  Date:   2023-02-13 (Mon, 13 Feb 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Parse/ParseDecl.cpp
    A clang/test/SemaCXX/using-declspec.cpp

  Log Message:
  -----------
  [clang] Handle __declspec() attributes in using

This patch fixes so that declspec attributes are forwarded
to the alias declaration.

Before this patch this would assert:

class Test { int a; };
using AlignedTest = __declspec(align(16)) const Test;
static_assert(alignof(AlignedTest) == 16, "error");

But afterwards it behaves the same as MSVC does and doesn't
assert.

Fixes: llvm/llvm-project#60513

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D143632




More information about the All-commits mailing list