summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2013-09-27 07:04:31 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2013-09-27 07:04:31 +0000
commitfe16aa31fdfaad4c38aed443d853af293714f1c4 (patch)
tree2f789fffc7f39f617f9a68d259b1cf3c5e8ad083 /lib/CodeGen/CGExprConstant.cpp
parentbce8c928e888d2238523dafd670d3026e5682deb (diff)
downloadclang-fe16aa31fdfaad4c38aed443d853af293714f1c4.tar.gz
clang-fe16aa31fdfaad4c38aed443d853af293714f1c4.tar.bz2
clang-fe16aa31fdfaad4c38aed443d853af293714f1c4.tar.xz
AST: Handle qualified array types in typeid() expressions
The intent of getTypeOperand() was to yield an unqualified type. However QualType::getUnqualifiedType() does not strip away qualifiers on arrays. N.B. This worked fine when typeid() was applied to an expression because we would inject as implicit cast to the unqualified array type in the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--lib/CodeGen/CGExprConstant.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 431ee3c47f..2d3afc96f2 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -966,7 +966,7 @@ public:
CXXTypeidExpr *Typeid = cast<CXXTypeidExpr>(E);
QualType T;
if (Typeid->isTypeOperand())
- T = Typeid->getTypeOperand();
+ T = Typeid->getTypeOperand(CGM.getContext());
else
T = Typeid->getExprOperand()->getType();
return CGM.GetAddrOfRTTIDescriptor(T);