aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaType.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-10-30 00:37:20 +0000
committerJohn McCall <rjmccall@apple.com>2009-10-30 00:37:20 +0000
commitac406052f7b980f8caa6b07b4a8d0867d53852c4 (patch)
treef5fdf31c9459305726d10814e15bf4b812457f36 /lib/Sema/SemaType.cpp
parent85737a71fee8c737f7cfba79a0aca89298fe573b (diff)
Include pointee type information in the diagnostic for creating bad pointers or
arrays. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r--lib/Sema/SemaType.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index c135f43209..d2652c9864 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -472,7 +472,7 @@ QualType Sema::BuildPointerType(QualType T, unsigned Quals,
if (T->isReferenceType()) {
// C++ 8.3.2p4: There shall be no ... pointers to references ...
Diag(Loc, diag::err_illegal_decl_pointer_to_reference)
- << getPrintableNameForEntity(Entity);
+ << getPrintableNameForEntity(Entity) << T;
return QualType();
}
@@ -600,14 +600,14 @@ QualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM,
if (T->isFunctionType()) {
Diag(Loc, diag::err_illegal_decl_array_of_functions)
- << getPrintableNameForEntity(Entity);
+ << getPrintableNameForEntity(Entity) << T;
return QualType();
}
// C++ 8.3.2p4: There shall be no ... arrays of references ...
if (T->isReferenceType()) {
Diag(Loc, diag::err_illegal_decl_array_of_references)
- << getPrintableNameForEntity(Entity);
+ << getPrintableNameForEntity(Entity) << T;
return QualType();
}
@@ -811,7 +811,7 @@ QualType Sema::BuildMemberPointerType(QualType T, QualType Class,
// with reference type, or "cv void."
if (T->isReferenceType()) {
Diag(Loc, diag::err_illegal_decl_mempointer_to_reference)
- << (Entity? Entity.getAsString() : "type name");
+ << (Entity? Entity.getAsString() : "type name") << T;
return QualType();
}