diff options
author | David Majnemer <david.majnemer@gmail.com> | 2013-09-27 07:04:31 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2013-09-27 07:04:31 +0000 |
commit | fe16aa31fdfaad4c38aed443d853af293714f1c4 (patch) | |
tree | 2f789fffc7f39f617f9a68d259b1cf3c5e8ad083 /test/CodeGenCXX/typeid.cpp | |
parent | bce8c928e888d2238523dafd670d3026e5682deb (diff) |
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 'test/CodeGenCXX/typeid.cpp')
-rw-r--r-- | test/CodeGenCXX/typeid.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/CodeGenCXX/typeid.cpp b/test/CodeGenCXX/typeid.cpp index f54b60d0cd..9d212905e6 100644 --- a/test/CodeGenCXX/typeid.cpp +++ b/test/CodeGenCXX/typeid.cpp @@ -27,6 +27,9 @@ extern A &a; // CHECK: @_ZN5Test14a_tiE = global const std::type_info &a_ti = typeid(a); +// CHECK: @_ZN5Test18A10_c_tiE = constant %"class.std::type_info"* bitcast ({ i8*, i8* }* @_ZTIA10_c to %"class.std::type_info"*), align 8 +const std::type_info &A10_c_ti = typeid(char const[10]); + // CHECK-LABEL: define i8* @_ZN5Test11fEv const char *f() { try { |