zequanwu updated this revision to Diff 265031.
zequanwu added a comment.
Remove check for context of `LambdaContextDecl`.
Update test cases.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80153/new/
https://reviews.llvm.org/D80153
Files:
clang/lib/AST/MicrosoftMangle.cpp
Index: clang/lib/AST/MicrosoftMangle.cpp
===================================================================
--- clang/lib/AST/MicrosoftMangle.cpp
+++ clang/lib/AST/MicrosoftMangle.cpp
@@ -947,12 +947,11 @@
mangleSourceName(Name);
- // If the context of a closure type is an initializer for a class
- // member (static or nonstatic), it is encoded in a qualified name.
+ // If the context is a variable or a class member, it is encoded
+ // in a qualified name.
if (LambdaManglingNumber && LambdaContextDecl) {
if ((isa<VarDecl>(LambdaContextDecl) ||
- isa<FieldDecl>(LambdaContextDecl)) &&
- LambdaContextDecl->getDeclContext()->isRecord()) {
+ isa<FieldDecl>(LambdaContextDecl))) {
mangleUnqualifiedName(cast<NamedDecl>(LambdaContextDecl));
}
}
Index: clang/lib/AST/MicrosoftMangle.cpp
===================================================================
--- clang/lib/AST/MicrosoftMangle.cpp
+++ clang/lib/AST/MicrosoftMangle.cpp
@@ -947,12 +947,11 @@
mangleSourceName(Name);
- // If the context of a closure type is an initializer for a class
- // member (static or nonstatic), it is encoded in a qualified name.
+ // If the context is a variable or a class member, it is encoded
+ // in a qualified name.
if (LambdaManglingNumber && LambdaContextDecl) {
if ((isa<VarDecl>(LambdaContextDecl) ||
- isa<FieldDecl>(LambdaContextDecl)) &&
- LambdaContextDecl->getDeclContext()->isRecord()) {
+ isa<FieldDecl>(LambdaContextDecl))) {
mangleUnqualifiedName(cast<NamedDecl>(LambdaContextDecl));
}
}
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits