[Lldb-commits] [PATCH] D40615: Fix assertion in ClangASTContext
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 29 10:41:07 PST 2017
labath created this revision.
llvm::APSInt(0) asserts because it creates an int with bit-width 0 and
not (as I thought) a value 0.
Theoretically it should be sufficient to change this to APSInt(1), as
the intention there was that the value of the first argument should be
ignored if the type is invalid, but that would look dodgy.
Instead, I use llvm::Optional to denote an invalid value and use a
special struct instead of a std::pair, to reduce typing and increase
clarity.
https://reviews.llvm.org/D40615
Files:
include/lldb/Symbol/ClangASTContext.h
include/lldb/Symbol/CompilerType.h
include/lldb/Symbol/TypeSystem.h
source/API/SBType.cpp
source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp
source/Symbol/ClangASTContext.cpp
source/Symbol/CompilerType.cpp
source/Symbol/TypeSystem.cpp
unittests/Symbol/TestClangASTContext.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40615.124781.patch
Type: text/x-patch
Size: 8447 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171129/6f20c1ac/attachment.bin>
More information about the lldb-commits
mailing list