summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2019-07-18 11:55:33 +0000
committerIlya Biryukov <ibiryukov@google.com>2019-07-18 11:55:33 +0000
commit10837c359218716121413d25701edecde5266b29 (patch)
tree7837144159736f95b0f4192ddb3c7eb1ede89889 /lib/Sema/SemaOverload.cpp
parentb3906884072df69838ffece1d7d85012ddca3501 (diff)
downloadclang-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.cpp4
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);