diff options
| author | 2018-04-06 14:26:03 +0000 | |
|---|---|---|
| committer | 2018-04-06 14:26:03 +0000 | |
| commit | bdabc2f19ffb9e20600dad6e8a300842a7bda50e (patch) | |
| tree | c50e7b2e5449b074651bb82a58517a8ebc4a8cf7 /gnu/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp | |
| parent | Print a 'p' flag for file descriptors that were opened after pledge(2). (diff) | |
| download | wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.tar.xz wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.zip | |
Import LLVM 6.0.1 release including clang, lld and lldb.
"where is the kaboom?" deraadt@
Diffstat (limited to 'gnu/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/gnu/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp b/gnu/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp index d5289fb9d42..5f11d8a2a36 100644 --- a/gnu/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp +++ b/gnu/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp @@ -18,7 +18,7 @@ #include "clang/AST/StmtVisitor.h" #include "clang/Analysis/Analyses/PostOrderCFGView.h" #include "clang/Analysis/Analyses/UninitializedValues.h" -#include "clang/Analysis/AnalysisContext.h" +#include "clang/Analysis/AnalysisDeclContext.h" #include "clang/Analysis/CFG.h" #include "clang/Analysis/DomainSpecific/ObjCNoReturn.h" #include "llvm/ADT/DenseMap.h" @@ -440,16 +440,11 @@ static bool isPointerToConst(const QualType &QT) { void ClassifyRefs::VisitCallExpr(CallExpr *CE) { // Classify arguments to std::move as used. - if (CE->getNumArgs() == 1) { - if (FunctionDecl *FD = CE->getDirectCallee()) { - if (FD->isInStdNamespace() && FD->getIdentifier() && - FD->getIdentifier()->isStr("move")) { - // RecordTypes are handled in SemaDeclCXX.cpp. - if (!CE->getArg(0)->getType()->isRecordType()) - classify(CE->getArg(0), Use); - return; - } - } + if (CE->isCallToStdMove()) { + // RecordTypes are handled in SemaDeclCXX.cpp. + if (!CE->getArg(0)->getType()->isRecordType()) + classify(CE->getArg(0), Use); + return; } // If a value is passed by const pointer or by const reference to a function, |
