[all-commits] [llvm/llvm-project] 0af2d4: [Clang] Warn if both of `dllexport`/`dllimport` an...
Tomohiro Kashiwada via All-commits
all-commits at lists.llvm.org
Wed Mar 4 05:10:54 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0af2d43e06415ce1e8a5d49e864c3881048dd08b
https://github.com/llvm/llvm-project/commit/0af2d43e06415ce1e8a5d49e864c3881048dd08b
Author: Tomohiro Kashiwada <kikairoya at gmail.com>
Date: 2026-03-04 (Wed, 04 Mar 2026)
Changed paths:
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/SemaDeclAttr.cpp
A clang/test/SemaCXX/attr-exclude_from_explicit_instantiation.ignore-dllattr.cpp
Log Message:
-----------
[Clang] Warn if both of `dllexport`/`dllimport` and `exclude_from_explicit_instantiation` are specified (#183515)
The attributes `exclude_from_explicit_instantiation` and
`dllexport`/`dllimport` serve opposite purposes.
Therefore, if an entity has both attributes, drop one with a warning,
depending on the context of the declaration.
In a template context, the `exclude_from_explicit_instantiation`
attribute takes precedence over the `dllexport` or `dllimport`
attribute. Conversely, the `dllexport` and `dllimport` attributes are
prioritized, in a non-template context.
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