]> granicus.if.org Git - clang/commit
Defer creating fields for captures until we finish building the
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 28 May 2019 23:09:46 +0000 (23:09 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 28 May 2019 23:09:46 +0000 (23:09 +0000)
commit120851d42c6bb4abd5c8b13de6e498216478610d
treedfc098b41acf5edb3b911349a5d16a655c9e71a2
parenta2b584af8864e3cb3bbce11cd50d682559cda7ff
Defer creating fields for captures until we finish building the
capturing expression or statement.

No functionality change yet. The intent is that we will also delay
building the initialization expression until the enclosing context, so
that:
a) we build the initialization expression in the right context, and
b) we can elide captures that are not odr-used, as suggested by P0588R1.

This also consolidates some duplicated code building capture fields into
a single place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361893 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/ScopeInfo.h
include/clang/Sema/Sema.h
lib/Sema/ScopeInfo.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaLambda.cpp
lib/Sema/SemaStmt.cpp
lib/Sema/TreeTransform.h
test/AST/ast-dump-expr.cpp