diff options
Diffstat (limited to 'contrib/llvm-project/clang/utils/TableGen/ClangASTPropertiesEmitter.cpp')
-rw-r--r-- | contrib/llvm-project/clang/utils/TableGen/ClangASTPropertiesEmitter.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/llvm-project/clang/utils/TableGen/ClangASTPropertiesEmitter.cpp b/contrib/llvm-project/clang/utils/TableGen/ClangASTPropertiesEmitter.cpp index 256ca42e9aab..caced02e1e11 100644 --- a/contrib/llvm-project/clang/utils/TableGen/ClangASTPropertiesEmitter.cpp +++ b/contrib/llvm-project/clang/utils/TableGen/ClangASTPropertiesEmitter.cpp @@ -708,15 +708,13 @@ ASTPropsEmitter::emitBasicReaderWriterTemplate(const ReaderWriterInfo &info) { // Emit the Basic{Reader,Writer}Base template. Out << "template <class Impl>\n" "class Basic" << info.ClassSuffix << "Base {\n"; - if (info.IsReader) - Out << " ASTContext &C;\n"; + Out << " ASTContext &C;\n"; Out << "protected:\n" - " Basic" << info.ClassSuffix << "Base" - << (info.IsReader ? "(ASTContext &ctx) : C(ctx)" : "()") - << " {}\n" + " Basic" + << info.ClassSuffix << "Base" << ("(ASTContext &ctx) : C(ctx)") + << " {}\n" "public:\n"; - if (info.IsReader) - Out << " ASTContext &getASTContext() { return C; }\n"; + Out << " ASTContext &getASTContext() { return C; }\n"; Out << " Impl &asImpl() { return static_cast<Impl&>(*this); }\n"; auto enterReaderWriterMethod = [&](StringRef cxxTypeName, |