Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(62)

Issue 3745045: [PATCH] Add an attribute to forbid temporary instances of a type (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by Jeffrey Yasskin
Modified:
11 years, 5 months ago
Reviewers:
CC:
cfe-commits_cs.uiuc.edu
Base URL:
https://llvm.org/svn/llvm-project/cfe/trunk/
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : Sync #

Patch Set 3 : Sync to r124146 #

Patch Set 4 : Rename to forbid_temporaries #

Patch Set 5 : Sync to r124204 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -1 line) Patch
M docs/LanguageExtensions.html View 1 2 3 4 2 chunks +27 lines, -0 lines 0 comments Download
M include/clang/Basic/Attr.td View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M include/clang/Basic/DiagnosticSemaKinds.td View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M include/clang/Sema/AttributeList.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M lib/Sema/AttributeList.cpp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M lib/Sema/SemaDeclAttr.cpp View 1 2 3 4 2 chunks +20 lines, -0 lines 0 comments Download
M lib/Sema/SemaExprCXX.cpp View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
A test/SemaCXX/forbid-temporaries.cpp View 1 2 3 4 1 chunk +50 lines, -0 lines 0 comments Download

Messages

Total messages: 2
Jeffrey Yasskin
This is the first attribute I've added, so please let me know about anything I ...
11 years, 6 months ago (2010-12-29 02:00:32 UTC) #1
Jeffrey Yasskin
11 years, 5 months ago (2011-01-18 06:14:30 UTC) #2
Sending to the right list this time. The raw patch is at
http://codereview.appspot.com/download/issue3745045_3001.diff.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b