aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-08-27 00:13:57 +0000
committerAnders Carlsson <andersca@mac.com>2009-08-27 00:13:57 +0000
commita6ec7ad25a137fd42d84e6b6d44b32976cae440c (patch)
tree1e5b9a0a0355d71f0bfd9b133deb476624842696 /include/clang/Basic
parentb790661a15d93941d2c33a0ea328254277b3d7e3 (diff)
New RequireNonAbstractType function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80183 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td2
-rw-r--r--include/clang/Basic/PartialDiagnostic.h9
2 files changed, 8 insertions, 3 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 670a0d048a..b76b75ea46 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -315,7 +315,7 @@ def err_introducing_special_friend : Error<
"destructor|conversion operator}0 as a friend">;
def err_abstract_type_in_decl : Error<
- "%select{return|parameter|variable|field}1 type %0 is an abstract class">;
+ "%select{return|parameter|variable|field}0 type %1 is an abstract class">;
def err_allocation_of_abstract_type : Error<
"allocation of an object of abstract type %0">;
diff --git a/include/clang/Basic/PartialDiagnostic.h b/include/clang/Basic/PartialDiagnostic.h
index 6a6e6128ff..b4ba793e7e 100644
--- a/include/clang/Basic/PartialDiagnostic.h
+++ b/include/clang/Basic/PartialDiagnostic.h
@@ -115,18 +115,23 @@ public:
}
friend const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
- QualType T) {
+ QualType T) {
PD.AddTaggedVal(reinterpret_cast<intptr_t>(T.getAsOpaquePtr()),
Diagnostic::ak_qualtype);
return PD;
}
+ friend const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
+ unsigned I) {
+ PD.AddTaggedVal(I, Diagnostic::ak_uint);
+ return PD;
+ }
+
friend inline const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
const SourceRange &R) {
PD.AddSourceRange(R);
return PD;
}
-
};
inline PartialDiagnostic PDiag(unsigned DiagID) {