diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2019-07-18 11:55:33 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2019-07-18 11:55:33 +0000 |
commit | 10837c359218716121413d25701edecde5266b29 (patch) | |
tree | 7837144159736f95b0f4192ddb3c7eb1ede89889 /lib/Sema/SemaOverload.cpp | |
parent | b3906884072df69838ffece1d7d85012ddca3501 (diff) | |
download | clang-10837c359218716121413d25701edecde5266b29.tar.gz |
Revert r366422: [OpenCL] Improve destructor support in C++ for OpenCL
Reason: this commit causes crashes in the clang compiler when building
LLVM Support with libc++, see https://bugs.llvm.org/show_bug.cgi?id=42665
for details.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366429 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index f632a4d3bd..d8c4ea48eb 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -5093,10 +5093,12 @@ 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 = Method->getMethodQualifiers(); + Qualifiers Quals; if (isa<CXXDestructorDecl>(Method)) { Quals.addConst(); Quals.addVolatile(); + } else { + Quals = Method->getMethodQualifiers(); } QualType ImplicitParamType = S.Context.getQualifiedType(ClassType, Quals); |