[cfe-commits] r97136 - /cfe/trunk/lib/Sema/TreeTransform.h

Douglas Gregor dgregor at apple.com
Thu Feb 25 09:58:50 PST 2010


On Feb 25, 2010, at 5:04 AM, Gabor Greif wrote:

> Author: ggreif
> Date: Thu Feb 25 07:04:33 2010
> New Revision: 97136
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=97136&view=rev
> Log:
> Add "template" keyword at strategic position to fix
> compilation using g++ v3.4.
> 
> I'll watch the buildbots and back out if necessary.
> Feel free to do the same if something breaks.
> 
> Without this patch I get (on g++ 3.4.6) following error:
> 
> In file included from clang/lib/Sema/SemaTemplate.cpp:14:
> clang/lib/Sema/TreeTransform.h: In member function `clang::ASTOwningResult<&clang::ActionBase::DeleteExpr> clang::TreeTransform<Derived>::RebuildCXXPseudoDestructorExpr(clang::ASTOwningResult<&clang::ActionBase::DeleteExpr>, clang::SourceLocation, bool, clang::NestedNameSpecifier*, clang::SourceRange, clang::TypeSourceInfo*, clang::SourceLocation, clang::SourceLocation, clang::PseudoDestructorTypeStorage)':
> clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before '>' token
> clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before ')' token
> make[4]: *** [clang/lib/Sema/Release/SemaTemplate.o] Error 1

Hah, go figure.  Both the code I committed and the change you committed are well-formed. I was building/testing with Clang, which has no problems with the code I committed, but obviously GCC couldn't grok it.

Thanks for fixing!

	- Doug

> Modified:
>    cfe/trunk/lib/Sema/TreeTransform.h
> 
> Modified: cfe/trunk/lib/Sema/TreeTransform.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=97136&r1=97135&r2=97136&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Sema/TreeTransform.h (original)
> +++ cfe/trunk/lib/Sema/TreeTransform.h Thu Feb 25 07:04:33 2010
> @@ -5781,7 +5781,8 @@
>   if (BaseE->isTypeDependent() || Destroyed.getIdentifier() ||
>       (!isArrow && !BaseType->getAs<RecordType>()) ||
>       (isArrow && BaseType->getAs<PointerType>() && 
> -       !BaseType->getAs<PointerType>()->getPointeeType()->getAs<RecordType>())){
> +       !BaseType->getAs<PointerType>()->getPointeeType()
> +                                              ->template getAs<RecordType>())){
>     // This pseudo-destructor expression is still a pseudo-destructor.
>     return SemaRef.BuildPseudoDestructorExpr(move(Base), OperatorLoc,
>                                              isArrow? tok::arrow : tok::period,
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits





More information about the cfe-commits mailing list