From: Jeffrey Yasskin Date: Tue, 25 Jan 2011 20:08:12 +0000 (+0000) Subject: Add an attribute to forbid temporary instances of a type. This allows class X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c60e13aeff96515d27638129154b1308c15ded3d;p=clang Add an attribute to forbid temporary instances of a type. This allows class authors to write class __attribute__((forbid_temporaries)) Name { ... }; when they want to force users to name all variables of the type. This protects people from doing things like creating a scoped_lock that only lives for a single statement instead of an entire scope. The warning produced by this attribute can be disabled by -Wno-forbid-temporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124217 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/LanguageExtensions.html b/docs/LanguageExtensions.html index 78c3cd50bf..06b01db760 100644 --- a/docs/LanguageExtensions.html +++ b/docs/LanguageExtensions.html @@ -25,6 +25,7 @@ td {
  • Vectors and Extended Vectors
  • Messages on deprecated and unavailable attributes
  • Attributes on enumerators
  • +
  • Attribute to forbid temporaries of a type
  • Checks for Standard Language Features