3 Commits

Author SHA1 Message Date
Egor Zhdan
feb787244e
[APINotes] Avoid duplicated attributes for class template instantiations
If a C++ class template is annotated via API Notes, the instantiations
had the attributes repeated twice. This is because Clang was adding the
attribute twice while processing the same class template. This change
makes sure we don't try to add attributes from API Notes twice.

There is currently no way to annotate specific instantiations using API
Notes.

rdar://142539959
2025-01-15 18:50:23 +00:00
Fangrui Song
7c1d9b15ee [test] %clang_cc1: remove redundant actions 2024-05-04 23:08:11 -07:00
Egor Zhdan
7344e991ad
[APINotes] Add test for C++ class templates
This upstreams https://github.com/apple/llvm-project/pull/7930.

This adds a test to verify that we can apply attributes to C++ class
templates using API Notes. Doing the same for function templates is not
currently possible and requires more work.
2024-03-29 13:05:12 +00:00