summaryrefslogtreecommitdiffstats
path: root/NOTES.txt
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-07-28 07:41:22 +0000
committerJohn McCall <rjmccall@apple.com>2011-07-28 07:41:22 +0000
commitd46f763aabb9fd1501d0cd4d2f0ee65e5cfdf78b (patch)
tree7730dc5294cb8e0da283152d21e2b5c6a99a19fa /NOTES.txt
parentfb7208119a60f68c87e7d4b6e4b87371871abb49 (diff)
Make a note about a missing optimization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136340 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'NOTES.txt')
-rw-r--r--NOTES.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/NOTES.txt b/NOTES.txt
index f66a96120a..9f7ed4b959 100644
--- a/NOTES.txt
+++ b/NOTES.txt
@@ -83,3 +83,21 @@ enum VerifyConstraintResult {
};
//===---------------------------------------------------------------------===//
+
+Blocks should not capture variables that are only used in dead code.
+
+The rule that we came up with is that blocks are required to capture
+variables if they're referenced in evaluated code, even if that code
+doesn't actually rely on the value of the captured variable.
+
+For example, this requires a capture:
+ (void) var;
+But this does not:
+ if (false) puts(var);
+
+Summary of <rdar://problem/9851835>: if we implement this, we should
+warn about non-POD variables that are referenced but not captured, but
+only if the non-reachability is not due to macro or template
+metaprogramming.
+
+//===---------------------------------------------------------------------===//