aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorAlan Zhao <ayzhao@google.com>2023-05-05 14:50:36 -0700
committerAlan Zhao <ayzhao@google.com>2023-05-09 10:31:43 -0700
commitd1d35f04c6cb2e3d5b0fbc6101d5425a33f8fc63 (patch)
tree55739c52bb84a6866ff86eaac2eb17ec179a39ba /clang/lib/Lex/ModuleMap.cpp
parentee8ed0b3099e63ba0a18cca42b9cfdf098bc6201 (diff)
downloadllvm-d1d35f04c6cb2e3d5b0fbc6101d5425a33f8fc63.zip
llvm-d1d35f04c6cb2e3d5b0fbc6101d5425a33f8fc63.tar.gz
llvm-d1d35f04c6cb2e3d5b0fbc6101d5425a33f8fc63.tar.bz2
[clang] Fix initializer_list matching failures with modules
Previously, if a class with a defined public virtual destructor is declared before including <initializer_list> and initializer_list is provided via a Clang module, then overload resolution would fail for std::initializer_list. This is because when Clang sees the virtual destructor, Clang creates an implicit NamespaceDecl for std to implicitly declare a std::bad_alloc. That NamespaceDecl is not added to the translation unit's lookup table, so when the module containing std::initializer_list is imported later, that module's std NamespaceDecl can't find the previous std NamespaceDecl during redeclaration lookup, causing overload resolution to fail. To fix this, implicitly created std NamespaceDecls are now added to the lookup map. At the same time, their IdentifierNamespace members are cleared to prevent regular name lookups from finding it. Fixes 60929 Reviewed By: ChuanqiXu, #clang-language-wg, inclyc Differential Revision: https://reviews.llvm.org/D150001
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions