File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) {
225
225
do {
226
226
PtrDepth++;
227
227
Ty = Ty->getPointeeType ()->getBaseElementTypeUnsafe ();
228
- } while (Ty->isPointerType () || Ty-> isArrayType () );
228
+ } while (Ty->isPointerType ());
229
229
assert (!isa<VariableArrayType>(Ty));
230
230
// When the underlying type is a builtin type, we compute the pointee type
231
231
// string recursively, which is implicitly more forgiving than the standards
@@ -243,7 +243,7 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) {
243
243
->getString ();
244
244
TyName = Name;
245
245
} else {
246
- // Be conservative if the type isn't a RecordType. We are specifically
246
+ // Be conservative if the type isn't a RecordType. We are specifically
247
247
// required to do this for member pointers until we implement the
248
248
// similar-types rule.
249
249
if (!Ty->isRecordType ())
Original file line number Diff line number Diff line change 2
2
// RUN: %clang_cc1 -triple x86_64-linux -std=c++11 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck --check-prefixes=CHECK %s
3
3
// RUN: %clang_cc1 -triple x86_64-linux -std=c++14 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck --check-prefixes=CHECK %s
4
4
// RUN: %clang_cc1 -triple x86_64-linux -std=c++1z %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck --check-prefixes=CHECK %s
5
- // RUN: %clang_cc1 -triple x86_64-linux -std=c++1z %s -O3 -pointer-tbaa -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck --check-prefixes=CHECK %s
5
+ // RUN: %clang_cc1 -triple x86_64-linux -std=c++1z %s -O3 -pointer-tbaa -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck --check-prefixes=CHECK,POINTER-TBAA %s
6
6
7
7
// cwg158: yes
8
8
@@ -39,4 +39,5 @@ const int * h(const int * (*p)[10], int *(*q)[9]) {
39
39
}
40
40
41
41
// POINTER-TBAA: [[PTRARRAY_TBAA]] = !{[[PTRARRAY_TY:!.+]], [[PTRARRAY_TY]], i64 0}
42
- // POINTER-TBAA: [[PTRARRAY_TY]] = !{!"p3 int", !4, i64 0}
42
+ // POINTER-TBAA: [[PTRARRAY_TY]] = !{!"p2 int", [[ANYPTR:!.+]], i64 0}
43
+ // POINTER-TBAA: [[ANYPTR]] = !{!"any pointer"
You can’t perform that action at this time.
0 commit comments