diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /lib/Sema/TypeLocBuilder.h | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
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. |