summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2019-01-07 03:25:59 +0000
committerBrian Gesiak <modocache@gmail.com>2019-01-07 03:25:59 +0000
commit7dda73a223c2c2bc48ba37f2cc3c1fd7b976c186 (patch)
tree9945c9e80c3272eead4c3e5ff83781f02fe477d0 /llvm/lib/Analysis/BasicAliasAnalysis.cpp
parenta3077e6fb6138bdd785e097abced53e5728e200a (diff)
downloadbcm5719-llvm-7dda73a223c2c2bc48ba37f2cc3c1fd7b976c186.tar.gz
bcm5719-llvm-7dda73a223c2c2bc48ba37f2cc3c1fd7b976c186.zip
[SemaCXX] Fix ICE for unexpanded parameter pack
Summary: The documentation for RecursiveASTVisitor::TraverseDecl states that the Decl being traversed may be null. In fact, this is the case when a CXXCatchStmt with no exception decl is traversed. Because the visitor for diagnosing unexpanded parameter packs does not check for null, it ends up crashing when it attempts to call the Decl::isParameterPack method on a null Decl pointer. Add a null check to prevent an ICE, and a test case that would crash otherwise. Also, because the test requires C++ exceptions and C++14, change the test parameters for the entire test file. (Alternatively, I thought about adding a new test file, but went with this approach for my own convenience.) Co-authored-by: Andreas Molzer <andreas.molzer@gmx.de> Co-authored-by: Mara Bos <m-ou.se@m-ou.se> Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56271 llvm-svn: 350501
Diffstat (limited to 'llvm/lib/Analysis/BasicAliasAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud