diff options
author | Marco Antognini <marco.antognini@arm.com> | 2019-07-22 09:39:13 +0000 |
---|---|---|
committer | Marco Antognini <marco.antognini@arm.com> | 2019-07-22 09:39:13 +0000 |
commit | d3067677be31c9c8aff122a797b0eca41a14a18f (patch) | |
tree | 7af7d1cf4082e0a6794cd95e485a54f6b7348836 /lib/Sema/SemaOverload.cpp | |
parent | f387617422c7cdc316c1750710257b708c6995ec (diff) | |
download | clang-d3067677be31c9c8aff122a797b0eca41a14a18f.tar.gz |
[OpenCL] Improve destructor support in C++ for OpenCL
This re-applies r366422 with a fix for Bug PR42665 and a new regression
test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index d8c4ea48eb..f632a4d3bd 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -5093,12 +5093,10 @@ TryObjectArgumentInitialization(Sema &S, SourceLocation Loc, QualType FromType, QualType ClassType = S.Context.getTypeDeclType(ActingContext); // [class.dtor]p2: A destructor can be invoked for a const, volatile or // const volatile object. - Qualifiers Quals; + Qualifiers Quals = Method->getMethodQualifiers(); if (isa<CXXDestructorDecl>(Method)) { Quals.addConst(); Quals.addVolatile(); - } else { - Quals = Method->getMethodQualifiers(); } QualType ImplicitParamType = S.Context.getQualifiedType(ClassType, Quals); |