diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-29 20:57:55 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-29 20:57:55 +0000 |
| commit | 0b0a0b6174557cafbbd78c6c5ad7244ef3592c42 (patch) | |
| tree | a674f9705ef8d46e3396d3c0663b722c8831a85e /clang/lib/AST/APValue.cpp | |
| parent | 254b63068a53dd9c27e83186e7dead948a885f33 (diff) | |
| download | bcm5719-llvm-0b0a0b6174557cafbbd78c6c5ad7244ef3592c42.tar.gz bcm5719-llvm-0b0a0b6174557cafbbd78c6c5ad7244ef3592c42.zip | |
constexpr function substitution:
Track the function invocation where an lvalue referring to a constexpr function
parameter originated from, and use it to substitute the correct argument and to
determine whether such an argument's lifetime has ended.
llvm-svn: 143296
Diffstat (limited to 'clang/lib/AST/APValue.cpp')
| -rw-r--r-- | clang/lib/AST/APValue.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/AST/APValue.cpp b/clang/lib/AST/APValue.cpp index 6f63a32dd2e..0f315bbccda 100644 --- a/clang/lib/AST/APValue.cpp +++ b/clang/lib/AST/APValue.cpp @@ -169,9 +169,9 @@ const Expr* APValue::getLValueBase() const { return ((const LV*)(const void*)Data)->Base; } -CharUnits APValue::getLValueOffset() const { - assert(isLValue() && "Invalid accessor"); - return ((const LV*)(const void*)Data)->Offset; +CharUnits &APValue::getLValueOffset() { + assert(isLValue() && "Invalid accessor"); + return ((LV*)(void*)Data)->Offset; } void APValue::setLValue(const Expr *B, const CharUnits &O) { @@ -185,4 +185,3 @@ void APValue::MakeLValue() { new ((void*)(char*)Data) LV(); Kind = LValue; } - |

