From: Francois Pichet Date: Thu, 28 Apr 2011 05:12:34 +0000 (+0000) Subject: Update r130381 to check for UO_AddrOf. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11f98d0691312f70be40315438666dafb09c458a;p=clang Update r130381 to check for UO_AddrOf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130384 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index ae80181d84..d5d1fcbb84 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -3093,16 +3093,15 @@ CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, bool AddressTaken = false; SourceLocation AddrOpLoc; if (UnaryOperator *UnOp = dyn_cast(Arg)) { - - // Support &__uuidof(class_with_uuid) as a non-type template argument. - // Very common in Microsoft COM headers. - if (S.getLangOptions().Microsoft && - isa(UnOp->getSubExpr())) { - Converted = TemplateArgument(ArgIn); - return false; - } - if (UnOp->getOpcode() == UO_AddrOf) { + // Support &__uuidof(class_with_uuid) as a non-type template argument. + // Very common in Microsoft COM headers. + if (S.getLangOptions().Microsoft && + isa(UnOp->getSubExpr())) { + Converted = TemplateArgument(ArgIn); + return false; + } + DRE = dyn_cast(UnOp->getSubExpr()); AddressTaken = true; AddrOpLoc = UnOp->getOperatorLoc();