summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-24 06:25:27 +0000
committerChris Lattner <sabre@nondot.org>2008-11-24 06:25:27 +0000
commit1e5665e6be5b00219581c1b951e0e5721c8b64e0 (patch)
treeb67f3b9be0871c3ff9bb37414bb3fe7723bd1156 /clang/lib/Sema/SemaDeclAttr.cpp
parentf3d3faeca60a7fab63ee03bf2b04d65d8640374e (diff)
downloadbcm5719-llvm-1e5665e6be5b00219581c1b951e0e5721c8b64e0.tar.gz
bcm5719-llvm-1e5665e6be5b00219581c1b951e0e5721c8b64e0.zip
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. llvm-svn: 59948
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index ce63d13b4d8..2e6108cf0a5 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -158,8 +158,7 @@ static void HandleExtVectorTypeAttr(Decl *d, const AttributeList &Attr,
// 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 @@ static void HandleVectorSizeAttr(Decl *D, const AttributeList &Attr, Sema &S) {
}
// 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));
OpenPOWER on IntegriCloud