summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-10-12 06:58:22 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-10-12 06:58:22 +0000
commit571162af6bd9cf0ceb8a0e4270b0efeb6707b7e4 (patch)
tree25c0b52203aca75a115e3ecbdadd3ee46b297d4b /clang/lib
parent6fd86f1678e984632795736d5692bc17ed4d1322 (diff)
downloadbcm5719-llvm-571162af6bd9cf0ceb8a0e4270b0efeb6707b7e4.tar.gz
bcm5719-llvm-571162af6bd9cf0ceb8a0e4270b0efeb6707b7e4.zip
CodeGen: Strip qualifiers from qualified array types in catches
While we ran getUnqualifiedType over the catch type, it isn't enough for array types. Use getUnqualifiedArrayType instead. This fixes PR21252. llvm-svn: 219582
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGException.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index 0b7e57a3c5f..9da910d9d08 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -610,8 +610,9 @@ void CodeGenFunction::EnterCXXTryStmt(const CXXTryStmt &S, bool IsFnTryBlock) {
// existing compilers do, and it's not clear that the standard
// personality routine is capable of doing this right. See C++ DR 388:
// http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#388
- QualType CaughtType = C->getCaughtType();
- CaughtType = CaughtType.getNonReferenceType().getUnqualifiedType();
+ Qualifiers CaughtTypeQuals;
+ QualType CaughtType = CGM.getContext().getUnqualifiedArrayType(
+ C->getCaughtType().getNonReferenceType(), CaughtTypeQuals);
llvm::Constant *TypeInfo = nullptr;
if (CaughtType->isObjCObjectPointerType())
OpenPOWER on IntegriCloud