[llvm-bugs] [Bug 37413] New: libclang ExceptionSpecificationKind regression

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 11 01:01:39 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37413

            Bug ID: 37413
           Summary: libclang ExceptionSpecificationKind regression
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: libclang
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jbcoe at me.com
                CC: klimek at google.com, llvm-bugs at lists.llvm.org

Python tests fail with libclang from trunk

Running cindex tests with trunk libclang I get:

```
======================================================================
FAIL: test_exception_specification_kind
(cindex.test_exception_specification_kind.TestExceptionSpecificationKind)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Users/jon/DEV/FFIG/ffig/clang-tests/cindex/test_exception_specification_kind.py",
line 30, in test_exception_specification_kind
    self.assertListEqual(declarations, expected)
AssertionError: Lists differ: [('sq[93 chars]PT), ('square3',
ExceptionSpecificationKind.UNINSTANTIATED)] != [('sq[93 chars]PT), ('square3',
ExceptionSpecificationKind.COMPUTED_NOEXCEPT)]

First differing element 2:
('square3', ExceptionSpecificationKind.UNINSTANTIATED)
('square3', ExceptionSpecificationKind.COMPUTED_NOEXCEPT)

  [('square1', ExceptionSpecificationKind.NONE),
   ('square2', ExceptionSpecificationKind.BASIC_NOEXCEPT),
-  ('square3', ExceptionSpecificationKind.UNINSTANTIATED)]
?                                          ----------

+  ('square3', ExceptionSpecificationKind.COMPUTED_NOEXCEPT)]
?                                         ++++    +++++++++
```

AppleClang does not give me this error and the test code:

```
source = """int square1(int x);
            int square2(int x) noexcept;
            int square3(int x) noexcept(noexcept(x * x));"""
```

Seems to me to be consistent with the old result
`ExceptionSpecificationKind.COMPUTED_NOEXCEPT`. I presume something has changed
in libclang and was not picked up by a lower-level test.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180511/c3f64e1b/attachment.html>


More information about the llvm-bugs mailing list