xiaobai created this revision. xiaobai added reviewers: compnerd, Szelethus, boga95, NoQ, alexshap. Herald added subscribers: Charusso, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang.
Explicitly deleting the copy constructor makes compiling the function `ento::registerGenericTaintChecker` difficult with some compilers. When we construct an `llvm::Optional<TaintConfig>`, the optional is constructed with a const TaintConfig reference which it then uses to invoke the deleted TaintConfig copy constructor. I've observered this failing with clang 3.8 on Ubuntu 16.04. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D66192 Files: clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp Index: clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp =================================================================== --- clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp +++ clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp @@ -71,9 +71,9 @@ std::vector<NameArgsPair> Sinks; TaintConfiguration() = default; - TaintConfiguration(const TaintConfiguration &) = delete; + TaintConfiguration(const TaintConfiguration &) = default; TaintConfiguration(TaintConfiguration &&) = default; - TaintConfiguration &operator=(const TaintConfiguration &) = delete; + TaintConfiguration &operator=(const TaintConfiguration &) = default; TaintConfiguration &operator=(TaintConfiguration &&) = default; };
Index: clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp =================================================================== --- clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp +++ clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp @@ -71,9 +71,9 @@ std::vector<NameArgsPair> Sinks; TaintConfiguration() = default; - TaintConfiguration(const TaintConfiguration &) = delete; + TaintConfiguration(const TaintConfiguration &) = default; TaintConfiguration(TaintConfiguration &&) = default; - TaintConfiguration &operator=(const TaintConfiguration &) = delete; + TaintConfiguration &operator=(const TaintConfiguration &) = default; TaintConfiguration &operator=(TaintConfiguration &&) = default; };
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits