summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/expr/expr.const/p2-0x.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-06-14 22:27:52 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-06-14 22:27:52 +0000
commit82c9b5183f97930e8fb146d6b2eece6cb4d24652 (patch)
tree35e4ca989aed07fd34f3028cda1e1be75754aa52 /clang/test/CXX/expr/expr.const/p2-0x.cpp
parentecf9d86404c1f16662cdfb4a3db6c694080b54ed (diff)
downloadbcm5719-llvm-82c9b5183f97930e8fb146d6b2eece6cb4d24652.tar.gz
bcm5719-llvm-82c9b5183f97930e8fb146d6b2eece6cb4d24652.zip
Fix handling of const_cast from prvalue to rvalue reference: such a cast is
only permitted if the source object is of class type, and should materialize a temporary for the reference to bind to. llvm-svn: 184017
Diffstat (limited to 'clang/test/CXX/expr/expr.const/p2-0x.cpp')
-rw-r--r--clang/test/CXX/expr/expr.const/p2-0x.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CXX/expr/expr.const/p2-0x.cpp b/clang/test/CXX/expr/expr.const/p2-0x.cpp
index 7a43c4541ab..d4afeb8a031 100644
--- a/clang/test/CXX/expr/expr.const/p2-0x.cpp
+++ b/clang/test/CXX/expr/expr.const/p2-0x.cpp
@@ -322,7 +322,7 @@ namespace LValueToRValue {
// constant expression;
constexpr volatile S f() { return S(); }
static_assert(f().i, ""); // ok! there's no lvalue-to-rvalue conversion here!
- static_assert(((volatile const S&&)(S)0).i, ""); // expected-error {{constant expression}}
+ static_assert(((volatile const S&&)(S)0).i, ""); // expected-error {{constant expression}} expected-note {{read of volatile-qualified type}}
}
// DR1312: The proposed wording for this defect has issues, so we ignore this
OpenPOWER on IntegriCloud