diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-05 00:46:14 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-05 00:46:14 +0000 |
commit | 211c8ddb5b500ed84833751363d0cfe1115f4dd3 (patch) | |
tree | 5b0d083ceed44493f376a802f9406073a0bffe35 /include/clang/Basic/DiagnosticASTKinds.td | |
parent | 8c47432b747d51e40a1e23a99403e78c2c864bd1 (diff) |
Model temporary lifetime-extension explicitly in the AST. Use this model to
handle temporaries which have been lifetime-extended to static storage duration
within constant expressions. This correctly handles nested lifetime extension
(through reference members of aggregates in aggregate initializers) but
non-constant-expression emission hasn't yet been updated to do the same.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticASTKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticASTKinds.td | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticASTKinds.td b/include/clang/Basic/DiagnosticASTKinds.td index 06c297e550..06aca52c63 100644 --- a/include/clang/Basic/DiagnosticASTKinds.td +++ b/include/clang/Basic/DiagnosticASTKinds.td @@ -117,6 +117,10 @@ def note_constexpr_access_inactive_union_member : Note< "%select{read of|assignment to|increment of|decrement of}0 " "member %1 of union with %select{active member %3|no active member}2 " "is not allowed in a constant expression">; +def note_constexpr_access_static_temporary : Note< + "%select{read of|assignment to|increment of|decrement of}0 temporary " + "is not allowed in a constant expression outside the expression that " + "created the temporary">; def note_constexpr_modify_global : Note< "a constant expression cannot modify an object that is visible outside " "that expression">; |