diff options
| author | 2017-01-14 19:55:43 +0000 | |
|---|---|---|
| committer | 2017-01-14 19:55:43 +0000 | |
| commit | bd3306aecb3a15e8967143b8cdbbccf2b1b19b74 (patch) | |
| tree | 309a8132b44564b9e634c0da6815187ce8eab27c /gnu/llvm/tools/clang/bindings/python/tests/cindex/test_diagnostics.py | |
| parent | killp -a should not kill the window if only one pane. (diff) | |
| download | wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.tar.xz wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.zip | |
Import LLVM 3.9.1 including clang and lld.
Diffstat (limited to 'gnu/llvm/tools/clang/bindings/python/tests/cindex/test_diagnostics.py')
| -rw-r--r-- | gnu/llvm/tools/clang/bindings/python/tests/cindex/test_diagnostics.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/llvm/tools/clang/bindings/python/tests/cindex/test_diagnostics.py b/gnu/llvm/tools/clang/bindings/python/tests/cindex/test_diagnostics.py index 48ab6176fd1..ba6e545e8b1 100644 --- a/gnu/llvm/tools/clang/bindings/python/tests/cindex/test_diagnostics.py +++ b/gnu/llvm/tools/clang/bindings/python/tests/cindex/test_diagnostics.py @@ -80,3 +80,15 @@ def test_diagnostic_option(): assert d.option == '-Wunused-parameter' assert d.disable_option == '-Wno-unused-parameter' + +def test_diagnostic_children(): + tu = get_tu('void f(int x) {} void g() { f(); }') + assert len(tu.diagnostics) == 1 + d = tu.diagnostics[0] + + children = d.children + assert len(children) == 1 + assert children[0].severity == Diagnostic.Note + assert children[0].spelling.endswith('declared here') + assert children[0].location.line == 1 + assert children[0].location.column == 1 |
