Fix warning; make determineStorageType() static.

This commit is contained in:
Axel Naumann 2015-04-07 09:34:00 +02:00 committed by sftnight
parent ca9ac1961f
commit 397f6fb9e9
2 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ namespace cling {
/// \brief Determine the underlying, canonical, desugared, unqualified type:
/// the element of Storage to be used.
EStorageType determineStorageType(clang::QualType QT) const;
static EStorageType determineStorageType(clang::QualType QT);
/// \brief Allocate storage as needed by the type.
void ManagedAllocate();

View File

@ -157,8 +157,8 @@ namespace cling {
}
Value::Value(clang::QualType clangTy, Interpreter& Interp):
m_Type(clangTy.getAsOpaquePtr()),
m_StorageType(determineStorageType(clangTy)),
m_Type(clangTy.getAsOpaquePtr()),
m_Interpreter(&Interp) {
if (needsManagedAllocation())
ManagedAllocate();
@ -229,7 +229,7 @@ namespace cling {
return 1;
}
Value::EStorageType Value::determineStorageType(clang::QualType QT) const {
Value::EStorageType Value::determineStorageType(clang::QualType QT) {
const clang::Type* desugCanon = QT->getUnqualifiedDesugaredType();
desugCanon = desugCanon->getCanonicalTypeUnqualified()->getTypePtr()
->getUnqualifiedDesugaredType();