[Bug 24916] New: Expression evaluation: out-of-line definition of '$__lldb_expr' does not match any declaration in 'Foo'

Bug ID 24916
Summary Expression evaluation: out-of-line definition of ‘$__lldb_expr’ does not match any declaration in ‘Foo’
Product lldb
Version unspecified
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter tberghammer@google.com
CC llvm-bugs@lists.llvm.org
Classification Unclassified

Created attachment 14927 [details]
Test to reproduce

Expression evaluation fails with the following error message in some context:

error: out-of-line definition of '$__lldb_expr' does not match any declaration
in 'Foo'
error: 1 errors parsing expression

The context where the error happens isn't easy to specify (usually involves
namespaces) but in the given contexts (inside a given function) it fails at all
PC and for all expression (including commands like "expression 1").

To reproduce the issue run the attached test case (with the lldb test
framework) (test also visible here: [http://reviews.llvm.org/D12934](http://reviews.llvm.org/D12934))

Tested with:
Ubuntu clang version 3.5.0-4ubuntu2~trusty2 (tags/RELEASE_350/final) (based on
LLVM 3.5.0)

The issue was introduced by [http://reviews.llvm.org/rL245905](http://reviews.llvm.org/rL245905)

We should create a proper test case for the issue after we understand it a bit
more!