[PATCH] D77641: [analyzer] StdLibraryFunctionsChecker: Associate summaries to FunctionDecls

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 8 05:55:37 PDT 2020


Szelethus accepted this revision.
Szelethus added a comment.
This revision is now accepted and ready to land.

LGTM! Its always a joy to see you do C++. I suspect your change made compiler errors a bit nicer as well, so you don't get one giant "Well, this huuuuuge single argument doesn't look match any of the assignment operators".

We don't have any function names that have multiple summaries just yet, correct? Also, this change is NFC, right? Could you make a tag about that to the revision title in the future?



================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:554
 
-  IdentifierInfo *II = FD->getIdentifier();
-  if (!II)
-    return None;
-  StringRef Name = II->getName();
-  if (Name.empty() || !C.isCLibraryFunction(FD, Name))
-    return None;
-
-  auto FSMI = FunctionSummaryMap.find(Name);
+  auto FSMI = FunctionSummaryMap.find(FD->getCanonicalDecl());
   if (FSMI == FunctionSummaryMap.end())
----------------
How about `FSMIt`? :^)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77641/new/

https://reviews.llvm.org/D77641





More information about the cfe-commits mailing list