Index: clang/lib/StaticAnalyzer/Core/CallEvent.cpp =================================================================== --- clang/lib/StaticAnalyzer/Core/CallEvent.cpp +++ clang/lib/StaticAnalyzer/Core/CallEvent.cpp @@ -327,9 +327,9 @@ if (const auto *II = Name.getAsIdentifierInfo()) return II == CD.II.getValue(); // Fast case. - // Simply report mismatch for: + // Fallback to the slow stringification and comparison for: // C++ overloaded operators, constructors, destructors, etc. - return false; + return Name.getAsString() == CD.getFunctionName(); }; const auto ExactMatchArgAndParamCounts = Index: clang/unittests/StaticAnalyzer/CallDescriptionTest.cpp =================================================================== --- clang/unittests/StaticAnalyzer/CallDescriptionTest.cpp +++ clang/unittests/StaticAnalyzer/CallDescriptionTest.cpp @@ -187,12 +187,11 @@ using namespace std; basic_string s("hello"); })code"; - // FIXME: We should match. const std::string Code = (Twine{MockStdStringHeader} + AdditionalCode).str(); EXPECT_TRUE(tooling::runToolOnCode( std::unique_ptr( new CallDescriptionAction({ - {{{"std", "basic_string", "basic_string"}, 2, 2}, false}, + {{{"std", "basic_string", "basic_string"}, 2, 2}, true}, })), Code)); } @@ -216,10 +215,9 @@ aaa::bbb::Bar x; int tmp = x; })code"; - // FIXME: We should match. EXPECT_TRUE(tooling::runToolOnCode( std::unique_ptr(new CallDescriptionAction<>({ - {{{"aaa", "bbb", "Bar", "operator int"}}, false}, + {{{"aaa", "bbb", "Bar", "operator int"}}, true}, })), Code)); }