summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2016-10-04 10:11:43 +0000
committerSerge Pavlov <sepavloff@gmail.com>2016-10-04 10:11:43 +0000
commit06b7a87298d2be1597b2c36ca3cd9ce2a381a140 (patch)
tree7cf568c4718a1c4f017e145256ce49f7bbe0b072 /lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py
parent8a70450590d811b440c7652be9886f7b16800bb9 (diff)
downloadbcm5719-llvm-06b7a87298d2be1597b2c36ca3cd9ce2a381a140.tar.gz
bcm5719-llvm-06b7a87298d2be1597b2c36ca3cd9ce2a381a140.zip
Do not find friend function definitions inside non-instantiated class.
Previously if a file-level function was defined inside befriending template class, it always was treated as defined. For instance, the code like: ``` int func(int x); template<typename T> class C1 { friend int func(int x) { return x; } }; template<typename T> class C2 { friend int func(int x) { return x; } }; ``` could not be compiled due to function redefinition, although not of the templates is instantiated. Moreover, the body of friend function can contain use of template parameters, attempt to get definition of such function outside any instantiation causes compiler abnormal termination. Other compilers (gcc, icc) follow viewpoint that the body of the function defined in friend declaration becomes available when corresponding class is instantiated. This patch implements this viewpoint in clang. Definitions introduced by friend declarations in template classes are not added to the redeclaration chain of corresponding function. Only when the template is instantiated, instantiation of the function definition is placed to the chain. The fix was made in collaboration with Richard Smith. This change fixes PR8035, PR17923, PR22307 and PR25848. Differential Revision: http://reviews.llvm.org/D16989 llvm-svn: 283207
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud