mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Integrate LLVM at llvm/llvm-project@06da9b94ae
Updates LLVM usage to match [06da9b94ae37](https://github.com/llvm/llvm-project/commit/06da9b94ae37) PiperOrigin-RevId: 481181270 Change-Id: I8c015fbd95d7f5f543d4eed12ed5d4efc11ef9c3
This commit is contained in:
parent
882e474032
commit
7dca070083
|
@ -327,16 +327,23 @@ class CodeAnalysisTest(parameterized.TestCase):
|
|||
|
||||
types = args[0].get_related_types()
|
||||
names = [t._clang_type.spelling for t in types]
|
||||
self.assertLen(types, 3)
|
||||
self.assertSameElements(names, ['struct_2', 'uint', 'struct_1'])
|
||||
self.assertLen(types, 4)
|
||||
self.assertSameElements(names, [
|
||||
'struct_2', 'struct_1::(unnamed struct at tmp.cc:6:9)', 'uint',
|
||||
'struct_1'
|
||||
])
|
||||
|
||||
types = args[1].get_related_types()
|
||||
names = [t._clang_type.spelling for t in types]
|
||||
self.assertLen(types, 2)
|
||||
self.assertSameElements(names, ['struct_1', 'uint'])
|
||||
self.assertLen(types, 3)
|
||||
self.assertSameElements(
|
||||
names, ['struct_1', 'struct_1::(unnamed struct at tmp.cc:6:9)', 'uint'])
|
||||
|
||||
names = [t._clang_type.spelling for t in generator._get_related_types()]
|
||||
self.assertEqual(names, ['uint', 'struct_1', 'struct_2', 'struct_a'])
|
||||
self.assertEqual(names, [
|
||||
'uint', 'struct_1', 'struct_1::(unnamed struct at tmp.cc:6:9)',
|
||||
'struct_2', 'struct_a'
|
||||
])
|
||||
|
||||
types = args[2].get_related_types()
|
||||
self.assertLen(types, 1)
|
||||
|
@ -373,13 +380,16 @@ class CodeAnalysisTest(parameterized.TestCase):
|
|||
|
||||
types = args[0].get_related_types()
|
||||
names = [t._clang_type.spelling for t in types]
|
||||
self.assertLen(types, 3)
|
||||
self.assertSameElements(names, ['union_2', 'uint', 'union_1'])
|
||||
self.assertLen(types, 4)
|
||||
self.assertSameElements(names, [
|
||||
'union_2', 'union_1::(unnamed union at tmp.cc:6:9)', 'uint', 'union_1'
|
||||
])
|
||||
|
||||
types = args[1].get_related_types()
|
||||
names = [t._clang_type.spelling for t in types]
|
||||
self.assertLen(types, 2)
|
||||
self.assertSameElements(names, ['union_1', 'uint'])
|
||||
self.assertLen(types, 3)
|
||||
self.assertSameElements(
|
||||
names, ['union_1', 'union_1::(unnamed union at tmp.cc:6:9)', 'uint'])
|
||||
|
||||
# Extra check for generation, in case rendering throws error for this test.
|
||||
generator.generate('Test', [], 'sapi::Tests', None, None)
|
||||
|
@ -638,7 +648,7 @@ class CodeAnalysisTest(parameterized.TestCase):
|
|||
self.assertLen(functions, 1)
|
||||
|
||||
types = generator._get_related_types()
|
||||
self.assertLen(types, 2)
|
||||
self.assertLen(types, 3)
|
||||
self.assertEqual('typedef unsigned int uint', types[0].stringify())
|
||||
self.assertMultiLineEqual(expected, types[1].stringify())
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user