[PATCH] D33095: [analyzer] Avoid allocation in Std C function modelling.

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 12 00:07:16 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL302879: [analyzer] Avoid an allocation in Std C function modelling (authored by xazax).

Changed prior to commit:
  https://reviews.llvm.org/D33095?vs=98610&id=98730#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D33095

Files:
  cfe/trunk/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp


Index: cfe/trunk/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
===================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
@@ -440,7 +440,10 @@
   BasicValueFactory &BVF = SVB.getBasicValueFactory();
   initFunctionSummaries(BVF);
 
-  std::string Name = FD->getQualifiedNameAsString();
+  IdentifierInfo *II = FD->getIdentifier();
+  if (!II)
+    return None;
+  StringRef Name = II->getName();
   if (Name.empty() || !C.isCLibraryFunction(FD, Name))
     return None;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33095.98730.patch
Type: text/x-patch
Size: 640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170512/8abb63fd/attachment.bin>


More information about the cfe-commits mailing list