mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 23:36:05 +00:00
Fix off-by-one error in worst-case number of offsets needed for an AST record.
llvm-svn: 266353
This commit is contained in:
parent
acc50e0a99
commit
9c4fb0a833
@ -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.
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user