Change a whole lot of diagnostics to take QualType's directly
instead of converting them to strings first. This also fixes a
bunch of minor inconsistencies in the diagnostics emitted by clang
and adds a bunch of FIXME's to DiagnosticKinds.def.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59948 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index ce63d13..2e6108c 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -158,8 +158,7 @@
// unlike gcc's vector_size attribute, we do not allow vectors to be defined
// in conjunction with complex types (pointers, arrays, functions, etc.).
if (!curType->isIntegerType() && !curType->isRealFloatingType()) {
- S.Diag(Attr.getLoc(), diag::err_attribute_invalid_vector_type)
- << curType.getAsString();
+ S.Diag(Attr.getLoc(), diag::err_attribute_invalid_vector_type) << curType;
return;
}
// unlike gcc's vector_size attribute, the size is specified as the
@@ -229,8 +228,7 @@
}
// the base type must be integer or float.
if (!CurType->isIntegerType() && !CurType->isRealFloatingType()) {
- S.Diag(Attr.getLoc(), diag::err_attribute_invalid_vector_type)
- << CurType.getAsString();
+ S.Diag(Attr.getLoc(), diag::err_attribute_invalid_vector_type) << CurType;
return;
}
unsigned typeSize = static_cast<unsigned>(S.Context.getTypeSize(CurType));