[PATCH] D33095: [analyzer] Avoid allocation in Std C function modelling.
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 11 04:23:13 PDT 2017
xazax.hun created this revision.
Herald added a subscriber: whisperity.
Avoid an allocation in modelling Std C functions to improve the performance.
Repository:
rL LLVM
https://reviews.llvm.org/D33095
Files:
lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
Index: lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
===================================================================
--- lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
+++ 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.98610.patch
Type: text/x-patch
Size: 610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170511/84c50e73/attachment.bin>
More information about the cfe-commits
mailing list