File tree 2 files changed +3
-10
lines changed
include/clang/Interpreter 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -418,15 +418,12 @@ namespace Cpp {
418
418
419
419
// / Sets a list of all the constructor for a scope/class that is
420
420
// / supplied as a parameter.
421
- // /\param[in] name - This string is used as a constraint, that clients can use
422
- // / to ensure the constructors match the name that they provide
423
421
// /\param[in] parent - Pointer to the scope/class for which the constructors
424
422
// / are being looked up
425
423
// / to be retrieved
426
424
// /\param[out] funcs - vector of handles to all constructors found under the
427
425
// / given scope
428
- CPPINTEROP_API void LookupConstructors (const std::string& name,
429
- TCppScope_t parent,
426
+ CPPINTEROP_API void LookupConstructors (TCppScope_t parent,
430
427
std::vector<TCppFunction_t>& funcs);
431
428
432
429
// / Sets a list of all the Templated Methods that are in the Class that is
Original file line number Diff line number Diff line change @@ -1043,19 +1043,15 @@ namespace Cpp {
1043
1043
}
1044
1044
1045
1045
// Looks up all constructors in the current DeclContext
1046
- void LookupConstructors (const std::string& name, TCppScope_t parent,
1046
+ void LookupConstructors (TCppScope_t parent,
1047
1047
std::vector<TCppFunction_t>& funcs) {
1048
1048
auto * D = (Decl*)parent;
1049
1049
1050
1050
if (auto * CXXRD = llvm::dyn_cast_or_null<CXXRecordDecl>(D)) {
1051
1051
getSema ().ForceDeclarationOfImplicitMembers (CXXRD);
1052
1052
DeclContextLookupResult Result = getSema ().LookupConstructors (CXXRD);
1053
- // Obtaining all constructors when we intend to lookup a method under a
1054
- // scope can lead to crashes. We avoid that by accumulating constructors
1055
- // only if the Decl matches the lookup name.
1056
1053
for (auto * i : Result)
1057
- if (GetName (i) == name)
1058
- funcs.push_back (i);
1054
+ funcs.push_back (i);
1059
1055
}
1060
1056
}
1061
1057
You can’t perform that action at this time.
0 commit comments