diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2011-01-25 20:08:12 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2011-01-25 20:08:12 +0000 |
commit | 08a4f8f197fd73be1b19e0124886b7d4f46690f6 (patch) | |
tree | 98b828e1a41574c39d3626f13a12ccc9b51b84bc /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 1c5a53e200c29b44907318ea22e31c0ae50f3d57 (diff) | |
download | bcm5719-llvm-08a4f8f197fd73be1b19e0124886b7d4f46690f6.tar.gz bcm5719-llvm-08a4f8f197fd73be1b19e0124886b7d4f46690f6.zip |
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.
llvm-svn: 124217
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions