diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-07-17 00:57:57 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-07-17 00:57:57 +0000 |
commit | 8ac6c9dd67271cfecead8157929737659f838f36 (patch) | |
tree | d217e5d6e8264e85270774293d1b696b3c2fe996 /clang/lib/Analysis | |
parent | 35dbd0b1ff4b9c26a51fa8ae178f8799f3976f67 (diff) | |
download | bcm5719-llvm-8ac6c9dd67271cfecead8157929737659f838f36.tar.gz bcm5719-llvm-8ac6c9dd67271cfecead8157929737659f838f36.zip |
[CFG] [analyzer] Allow elidable copies to have more than one arguments.
Copy-constructors and move-constructors may have default arguments. It is
incorrect to assert that they only have one argument, i.e. the reference to the
object being copied or moved. Remove the assertion.
Differential Revision: https://reviews.llvm.org/D49215
llvm-svn: 337229
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r-- | clang/lib/Analysis/CFG.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp index 62803f4ba56..b895087e511 100644 --- a/clang/lib/Analysis/CFG.cpp +++ b/clang/lib/Analysis/CFG.cpp @@ -1263,7 +1263,6 @@ void CFGBuilder::findConstructionContexts( // Support pre-C++17 copy elision AST. auto *CE = cast<CXXConstructExpr>(Child); if (BuildOpts.MarkElidedCXXConstructors && CE->isElidable()) { - assert(CE->getNumArgs() == 1); findConstructionContexts(withExtraLayer(CE), CE->getArg(0)); } |