summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/references.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2015-05-15 22:07:49 +0000
committerRichard Trieu <rtrieu@google.com>2015-05-15 22:07:49 +0000
commit0ff51f39deacb0622f64e2c6100edfa87a6081b5 (patch)
tree4d360c50d741019a26436adc9dbe7155156a48e3 /clang/test/SemaCXX/references.cpp
parent3de83e4098af7e10175487d831d259108310b313 (diff)
downloadbcm5719-llvm-0ff51f39deacb0622f64e2c6100edfa87a6081b5.tar.gz
bcm5719-llvm-0ff51f39deacb0622f64e2c6100edfa87a6081b5.zip
Reverse the order of types in the reference dropping qualifiers error.
The error has the form ... 'int' ... 'const int' ... dropped qualifiers. At first glance, it appears that the const qualifier is added. Reverse the types so that the second type is less qualified than the first. llvm-svn: 237482
Diffstat (limited to 'clang/test/SemaCXX/references.cpp')
-rw-r--r--clang/test/SemaCXX/references.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/references.cpp b/clang/test/SemaCXX/references.cpp
index b1768b1a3a4..64d87bd132b 100644
--- a/clang/test/SemaCXX/references.cpp
+++ b/clang/test/SemaCXX/references.cpp
@@ -54,7 +54,7 @@ void test4() {
void test5() {
// const double& rcd2 = 2; // rcd2 refers to temporary with value 2.0
const volatile int cvi = 1;
- const int& r = cvi; // expected-error{{binding of reference to type 'const int' to a value of type 'const volatile int' drops qualifiers}}
+ const int& r = cvi; // expected-error{{binding value of type 'const volatile int' to reference of type 'const int' drops qualifiers}}
}
// C++ [dcl.init.ref]p3
OpenPOWER on IntegriCloud