diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-05-24 04:29:20 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-05-24 04:29:20 +0000 |
commit | 8ab10aa6bef39dffde2207dd2257c521bb2e731f (patch) | |
tree | 16886845b0e8626d50e48c6d739d61212b560a7d /lib/Sema/SemaOverload.cpp | |
parent | a6115068cde719142eb394db88612c185cabd05b (diff) |
DR1152 / PR12931 / PR6177: A candidate function which requires binding a const
volatile reference to a temporary is not viable. My interpretation is that
DR1152 was a bugfix, not a rule change for C++11, so this is not conditional on
the language mode. This matches g++'s behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 2068006c29..49170d6f32 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -4153,7 +4153,7 @@ TryReferenceInit(Sema &S, Expr *Init, QualType DeclType, // qualifier. // This is also the point where rvalue references and lvalue inits no longer // go together. - if (!isRValRef && !T1.isConstQualified()) + if (!isRValRef && (!T1.isConstQualified() || T1.isVolatileQualified())) return ICS; // -- If the initializer expression |