From: Douglas Gregor Date: Fri, 6 Nov 2009 00:12:53 +0000 (+0000) Subject: Add a bunch of missing "template" keywords to disambiguate dependent template names... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=6a66b388469f045c9fcff839595900c9f1512177;p=oota-llvm.git Add a bunch of missing "template" keywords to disambiguate dependent template names. GCC eats this ill-formed code, Clang does not. I already filed PR5404 to improve recovery in this case git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86204 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/PointerUnion.h b/include/llvm/ADT/PointerUnion.h index 33f2fcb1139..49c894092fa 100644 --- a/include/llvm/ADT/PointerUnion.h +++ b/include/llvm/ADT/PointerUnion.h @@ -186,8 +186,9 @@ namespace llvm { int is() const { // Is it PT1/PT2? if (::llvm::getPointerUnionTypeNum((T*)0) != -1) - return Val.is() && Val.get().is(); - return Val.is(); + return Val.template is() && + Val.template get().template is(); + return Val.template is(); } /// get() - Return the value of the specified pointer type. If the @@ -197,9 +198,9 @@ namespace llvm { assert(is() && "Invalid accessor called"); // Is it PT1/PT2? if (::llvm::getPointerUnionTypeNum((T*)0) != -1) - return Val.get().get(); + return Val.template get().template get(); - return Val.get(); + return Val.template get(); } /// dyn_cast() - If the current value is of the specified pointer type, @@ -291,8 +292,10 @@ namespace llvm { int is() const { // Is it PT1/PT2? if (::llvm::getPointerUnionTypeNum((T*)0) != -1) - return Val.is() && Val.get().is(); - return Val.is() && Val.get().is(); + return Val.template is() && + Val.template get().template is(); + return Val.template is() && + Val.template get().template is(); } /// get() - Return the value of the specified pointer type. If the @@ -302,9 +305,9 @@ namespace llvm { assert(is() && "Invalid accessor called"); // Is it PT1/PT2? if (::llvm::getPointerUnionTypeNum((T*)0) != -1) - return Val.get().get(); + return Val.template get().template get(); - return Val.get().get(); + return Val.template get().template get(); } /// dyn_cast() - If the current value is of the specified pointer type,