[Bug 24691] New: Assertion failure in clang in TestFormatters.py

Bug ID 24691
Summary Assertion failure in clang in TestFormatters.py
Product lldb
Version unspecified
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter labath@google.com
CC llvm-bugs@lists.llvm.org
Classification Unclassified

We hit a clang assertion in TestFormatters (I'm not sure why it happens only on
android). Clang asserts in clang::SourceManager::getFileCharacteristic, when it
tries to examine the SourceLocation of the declaration of 'operator new'. The
problem here is that when lldb injects the declaration into the clang's
ASTContext, it deliberately creates it with an empty SourceLocation (because it
does not have source information, see NamedSearchContext::AddFunDecl).