diff options
| author | Axel Naumann <Axel.Naumann@cern.ch> | 2012-10-01 09:51:27 +0000 |
|---|---|---|
| committer | Axel Naumann <Axel.Naumann@cern.ch> | 2012-10-01 09:51:27 +0000 |
| commit | a8243e9aa25bdd4eb6b7810c7c056b0a635fced4 (patch) | |
| tree | d60d6972f8fe9dc45255be182e05999194564008 /clang/lib/Serialization | |
| parent | 866ba3e36561dfe251139530487868025d782743 (diff) | |
| download | bcm5719-llvm-a8243e9aa25bdd4eb6b7810c7c056b0a635fced4.tar.gz bcm5719-llvm-a8243e9aa25bdd4eb6b7810c7c056b0a635fced4.zip | |
The Redeclarable part of named decls is read before their name.
Lookup can nevertheless find them due to the serialized lookup table.
For instance when reading a template decl's templatedDecl, it will search for existing decls that it could be a redeclaration of, and find the half-read template decl.
Thus there is no point in asserting the names of decls.
llvm-svn: 164932
Diffstat (limited to 'clang/lib/Serialization')
| -rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 17296685c4e..639ef93fb6b 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -4950,8 +4950,10 @@ namespace { continue; if (ND->getDeclName() != This->Name) { - assert(!This->Name.getCXXNameType().isNull() && - "Name mismatch without a type"); + // A name might be null because the decl's redeclarable part is + // currently read before reading its name. The lookup is triggered by + // building that decl (likely indirectly), and so it is later in the + // sense of "already existing" and can be ignored here. continue; } |

