[cfe-commits] r164656 - in /cfe/trunk: include/clang/AST/ lib/AST/ lib/Sema/ lib/Serialization/ test/CodeGenCXX/ tools/libclang/

Abramo Bagnara abramo.bagnara at bugseng.com
Sat Sep 29 08:16:45 PDT 2012


Il 26/09/2012 04:36, Eli Friedman ha scritto:
> Modified: cfe/trunk/lib/AST/TemplateBase.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TemplateBase.cpp?rev=164656&r1=164655&r2=164656&view=diff
> ==============================================================================
> --- cfe/trunk/lib/AST/TemplateBase.cpp (original)
> +++ cfe/trunk/lib/AST/TemplateBase.cpp Tue Sep 25 21:36:12 2012
...
> @@ -348,18 +354,20 @@
>    }
>      
>    case Declaration: {
> -    if (NamedDecl *ND = dyn_cast_or_null<NamedDecl>(getAsDecl())) {
> -      if (ND->getDeclName()) {
> -        Out << *ND;
> -      } else {
> -        Out << "<anonymous>";
> -      }
> +    NamedDecl *ND = cast<NamedDecl>(getAsDecl());
> +    if (ND->getDeclName()) {
> +      // FIXME: distinguish between pointer and reference args?
> +      Out << *ND;
>      } else {
> -      Out << "nullptr";
> +      Out << "<anonymous>";
>      }
>      break;
>    }
> -    
> +
> +  case NullPtr: {
> +    Out << "nullptr";
> +  }
> +

You've forgotten the break, don't you?

>    case Template:
>      getAsTemplate().print(Out, Policy);
>      break;


-- 
Abramo Bagnara

BUGSENG srl - http://bugseng.com
mailto:abramo.bagnara at bugseng.com



More information about the cfe-commits mailing list