[cfe-commits] r149819 - in /cfe/trunk: include/clang/AST/CanonicalType.h lib/AST/Type.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sun Feb 5 01:46:30 PST 2012
Author: d0k
Date: Sun Feb 5 03:46:30 2012
New Revision: 149819
URL: http://llvm.org/viewvc/llvm-project?rev=149819&view=rev
Log:
Move operator overload out of line. Calling operator<< on a forward declared type doesn't seem to work on MSVC.
Modified:
cfe/trunk/include/clang/AST/CanonicalType.h
cfe/trunk/lib/AST/Type.cpp
Modified: cfe/trunk/include/clang/AST/CanonicalType.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CanonicalType.h?rev=149819&r1=149818&r2=149819&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/CanonicalType.h (original)
+++ cfe/trunk/include/clang/AST/CanonicalType.h Sun Feb 5 03:46:30 2012
@@ -16,7 +16,6 @@
#define LLVM_CLANG_AST_CANONICAL_TYPE_H
#include "clang/AST/Type.h"
-#include "clang/Basic/Diagnostic.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/type_traits.h"
#include <iterator>
@@ -201,11 +200,7 @@
return CanQualType::CreateUnsafe(getCanonicalTypeInternal());
}
-inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
- CanQualType T) {
- DB << static_cast<QualType>(T);
- return DB;
-}
+const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB, CanQualType T);
//----------------------------------------------------------------------------//
// Internal proxy classes used by canonical types
Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=149819&r1=149818&r2=149819&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Sun Feb 5 03:46:30 2012
@@ -2324,3 +2324,9 @@
DiagnosticsEngine::ak_qualtype);
return PD;
}
+
+const DiagnosticBuilder &clang::operator<<(const DiagnosticBuilder &DB,
+ CanQualType T) {
+ DB << static_cast<QualType>(T);
+ return DB;
+}
More information about the cfe-commits
mailing list