diff options
Diffstat (limited to 'lib/Sema/TypeLocBuilder.h')
-rw-r--r-- | lib/Sema/TypeLocBuilder.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Sema/TypeLocBuilder.h b/lib/Sema/TypeLocBuilder.h index 7a5e43e..f36ec9f 100644 --- a/lib/Sema/TypeLocBuilder.h +++ b/lib/Sema/TypeLocBuilder.h @@ -15,8 +15,8 @@ #ifndef LLVM_CLANG_SEMA_TYPELOCBUILDER_H #define LLVM_CLANG_SEMA_TYPELOCBUILDER_H -#include "clang/AST/TypeLoc.h" #include "clang/AST/ASTContext.h" +#include "clang/AST/TypeLoc.h" namespace clang { @@ -75,7 +75,7 @@ class TypeLocBuilder { /// previously retrieved from this builder. TypeSpecTypeLoc pushTypeSpec(QualType T) { size_t LocalSize = TypeSpecTypeLoc::LocalDataSize; - return cast<TypeSpecTypeLoc>(pushImpl(T, LocalSize)); + return pushImpl(T, LocalSize).castAs<TypeSpecTypeLoc>(); } /// Resets this builder to the newly-initialized state. @@ -97,8 +97,8 @@ class TypeLocBuilder { /// Pushes space for a new TypeLoc of the given type. Invalidates /// any TypeLocs previously retrieved from this builder. template <class TyLocType> TyLocType push(QualType T) { - size_t LocalSize = cast<TyLocType>(TypeLoc(T, 0)).getLocalDataSize(); - return cast<TyLocType>(pushImpl(T, LocalSize)); + size_t LocalSize = TypeLoc(T, 0).castAs<TyLocType>().getLocalDataSize(); + return pushImpl(T, LocalSize).castAs<TyLocType>(); } /// Creates a TypeSourceInfo for the given type. |