summaryrefslogtreecommitdiff
path: root/lib/Frontend
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-04 22:11:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-04 22:11:23 +0000
commit0c75eea8f661a82866688fd1fc4465883c4dd7d5 (patch)
tree96848f3b7cc25f95142a52b6dd2ba93f1de6e413 /lib/Frontend
parentbab175ec4b075c8076ba14c762900392533f6ee4 (diff)
Notes
Diffstat (limited to 'lib/Frontend')
-rw-r--r--lib/Frontend/ASTConsumers.cpp54
-rw-r--r--lib/Frontend/CompilerInvocation.cpp1
2 files changed, 54 insertions, 1 deletions
diff --git a/lib/Frontend/ASTConsumers.cpp b/lib/Frontend/ASTConsumers.cpp
index bd2ee06d1653c..d8118cb30f631 100644
--- a/lib/Frontend/ASTConsumers.cpp
+++ b/lib/Frontend/ASTConsumers.cpp
@@ -370,6 +370,26 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC,
break;
}
+ case Decl::ClassTemplateSpecialization: {
+ const auto *CTSD = cast<ClassTemplateSpecializationDecl>(DC);
+ if (CTSD->isCompleteDefinition())
+ Out << "[class template specialization] ";
+ else
+ Out << "<class template specialization> ";
+ Out << *CTSD;
+ break;
+ }
+
+ case Decl::ClassTemplatePartialSpecialization: {
+ const auto *CTPSD = cast<ClassTemplatePartialSpecializationDecl>(DC);
+ if (CTPSD->isCompleteDefinition())
+ Out << "[class template partial specialization] ";
+ else
+ Out << "<class template partial specialization> ";
+ Out << *CTPSD;
+ break;
+ }
+
default:
llvm_unreachable("a decl that inherits DeclContext isn't handled");
}
@@ -400,7 +420,8 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC,
case Decl::CXXConstructor:
case Decl::CXXDestructor:
case Decl::CXXConversion:
- {
+ case Decl::ClassTemplateSpecialization:
+ case Decl::ClassTemplatePartialSpecialization: {
DeclContext* DC = cast<DeclContext>(I);
PrintDeclContext(DC, Indentation+2);
break;
@@ -478,6 +499,37 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC,
Out << "<omp threadprivate> " << '"' << I << "\"\n";
break;
}
+ case Decl::Friend: {
+ Out << "<friend>";
+ if (const NamedDecl *ND = cast<FriendDecl>(I)->getFriendDecl())
+ Out << ' ' << *ND;
+ Out << "\n";
+ break;
+ }
+ case Decl::Using: {
+ Out << "<using> " << *cast<UsingDecl>(I) << "\n";
+ break;
+ }
+ case Decl::UsingShadow: {
+ Out << "<using shadow> " << *cast<UsingShadowDecl>(I) << "\n";
+ break;
+ }
+ case Decl::Empty: {
+ Out << "<empty>\n";
+ break;
+ }
+ case Decl::AccessSpec: {
+ Out << "<access specifier>\n";
+ break;
+ }
+ case Decl::VarTemplate: {
+ Out << "<var template> " << *cast<VarTemplateDecl>(I) << "\n";
+ break;
+ }
+ case Decl::StaticAssert: {
+ Out << "<static assert>\n";
+ break;
+ }
default:
Out << "DeclKind: " << DK << '"' << I << "\"\n";
llvm_unreachable("decl unhandled");
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index a0682e26e7025..ca4a7655a37df 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -602,6 +602,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.NoDwarfDirectoryAsm = Args.hasArg(OPT_fno_dwarf_directory_asm);
Opts.SoftFloat = Args.hasArg(OPT_msoft_float);
Opts.StrictEnums = Args.hasArg(OPT_fstrict_enums);
+ Opts.StrictReturn = !Args.hasArg(OPT_fno_strict_return);
Opts.StrictVTablePointers = Args.hasArg(OPT_fstrict_vtable_pointers);
Opts.UnsafeFPMath = Args.hasArg(OPT_menable_unsafe_fp_math) ||
Args.hasArg(OPT_cl_unsafe_math_optimizations) ||