]> granicus.if.org Git - clang/commitdiff
Used a nicer cast.
authorAbramo Bagnara <abramo.bagnara@gmail.com>
Sun, 6 Mar 2011 22:48:24 +0000 (22:48 +0000)
committerAbramo Bagnara <abramo.bagnara@gmail.com>
Sun, 6 Mar 2011 22:48:24 +0000 (22:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127134 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaType.cpp

index efb44df4746b7064e2c8076b5e2c1bb5f6279a23..9d973237ddc2edab99d56a65efc9a05f28e54c9f 100644 (file)
@@ -2383,7 +2383,7 @@ namespace {
       case NestedNameSpecifier::Identifier:
         assert(isa<DependentNameType>(ClsTy) && "Unexpected TypeLoc");
         {
-          DependentNameTypeLoc DNTLoc = *cast<DependentNameTypeLoc>(&ClsTL);
+          DependentNameTypeLoc DNTLoc = cast<DependentNameTypeLoc>(ClsTL);
           DNTLoc.setKeywordLoc(SourceLocation());
           DNTLoc.setQualifierLoc(NNSLoc.getPrefix());
           DNTLoc.setNameLoc(NNSLoc.getLocalBeginLoc());