summaryrefslogtreecommitdiffstats
path: root/clang/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
commit143c55ead2e3fa089f6a0b8af3d84560dfd6e9d6 (patch)
treeae3e6073e3d61fe8be2e3b8a78ca7d59636f64bb /clang/lib/CodeGen/CGExprConstant.cpp
parentacfcd0d51be7022b5d18ca26832892a5cc7bc1c2 (diff)
downloadbcm5719-llvm-143c55ead2e3fa089f6a0b8af3d84560dfd6e9d6.tar.gz
bcm5719-llvm-143c55ead2e3fa089f6a0b8af3d84560dfd6e9d6.zip
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. llvm-svn: 191487
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprConstant.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index 431ee3c47ff..2d3afc96f26 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud