[Lldb-commits] [PATCH] D57880: Add assert for 'bad' code path in GetUniqueNamespaceDeclaration
Davide Italiano via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 8 14:56:23 PDT 2019
davide added inline comments.
================
Comment at: lldb/trunk/source/Symbol/ClangASTContext.cpp:1957
} else {
- // BAD!!!
+ assert(false && "GetUniqueNamespaceDeclaration called with no name and "
+ "no namespace as decl_ctx");
----------------
davide wrote:
> shafik wrote:
> > We don't have a way to trigger this branch?
> I guess this is the whole point of the assertion. It can't be hit. BTW, you can replace it with `llvm_unreachable()`
"can't" in this context is a very strong word. It shouldn't. If it gets hit, we should remove the assertion.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57880/new/
https://reviews.llvm.org/D57880
More information about the lldb-commits
mailing list