diff options
-rw-r--r-- | clang/include/clang/Serialization/ASTWriter.h | 3 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/cxx-decls-imported.h | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/clang/include/clang/Serialization/ASTWriter.h b/clang/include/clang/Serialization/ASTWriter.h index 5ca94b2c361..a5915e7c7eb 100644 --- a/clang/include/clang/Serialization/ASTWriter.h +++ b/clang/include/clang/Serialization/ASTWriter.h @@ -704,7 +704,8 @@ class ASTRecordWriter { /// declaration or type. SmallVector<Stmt *, 16> StmtsToEmit; - static const int MaxOffsetIndices = 4; + /// Worst case: bases, vbases, visible and lexical contents, local redecls. + static const int MaxOffsetIndices = 5; /// \brief Indices of record elements that describe offsets within the /// bitcode. These will be converted to offsets relative to the current /// record when emitted. diff --git a/clang/test/Modules/Inputs/cxx-decls-imported.h b/clang/test/Modules/Inputs/cxx-decls-imported.h index a4910fee753..0a172150fc1 100644 --- a/clang/test/Modules/Inputs/cxx-decls-imported.h +++ b/clang/test/Modules/Inputs/cxx-decls-imported.h @@ -50,3 +50,8 @@ namespace Alias = Aliased; struct InhCtorA { InhCtorA(int); }; struct InhCtorB : InhCtorA { using InhCtorA::InhCtorA; }; + +struct ClassWithVBases : HasFriends, virtual HasNontrivialDefaultConstructor { + int n; +}; +struct ClassWithVBases; |