From b5d763d87c8ffb969b4d4a59ed98a2e3516e0850 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 2 Jan 2012 06:26:22 +0000 Subject: [PATCH] Small cosmetic cleanups in code I will change anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147424 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/Decl.cpp | 8 ++++---- test/CodeGenCXX/visibility.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 847e906af7..c1ed43709e 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -115,7 +115,7 @@ struct LVFlags { /// \brief Get the most restrictive linkage for the types in the given /// template parameter list. -static LVPair +static LVPair getLVForTemplateParameterList(const TemplateParameterList *Params) { LVPair LV(ExternalLinkage, DefaultVisibility); for (TemplateParameterList::const_iterator P = Params->begin(), @@ -130,7 +130,7 @@ getLVForTemplateParameterList(const TemplateParameterList *Params) { } continue; } - + if (!NTTP->getType()->isDependentType()) { LV = merge(LV, NTTP->getType()->getLinkageAndVisibility()); continue; @@ -162,7 +162,7 @@ static LVPair getLVForTemplateArgumentList(const TemplateArgument *Args, case TemplateArgument::Integral: case TemplateArgument::Expression: break; - + case TemplateArgument::Type: LV = merge(LV, Args[I].getAsType()->getLinkageAndVisibility()); break; @@ -178,7 +178,7 @@ static LVPair getLVForTemplateArgumentList(const TemplateArgument *Args, case TemplateArgument::Template: case TemplateArgument::TemplateExpansion: - if (TemplateDecl *Template + if (TemplateDecl *Template = Args[I].getAsTemplateOrTemplatePattern().getAsTemplateDecl()) LV = merge(LV, getLVForDecl(Template, F)); break; diff --git a/test/CodeGenCXX/visibility.cpp b/test/CodeGenCXX/visibility.cpp index ce1e8fd9d9..cfa4f4fbcf 100644 --- a/test/CodeGenCXX/visibility.cpp +++ b/test/CodeGenCXX/visibility.cpp @@ -456,7 +456,7 @@ namespace test22 { } namespace PR10113 { - namespace foo __attribute__ ((__visibility__ ("default"))) { + namespace foo DEFAULT { template class bar { void zed() {} -- 2.40.0