File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed
include/clang/Interpreter Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -418,15 +418,12 @@ namespace Cpp {
418418
419419 // / Sets a list of all the constructor for a scope/class that is
420420 // / 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
423421 // /\param[in] parent - Pointer to the scope/class for which the constructors
424422 // / are being looked up
425423 // / to be retrieved
426424 // /\param[out] funcs - vector of handles to all constructors found under the
427425 // / given scope
428- CPPINTEROP_API void LookupConstructors (const std::string& name,
429- TCppScope_t parent,
426+ CPPINTEROP_API void LookupConstructors (TCppScope_t parent,
430427 std::vector<TCppFunction_t>& funcs);
431428
432429 // / 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 {
10431043 }
10441044
10451045 // Looks up all constructors in the current DeclContext
1046- void LookupConstructors (const std::string& name, TCppScope_t parent,
1046+ void LookupConstructors (TCppScope_t parent,
10471047 std::vector<TCppFunction_t>& funcs) {
10481048 auto * D = (Decl*)parent;
10491049
10501050 if (auto * CXXRD = llvm::dyn_cast_or_null<CXXRecordDecl>(D)) {
10511051 getSema ().ForceDeclarationOfImplicitMembers (CXXRD);
10521052 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.
10561053 for (auto * i : Result)
1057- if (GetName (i) == name)
1058- funcs.push_back (i);
1054+ funcs.push_back (i);
10591055 }
10601056 }
10611057
You can’t perform that action at this time.
0 commit comments