diff options
| author | Jordan Rose <jordan_rose@apple.com> | 2013-07-10 19:14:10 +0000 |
|---|---|---|
| committer | Jordan Rose <jordan_rose@apple.com> | 2013-07-10 19:14:10 +0000 |
| commit | 6444653a06c0bbbaf0cbe6db7195942c3c5d3bff (patch) | |
| tree | 1a68c4738cb2c4dcc2c2f041a63214b45e15a4fe /clang/lib | |
| parent | 755d324cd2d8ac9cce5d758a8be5f72388d149a1 (diff) | |
| download | bcm5719-llvm-6444653a06c0bbbaf0cbe6db7195942c3c5d3bff.tar.gz bcm5719-llvm-6444653a06c0bbbaf0cbe6db7195942c3c5d3bff.zip | |
[analyzer] Remove bogus assert: in C++11, 'new' can do list-initialization.
Previously, we asserted that whenever 'new' did not include a constructor
call, the type must be a non-record type. In C++11, however, uniform
initialization syntax (braces) allow 'new' to construct records with
list-initialization: "new Point{1, 2}".
Removing this assertion should be perfectly safe; the code here matches
what VisitDeclStmt does for regions allocated on the stack.
<rdar://problem/14403437>
llvm-svn: 186028
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp index 3f16c624922..1342e4149f6 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp @@ -431,8 +431,6 @@ void ExprEngine::VisitCXXNewExpr(const CXXNewExpr *CNE, ExplodedNode *Pred, if (!isa<CXXConstructExpr>(Init)) { assert(Bldr.getResults().size() == 1); Bldr.takeNodes(NewN); - - assert(!CNE->getType()->getPointeeCXXRecordDecl()); evalBind(Dst, CNE, NewN, Result, State->getSVal(Init, LCtx), /*FirstInit=*/IsStandardGlobalOpNewFunction); } |

