[PATCH] D90188: Add support for attribute 'using_if_exists'

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 27 12:11:18 PDT 2020


erik.pilkington added inline comments.


================
Comment at: clang/test/SemaCXX/using-if-exists-attr.cpp:16
+template <class>
+using template_alias UIE = NS::x; // expected-warning {{'using_if_exists' attribute only applies to named declarations, types, and value declarations}}
+
----------------
ldionne wrote:
> I assume the attribute is ignored on these declarations? Why is this not an error instead, since it's clearly a programmer mistake?
Yeah, its just ignored. This is how clang behaves generally with any mis-applied attribute. An error seems more appropriate to me too honestly, but that seems like a separate policy change. Maybe @aaron.ballman knows more about the history/justification for this behaviour?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90188/new/

https://reviews.llvm.org/D90188



More information about the cfe-commits mailing list