aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJorge Gorbe Moya <jgorbe@google.com>2019-05-23 20:11:17 +0000
committerJorge Gorbe Moya <jgorbe@google.com>2019-05-23 20:11:17 +0000
commit56d69ef8ca1f2826b1e7c620b871f5074926a43a (patch)
tree8857d0f785d7b2f371885d13237f101d9302f467 /clang/lib/Frontend/CompilerInvocation.cpp
parent30905a375ea2f7970cc896b89ec4ebf3c812cd4f (diff)
downloadllvm-56d69ef8ca1f2826b1e7c620b871f5074926a43a.zip
llvm-56d69ef8ca1f2826b1e7c620b871f5074926a43a.tar.gz
llvm-56d69ef8ca1f2826b1e7c620b871f5074926a43a.tar.bz2
[lldb] Make sure RegularExpression constructors always initialize member variables
The copy constructor of RegularExpression doesn't initialize m_comp_err. This causes an use-of-initialized-value error when a RegularExpression is copied: the copy constructor calls Compile, which calls Free to free the existing regex if needed, which in turn reads m_comp_err to check if there's any regex to be freed. This change calls the default constructor from the other constructors to make sure members are always initialized with sensible values. This also avoids duplicating init logic, like the RegularExpression(llvm:StringRef) constructor does, which is error prone. Differential Revision: https://reviews.llvm.org/D62334 llvm-svn: 361546
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions